From: Paladox Date: Tue, 29 Dec 2015 10:30:42 +0000 (+0000) Subject: build: Update mediawiki/mediawiki-codesniffer to 0.5.1 X-Git-Tag: 1.31.0-rc.0~8493^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=2b61957cfed50d53dfca4822f02eb0633fbfd9b4;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/composer.json b/composer.json index 9775823822..210c23e27c 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/includes/site/MediaWikiSite.php b/includes/site/MediaWikiSite.php index 029919c49d..9fec1f4fe1 100644 --- a/includes/site/MediaWikiSite.php +++ b/includes/site/MediaWikiSite.php @@ -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; diff --git a/languages/classes/LanguageOs.php b/languages/classes/LanguageOs.php index dbf4cceb32..d374c859c2 100644 --- a/languages/classes/LanguageOs.php +++ b/languages/classes/LanguageOs.php @@ -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 = 'й'; } diff --git a/phpcs.xml b/phpcs.xml index 376e58253c..38c7aaa96c 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -20,8 +20,15 @@ */includes/StubObject.php + + 0 + + + 0 + node_modules vendor extensions skins + .git