- Assert::parameterType( 'integer', $namespace, '$namespace' );
- Assert::parameterType( 'string', $dbkey, '$dbkey' );
- Assert::parameterType( 'string', $fragment, '$fragment' );
- Assert::parameterType( 'string', $interwiki, '$interwiki' );
+ if ( !is_int( $namespace ) ) {
+ throw new ParameterTypeException( '$namespace', 'int' );
+ }
+ if ( !is_string( $dbkey ) ) {
+ throw new ParameterTypeException( '$dbkey', 'string' );
+ }
+ if ( !is_string( $fragment ) ) {
+ throw new ParameterTypeException( '$fragment', 'string' );
+ }
+ if ( !is_string( $interwiki ) ) {
+ throw new ParameterTypeException( '$interwiki', 'string' );
+ }