"wikimedia/base-convert": "1.0.1",
"wikimedia/cdb": "1.3.0",
"wikimedia/cldr-plural-rule-parser": "1.0.0",
- "wikimedia/composer-merge-plugin": "1.3.0",
+ "wikimedia/composer-merge-plugin": "1.3.1",
"wikimedia/ip-set": "1.0.1",
"wikimedia/php-session-serializer": "1.0.3",
"wikimedia/relpath": "1.0.3",
'ipb_expiry' => $dbw->timestamp( $this->mExpiry ),
],
[ /* WHERE */
- 'ipb_address' => (string)$this->getTarget()
+ 'ipb_id' => $this->getId(),
],
__METHOD__
);
# Forge a return array containing metadata information just like getimagesize()
# See PHP documentation at: http://www.php.net/getimagesize
- $metadata = [];
- $metadata[0] = $header['width'];
- $metadata[1] = $header['height'];
- $metadata[2] = null; # IMAGETYPE constant, none exist for XCF.
- $metadata[3] = sprintf(
- 'height="%s" width="%s"', $header['height'], $header['width']
- );
- $metadata['mime'] = 'image/x-xcf';
- $metadata['channels'] = null;
- $metadata['bits'] = 8; # Always 8-bits per color
-
- assert( '7 == count($metadata); ' .
- '# return array must contains 7 elements just like getimagesize() return' );
-
- return $metadata;
+ return [
+ 0 => $header['width'],
+ 1 => $header['height'],
+ 2 => null, # IMAGETYPE constant, none exist for XCF.
+ 3 => "height=\"{$header['height']}\" width=\"{$header['width']}\"",
+ 'mime' => 'image/x-xcf',
+ 'channels' => null,
+ 'bits' => 8, # Always 8-bits per color
+ ];
}
/**
|| strlen( $name ) > $wgMaxNameChars
|| $name != $wgContLang->ucfirst( $name )
) {
- wfDebugLog( 'username', __METHOD__ .
- ": '$name' invalid due to empty, IP, slash, length, or lowercase" );
return false;
}
if ( is_null( $parsed )
|| $parsed->getNamespace()
|| strcmp( $name, $parsed->getPrefixedText() ) ) {
- wfDebugLog( 'username', __METHOD__ .
- ": '$name' invalid due to ambiguous prefixes" );
return false;
}
'\x{e000}-\x{f8ff}' . # private use
']/u';
if ( preg_match( $unicodeBlacklist, $name ) ) {
- wfDebugLog( 'username', __METHOD__ .
- ": '$name' invalid due to blacklisted characters" );
return false;
}
<rule ref="Generic.ControlStructures.InlineControlStructure.NotAllowed">
<severity>0</severity>
</rule>
- <exclude-pattern>node_modules</exclude-pattern>
- <exclude-pattern>vendor</exclude-pattern>
- <exclude-pattern>extensions</exclude-pattern>
- <exclude-pattern>skins</exclude-pattern>
+ <exclude-pattern>node_modules/</exclude-pattern>
+ <exclude-pattern>vendor/</exclude-pattern>
+ <exclude-pattern type="relative">^extensions/</exclude-pattern>
+ <exclude-pattern type="relative">^skins/</exclude-pattern>
<exclude-pattern>.git</exclude-pattern>
</ruleset>
class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite {
public function __construct() {
parent::__construct();
- $paths = array();
+ $paths = [];
// Extensions can return a list of files or directories
- Hooks::run( 'UnitTestsList', array( &$paths ) );
+ Hooks::run( 'UnitTestsList', [ &$paths ] );
foreach ( $paths as $path ) {
if ( is_dir( $path ) ) {
// If the path is a directory, search for test cases.
// @since 1.24
- $suffixes = array(
- 'Test.php',
- );
+ $suffixes = [ 'Test.php' ];
$fileIterator = new File_Iterator_Facade();
$matchingFiles = $fileIterator->getFilesAsArray( $path, $suffixes );
$this->addTestFiles( $matchingFiles );
$this->addTestFile( $path );
}
}
- if ( !count( $paths ) ) {
+ if ( !$paths ) {
$this->addTest( new DummyExtensionsTest( 'testNothing' ) );
}
}