$extensionStyle = false;
$langcode = $this->getOption( 'langcode' );
$messages = array( $langcode => $messages );
- } else if ( $this->hasOption( 'langcode' ) ) {
+ } elseif ( $this->hasOption( 'langcode' ) ) {
$this->output( "Warning: --langcode option set but will not be used.\n" );
}
}
$this->output( "All done.\n" );
- $this->output( "Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . /i18n';\n" );
+ $this->output( "Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . '/i18n';\n" );
}
protected function doShim( $jsondir ) {
$fileName = __DIR__ . "/{{OUT}}/$csCode.json";
if ( is_readable( $fileName ) ) {
$data = FormatJson::decode( file_get_contents( $fileName ), true );
- foreach ( $data as $key => $unused ) {
+ foreach ( array_keys( $data ) as $key ) {
if ( $key === '' || $key[0] === '@' ) {
unset( $data[$key] );
}
PHP;
- $jsondir = str_replace('\\', '/', $jsondir );
+ $jsondir = str_replace( '\\', '/', $jsondir );
$shim = str_replace( '{{OUT}}', $jsondir, $shim );
return $shim;
}