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

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


build: Updating mediawiki/mediawiki-codesniffer to 0.11.0

The following sniffs now pass and were enabled:
* MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage

Change-Id: Ia01973f24f56a415620058ea63bc7a62308166e7
---
M composer.json
M includes/actions/EditCourseAction.php
M includes/api/ApiAddStudents.php
M includes/api/ApiDeleteEducation.php
M includes/api/ApiListStudents.php
M includes/pagers/ArticleTable.php
M includes/specials/SpecialEducationProgram.php
M phpcs.xml
8 files changed, 11 insertions(+), 12 deletions(-)

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



diff --git a/composer.json b/composer.json
index 91c6304..eff2a81 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.1",
+               "mediawiki/mediawiki-codesniffer": "0.11.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/includes/actions/EditCourseAction.php 
b/includes/actions/EditCourseAction.php
index 3445bb5..f6a000b 100644
--- a/includes/actions/EditCourseAction.php
+++ b/includes/actions/EditCourseAction.php
@@ -398,7 +398,7 @@
 
                // These fields are deprecated, so make sure they can't be
                // set. (Already removed from the UI.)
-               unset ( $fields['field'], $fields['level'] );
+               unset( $fields['field'], $fields['level'] );
 
                // Prevent unauthorized users from changing certain fields
                if ( !$this->getUser()->isAllowed( 
$this->getManagementRestriction() ) ) {
diff --git a/includes/api/ApiAddStudents.php b/includes/api/ApiAddStudents.php
index e5fa337..f90a8f6 100644
--- a/includes/api/ApiAddStudents.php
+++ b/includes/api/ApiAddStudents.php
@@ -69,7 +69,7 @@
                $invalidUserNames = []; // just names, indexed numerically
 
                foreach ( $usersData['query']['users'] as $key => $userData ) {
-                       if ( isset ( $userData['userid'] ) ) {
+                       if ( isset( $userData['userid'] ) ) {
                                $validUsersMap[$userData['userid']] = 
$userData['name'];
                        } else {
                                $invalidUserNames[] = $userData['name'];
diff --git a/includes/api/ApiDeleteEducation.php 
b/includes/api/ApiDeleteEducation.php
index 0b4151f..5164b89 100644
--- a/includes/api/ApiDeleteEducation.php
+++ b/includes/api/ApiDeleteEducation.php
@@ -89,7 +89,7 @@
                        $revAction->setUser( $this->getUser() );
                        $revAction->setComment( $params['comment'] );
 
-                       $class::singleton()->deleteAndLog( $revAction, [ 'id' 
=>  $params['ids'] ] );
+                       $class::singleton()->deleteAndLog( $revAction, [ 'id' 
=> $params['ids'] ] );
                }
 
                $this->getResult()->addValue(
diff --git a/includes/api/ApiListStudents.php b/includes/api/ApiListStudents.php
index 8d835bd..f4ebdf8 100644
--- a/includes/api/ApiListStudents.php
+++ b/includes/api/ApiListStudents.php
@@ -369,7 +369,7 @@
 
                        // If output is grouped by course, get the assigned 
articles for each student.
                        if ( $courseId ) {
-                               $studentEPArticles =  $this->getEPArticles( 
$courseId, $student, $articleStore );
+                               $studentEPArticles = $this->getEPArticles( 
$courseId, $student, $articleStore );
 
                                $articleIndex = 0;
                                foreach ( $studentEPArticles as 
$studentEPArticle ) {
@@ -669,7 +669,7 @@
        public function getAllowedParams() {
                return [
 
-                       'courseids'=> [
+                       'courseids' => [
                                ApiBase::PARAM_TYPE => 'integer',
                                ApiBase::PARAM_REQUIRED => true,
                                // This allows multiple pipe-separated values 
in courseids parameter.
@@ -683,8 +683,8 @@
                                        'id',
                                ]
                        ],
-                       'group'=> false,
-                       'csv'=> false,
+                       'group' => false,
+                       'csv' => false,
                ];
        }
 
diff --git a/includes/pagers/ArticleTable.php b/includes/pagers/ArticleTable.php
index 6ff06a1..f0047e7 100644
--- a/includes/pagers/ArticleTable.php
+++ b/includes/pagers/ArticleTable.php
@@ -541,7 +541,7 @@
                        ]
                );
 
-               $html .=  Xml::inputLabel(
+               $html .= Xml::inputLabel(
                        $this->msg( 'ep-articles-addarticle-text' )->text(),
                        'addarticlename',
                        'addarticlename',
diff --git a/includes/specials/SpecialEducationProgram.php 
b/includes/specials/SpecialEducationProgram.php
index f7322d8..9f7cdad 100644
--- a/includes/specials/SpecialEducationProgram.php
+++ b/includes/specials/SpecialEducationProgram.php
@@ -63,14 +63,14 @@
                foreach ( $summaryData as $stat => $value ) {
                        $html .= '<tr>';
 
-                       $html .=  Html::rawElement(
+                       $html .= Html::rawElement(
                                'th',
                                [ 'class' => 'ep-summary-name' ],
                                $this->msg( str_replace( 'educationprogram\\', 
'ep-', strtolower( get_called_class() ) )
                                        . '-summary-' . $stat )->parse()
                        );
 
-                       $html .=  Html::rawElement(
+                       $html .= Html::rawElement(
                                'td',
                                [ 'class' => 'ep-summary-value' ],
                                $value
diff --git a/phpcs.xml b/phpcs.xml
index e2647c6..2e94af4 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,7 +9,6 @@
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" 
/>
-               <exclude 
name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
                <exclude 
name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" />
        </rule>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia01973f24f56a415620058ea63bc7a62308166e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
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