build: Update mediawiki/mediawiki-codesniffer to 0.5.1
Two rules are ignored for now to allow us to upgrade: * MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures * Generic.ControlStructures.InlineControlStructure.NotAllowed Also ignore the .git folder. Change-Id: I1b149c72b27be54e22e369999ad0c41c2d1fc2b4
This commit is contained in:
parent
c732764ef4
commit
2b61957cfe
4 changed files with 17 additions and 12 deletions
|
|
@ -40,7 +40,7 @@
|
|||
"require-dev": {
|
||||
"jakub-onderka/php-parallel-lint": "0.9",
|
||||
"justinrainbow/json-schema": "~1.3",
|
||||
"mediawiki/mediawiki-codesniffer": "0.4.0",
|
||||
"mediawiki/mediawiki-codesniffer": "0.5.1",
|
||||
"monolog/monolog": "~1.17.2",
|
||||
"nikic/php-parser": "1.4.1",
|
||||
"nmred/kafka-php": "0.1.4",
|
||||
|
|
|
|||
|
|
@ -231,9 +231,8 @@ class MediaWikiSite extends Site {
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// If on the pages structure we should prepare for returning.
|
||||
elseif ( $fieldId === 'title' && is_array( $collectedHits ) ) {
|
||||
} elseif ( $fieldId === 'title' && is_array( $collectedHits ) ) {
|
||||
// If on the pages structure we should prepare for returning.
|
||||
switch ( count( $collectedHits ) ) {
|
||||
case 0:
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -71,15 +71,14 @@ class LanguageOs extends Language {
|
|||
if ( preg_match( '/тæ$/u', $word ) ) {
|
||||
$word = mb_substr( $word, 0, -1 );
|
||||
$end_allative = 'æм';
|
||||
}
|
||||
# Works if $word is in singular form.
|
||||
# Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
|
||||
elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) {
|
||||
} elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) {
|
||||
# Works if $word is in singular form.
|
||||
# Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
|
||||
$jot = 'й';
|
||||
}
|
||||
# Checking if $word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
|
||||
# Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
|
||||
elseif ( preg_match( "/у$/u", $word ) ) {
|
||||
} elseif ( preg_match( "/у$/u", $word ) ) {
|
||||
# Checking if $word ends on 'у'. 'У'
|
||||
# can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
|
||||
# Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
|
||||
if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) {
|
||||
$jot = 'й';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,15 @@
|
|||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
|
||||
<exclude-pattern>*/includes/StubObject.php</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<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>.git</exclude-pattern>
|
||||
</ruleset>
|
||||
|
|
|
|||
Loading…
Reference in a new issue