File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,26 +113,4 @@ public static function newFromNumber( $numericId ) {
113113 return new self ( 'Q ' . $ numericId );
114114 }
115115
116- /**
117- * CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
118- *
119- * @since 7.0
120- *
121- * @param string $repositoryName
122- * @param int|float|string $numericId
123- *
124- * @return self
125- * @throws InvalidArgumentException
126- */
127- public static function newFromRepositoryAndNumber ( $ repositoryName , $ numericId ) {
128- if ( !is_numeric ( $ numericId ) ) {
129- throw new InvalidArgumentException ( '$numericId must be numeric ' );
130- }
131- if ( $ repositoryName !== '' ) {
132- throw new InvalidArgumentException ( 'repo name no longer supported (T291823) ' );
133- }
134-
135- return new self ( self ::joinSerialization ( [ $ repositoryName , '' , 'Q ' . $ numericId ] ) );
136- }
137-
138116}
Original file line number Diff line number Diff line change @@ -107,23 +107,4 @@ public static function newFromNumber( $numericId ) {
107107 return new self ( 'P ' . $ numericId );
108108 }
109109
110- /**
111- * CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
112- *
113- * @param string $repositoryName
114- * @param int|float|string $numericId
115- *
116- * @return self
117- * @throws InvalidArgumentException
118- */
119- public static function newFromRepositoryAndNumber ( $ repositoryName , $ numericId ) {
120- if ( !is_numeric ( $ numericId ) ) {
121- throw new InvalidArgumentException ( '$numericId must be numeric ' );
122- }
123- if ( $ repositoryName !== '' ) {
124- throw new InvalidArgumentException ( 'repo name no longer supported (T291823) ' );
125- }
126-
127- return new self ( self ::joinSerialization ( [ $ repositoryName , '' , 'P ' . $ numericId ] ) );
128- }
129110}
Original file line number Diff line number Diff line change @@ -150,14 +150,4 @@ public static function invalidNumericIdProvider() {
150150 ];
151151 }
152152
153- public function testNewFromRepositoryAndNumber () {
154- $ id = ItemId::newFromRepositoryAndNumber ( '' , 1 );
155- $ this ->assertSame ( 'Q1 ' , $ id ->getSerialization () );
156- }
157-
158- public function testNewFromRepositoryAndNumberWithInvalidNumericId () {
159- $ this ->expectException ( InvalidArgumentException::class );
160- ItemId::newFromRepositoryAndNumber ( '' , 'Q1 ' );
161- }
162-
163153}
Original file line number Diff line number Diff line change @@ -149,14 +149,4 @@ public static function invalidNumericIdProvider() {
149149 ];
150150 }
151151
152- public function testNewFromRepositoryAndNumber () {
153- $ id = NumericPropertyId::newFromRepositoryAndNumber ( '' , 1 );
154- $ this ->assertSame ( 'P1 ' , $ id ->getSerialization () );
155- }
156-
157- public function testNewFromRepositoryAndNumberWithInvalidNumericId () {
158- $ this ->expectException ( InvalidArgumentException::class );
159- NumericPropertyId::newFromRepositoryAndNumber ( '' , 'P1 ' );
160- }
161-
162152}
You can’t perform that action at this time.
0 commit comments