jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/360136 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
......................................................................


build: Updating mediawiki/mediawiki-codesniffer to 0.9.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoCaseMatch
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.Usage.DbrQueryUsage.DbrQueryFound
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I7644355edd7856d96d2a626ab971ddc70074eba4
---
M ContentTranslation.hooks.php
M api/ApiContentTranslationPublish.php
M api/ApiContentTranslationSave.php
M api/ApiQueryContentTranslationSuggestions.php
M composer.json
M includes/EchoNotificationPresentationModel.php
M includes/Translation.php
M includes/Translator.php
M phpcs.xml
M specials/SpecialContentTranslation.php
10 files changed, 27 insertions(+), 17 deletions(-)

Approvals:
  jenkins-bot: Verified
  Santhosh: Looks good to me, approved



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index ad90917..775e260 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -311,7 +311,6 @@
                $icons['cx'] = [
                        'path' => 
'ContentTranslation/images/cx-notification-green.svg',
                ];
-
        }
 
        /**
diff --git a/api/ApiContentTranslationPublish.php 
b/api/ApiContentTranslationPublish.php
index 8938808..ec1d0b5 100644
--- a/api/ApiContentTranslationPublish.php
+++ b/api/ApiContentTranslationPublish.php
@@ -134,7 +134,6 @@
                }
 
                $this->publish();
-
        }
 
        public function publish() {
@@ -190,7 +189,7 @@
                        if ( isset( $saveresult['edit']['newrevid'] ) ) {
                                // Add the tags post-send, after RC row 
insertion
                                $revId = intval( 
$saveresult['edit']['newrevid'] );
-                               DeferredUpdates::addCallableUpdate( function() 
use ( $revId, $params ) {
+                               DeferredUpdates::addCallableUpdate( function () 
use ( $revId, $params ) {
                                        ChangeTags::addTags(
                                                'contenttranslation',
                                                null,
diff --git a/api/ApiContentTranslationSave.php 
b/api/ApiContentTranslationSave.php
index bfe567c..41c1a7d 100644
--- a/api/ApiContentTranslationSave.php
+++ b/api/ApiContentTranslationSave.php
@@ -52,7 +52,7 @@
 
                // Delete the record from cx_drafts table if exists.
                // Now we have the translation stored in cx_corpora table.
-               DeferredUpdates::addCallableUpdate( function() use ( 
$translationId ) {
+               DeferredUpdates::addCallableUpdate( function () use ( 
$translationId ) {
                        Draft::delete( $translationId );
                } );
 
diff --git a/api/ApiQueryContentTranslationSuggestions.php 
b/api/ApiQueryContentTranslationSuggestions.php
index 0a76db5..4eaf066 100644
--- a/api/ApiQueryContentTranslationSuggestions.php
+++ b/api/ApiQueryContentTranslationSuggestions.php
@@ -227,7 +227,7 @@
 
        private function filterSuggestions( array $suggestions, array 
$titlesToFilter ) {
                return array_filter( $suggestions,
-                       function( $suggestion ) use( $titlesToFilter ) {
+                       function ( $suggestion ) use( $titlesToFilter ) {
                                return !in_array(
                                        
$suggestion->getTitle()->getPrefixedText(),
                                        $titlesToFilter
@@ -237,7 +237,7 @@
        }
 
        private function removeInvalidSuggestions( $sourceLanguage, array 
$existingTitles ) {
-               DeferredUpdates::addCallableUpdate( function() use ( 
$sourceLanguage, $existingTitles ) {
+               DeferredUpdates::addCallableUpdate( function () use ( 
$sourceLanguage, $existingTitles ) {
                        // Remove the already existing links from cx_suggestion 
table
                        $manager = new SuggestionListManager();
                        $manager->removeTitles( $sourceLanguage, 
$existingTitles );
diff --git a/composer.json b/composer.json
index 12688ef..9c850bb 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.7.2",
+               "mediawiki/mediawiki-codesniffer": "0.9.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/includes/EchoNotificationPresentationModel.php 
b/includes/EchoNotificationPresentationModel.php
index ee86c79..7f073f6 100644
--- a/includes/EchoNotificationPresentationModel.php
+++ b/includes/EchoNotificationPresentationModel.php
@@ -15,14 +15,14 @@
        }
 
        public function getPrimaryLink() {
-               if ( $this->type === 'cx-first-translation' )  {
+               if ( $this->type === 'cx-first-translation' ) {
                        $user =  $this->getViewingUserForGender();
                        $title = SpecialPage::getTitleFor( 'Contributions', 
$user );
                        return [
                                'url' => $title->getCanonicalURL(),
                                'label' => $this->msg( 'cx-contributions-link' )
                        ];
-               } elseif ( $this->type === 'cx-suggestions-available' )  {
+               } elseif ( $this->type === 'cx-suggestions-available' ) {
                        $title = SpecialPage::getTitleFor( 
'ContentTranslation', false, 'suggestions' );
                        return [
                                'url' => $title->getCanonicalURL(),
diff --git a/includes/Translation.php b/includes/Translation.php
index 0b3d099..c174f87 100644
--- a/includes/Translation.php
+++ b/includes/Translation.php
@@ -263,7 +263,7 @@
                $result = [];
 
                foreach ( $rows as $row ) {
-                       $result[] = (array) $row;
+                       $result[] = (array)$row;
                }
 
                return $result;
@@ -304,7 +304,7 @@
 
                $result = [];
                foreach ( $rows as $row ) {
-                       $result[] = (array) $row;
+                       $result[] = (array)$row;
                }
 
                return $result;
@@ -532,7 +532,7 @@
                $result = [];
 
                foreach ( $rows as $row ) {
-                       $translation = (array) $row;
+                       $translation = (array)$row;
                        $translation['stats'] = json_decode( 
$translation['stats'] );
                        $result[] = $translation;
                }
diff --git a/includes/Translator.php b/includes/Translator.php
index 6cdeccc..3b8669f 100644
--- a/includes/Translator.php
+++ b/includes/Translator.php
@@ -74,7 +74,7 @@
 
        /**
         * @param int $limit How many results to return
-        * @param string [$offset] Offset condition (timestamp)
+        * @param string [ $offset] Offset condition (timestamp)
         * @param string $from
         * @param string $to
         * @return Translation[]
diff --git a/phpcs.xml b/phpcs.xml
index 42674f6..3e5adba 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,11 +1,23 @@
 <?xml version="1.0"?>
 <ruleset>
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoCaseMatch" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
+               <exclude name="MediaWiki.FunctionComment.Missing.Protected" />
+               <exclude name="MediaWiki.FunctionComment.Missing.Public" />
+               <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+       </rule>
        <rule ref="Generic.Files.LineLength">
                <exclude-pattern>ContentTranslation.alias.php</exclude-pattern>
        </rule>
        <file>.</file>
-       <arg name="extensions" value="php,php5,inc"/>
-       <arg name="encoding" value="utf8"/>
+       <arg name="extensions" value="php,php5,inc" />
+       <arg name="encoding" value="utf8" />
        <exclude-pattern>vendor</exclude-pattern>
 </ruleset>
diff --git a/specials/SpecialContentTranslation.php 
b/specials/SpecialContentTranslation.php
index f2c0c3f..4e0d57d 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -30,7 +30,7 @@
                $out = $this->getOutput();
                $user->setOption( 'cx', '1' );
                // Promise to persist the setting post-send
-               DeferredUpdates::addCallableUpdate( function() use ( $user ) {
+               DeferredUpdates::addCallableUpdate( function () use ( $user ) {
                        $user->saveSettings();
                } );
                $out->addModules( 'ext.cx.beta.notification' );

-- 
To view, visit https://gerrit.wikimedia.org/r/360136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7644355edd7856d96d2a626ab971ddc70074eba4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to