Discussion:
[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Libraryupgrader (Code Review)
2017-12-30 00:09:39 UTC
Permalink
Libraryupgrader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400794 )

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

build: Updating mediawiki/mediawiki-codesniffer to 15.0.0

The following sniffs are failing and were disabled:
* Generic.Files.OneObjectStructurePerFile.MultipleFound
* Squiz.Scope.MethodScope.Missing

The following sniffs now pass and were enabled:
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: I88d36d7ece3bace8ed2e1d2e77d03fe476017e6c
---
M .phpcs.xml
M composer.json
M includes/Events/TimelineGroup.php
M includes/pagers/EPPager.php
M includes/pagers/OrgPager.php
M includes/rows/CA.php
M includes/rows/OA.php
M includes/rows/Student.php
M includes/tables/ORMTable.php
M tests/phpunit/db/ORMRowTest.php
10 files changed, 12 insertions(+), 19 deletions(-)


git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/94/400794/1

diff --git a/.phpcs.xml b/.phpcs.xml
index ba85c86..63a49ee 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,13 +6,13 @@
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ <exclude name="Squiz.Scope.MethodScope.Missing" />
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" />
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName">
<properties>
diff --git a/composer.json b/composer.json
index 0d46d2f..35cfa63 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "mediawiki/mediawiki-codesniffer": "14.1.0",
+ "mediawiki/mediawiki-codesniffer": "15.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.2.1"
},
diff --git a/includes/Events/TimelineGroup.php b/includes/Events/TimelineGroup.php
index fb7f9da..96d7b27 100644
--- a/includes/Events/TimelineGroup.php
+++ b/includes/Events/TimelineGroup.php
@@ -141,8 +141,7 @@
* @return string
*/
public function getHTML() {
- return
- Html::rawElement(
+ return Html::rawElement(
'span',
$this->getHeaderAttributes(),
$this->getHeaderHTML()
diff --git a/includes/pagers/EPPager.php b/includes/pagers/EPPager.php
index 1758c70..e495f40 100644
--- a/includes/pagers/EPPager.php
+++ b/includes/pagers/EPPager.php
@@ -194,8 +194,7 @@
);
}

- return
- '<fieldset>' .
+ return '<fieldset>' .
'<legend>' . $this->msg( 'ep-pager-withselected' )->escaped() . '</legend>' .
implode( '', $controls ) .
'</fieldset>';
@@ -409,8 +408,7 @@

$title = $this->getTitle()->getFullText();

- return
- '<fieldset>' .
+ return '<fieldset>' .
'<legend>' . $this->msg( 'ep-pager-showonly' )->escaped() . '</legend>' .
'<form method="post" action="' .
htmlspecialchars( wfAppendQuery( $GLOBALS['wgScript'], [ 'title' => $title ] ) )
diff --git a/includes/pagers/OrgPager.php b/includes/pagers/OrgPager.php
index 94a3f33..c6612d2 100644
--- a/includes/pagers/OrgPager.php
+++ b/includes/pagers/OrgPager.php
@@ -41,8 +41,7 @@
$pager = new OrgPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/CA.php b/includes/rows/CA.php
index 6a322ac..8854dbd 100644
--- a/includes/rows/CA.php
+++ b/includes/rows/CA.php
@@ -30,8 +30,7 @@
$pager = new CAPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/OA.php b/includes/rows/OA.php
index ded49f9..bc5b20f 100644
--- a/includes/rows/OA.php
+++ b/includes/rows/OA.php
@@ -30,8 +30,7 @@
$pager = new OAPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/Student.php b/includes/rows/Student.php
index 74a17be..5a80a2e 100644
--- a/includes/rows/Student.php
+++ b/includes/rows/Student.php
@@ -30,8 +30,7 @@
$pager = new StudentPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/tables/ORMTable.php b/includes/tables/ORMTable.php
index 8c53ca0..854bf36 100644
--- a/includes/tables/ORMTable.php
+++ b/includes/tables/ORMTable.php
@@ -734,7 +734,7 @@
$prefixedValues = [];

foreach ( $values as $field => $value ) {
- if ( is_integer( $field ) ) {
+ if ( is_int( $field ) ) {
if ( is_array( $value ) ) {
$field = $value[0];
$value = $value[1];
diff --git a/tests/phpunit/db/ORMRowTest.php b/tests/phpunit/db/ORMRowTest.php
index bd55bf4..76da4ad 100644
--- a/tests/phpunit/db/ORMRowTest.php
+++ b/tests/phpunit/db/ORMRowTest.php
@@ -147,7 +147,7 @@
$this->assertTrue( $item->save() );

$this->assertTrue( $item->hasIdField() );
- $this->assertTrue( is_integer( $item->getId() ) );
+ $this->assertTrue( is_int( $item->getId() ) );

$id = $item->getId();
--
To view, visit https://gerrit.wikimedia.org/r/400794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88d36d7ece3bace8ed2e1d2e77d03fe476017e6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <***@tools.wmflabs.org>
jenkins-bot (Code Review)
2017-12-30 19:00:47 UTC
Permalink
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/400794 )

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


build: Updating mediawiki/mediawiki-codesniffer to 15.0.0

The following sniffs are failing and were disabled:
* Generic.Files.OneObjectStructurePerFile.MultipleFound
* Squiz.Scope.MethodScope.Missing

The following sniffs now pass and were enabled:
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: I88d36d7ece3bace8ed2e1d2e77d03fe476017e6c
---
M .phpcs.xml
M composer.json
M includes/Events/TimelineGroup.php
M includes/pagers/EPPager.php
M includes/pagers/OrgPager.php
M includes/rows/CA.php
M includes/rows/OA.php
M includes/rows/Student.php
M includes/tables/ORMTable.php
M tests/phpunit/db/ORMRowTest.php
10 files changed, 12 insertions(+), 19 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index ba85c86..63a49ee 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,13 +6,13 @@
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ <exclude name="Squiz.Scope.MethodScope.Missing" />
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" />
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName">
<properties>
diff --git a/composer.json b/composer.json
index 0d46d2f..35cfa63 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "mediawiki/mediawiki-codesniffer": "14.1.0",
+ "mediawiki/mediawiki-codesniffer": "15.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.2.1"
},
diff --git a/includes/Events/TimelineGroup.php b/includes/Events/TimelineGroup.php
index fb7f9da..96d7b27 100644
--- a/includes/Events/TimelineGroup.php
+++ b/includes/Events/TimelineGroup.php
@@ -141,8 +141,7 @@
* @return string
*/
public function getHTML() {
- return
- Html::rawElement(
+ return Html::rawElement(
'span',
$this->getHeaderAttributes(),
$this->getHeaderHTML()
diff --git a/includes/pagers/EPPager.php b/includes/pagers/EPPager.php
index 1758c70..e495f40 100644
--- a/includes/pagers/EPPager.php
+++ b/includes/pagers/EPPager.php
@@ -194,8 +194,7 @@
);
}

- return
- '<fieldset>' .
+ return '<fieldset>' .
'<legend>' . $this->msg( 'ep-pager-withselected' )->escaped() . '</legend>' .
implode( '', $controls ) .
'</fieldset>';
@@ -409,8 +408,7 @@

$title = $this->getTitle()->getFullText();

- return
- '<fieldset>' .
+ return '<fieldset>' .
'<legend>' . $this->msg( 'ep-pager-showonly' )->escaped() . '</legend>' .
'<form method="post" action="' .
htmlspecialchars( wfAppendQuery( $GLOBALS['wgScript'], [ 'title' => $title ] ) )
diff --git a/includes/pagers/OrgPager.php b/includes/pagers/OrgPager.php
index 94a3f33..c6612d2 100644
--- a/includes/pagers/OrgPager.php
+++ b/includes/pagers/OrgPager.php
@@ -41,8 +41,7 @@
$pager = new OrgPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/CA.php b/includes/rows/CA.php
index 6a322ac..8854dbd 100644
--- a/includes/rows/CA.php
+++ b/includes/rows/CA.php
@@ -30,8 +30,7 @@
$pager = new CAPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/OA.php b/includes/rows/OA.php
index ded49f9..bc5b20f 100644
--- a/includes/rows/OA.php
+++ b/includes/rows/OA.php
@@ -30,8 +30,7 @@
$pager = new OAPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/rows/Student.php b/includes/rows/Student.php
index 74a17be..5a80a2e 100644
--- a/includes/rows/Student.php
+++ b/includes/rows/Student.php
@@ -30,8 +30,7 @@
$pager = new StudentPager( $context, $conditions );

if ( $pager->getNumRows() ) {
- return
- $pager->getFilterControl() .
+ return $pager->getFilterControl() .
$pager->getNavigationBar() .
$pager->getBody() .
$pager->getNavigationBar() .
diff --git a/includes/tables/ORMTable.php b/includes/tables/ORMTable.php
index 8c53ca0..854bf36 100644
--- a/includes/tables/ORMTable.php
+++ b/includes/tables/ORMTable.php
@@ -734,7 +734,7 @@
$prefixedValues = [];

foreach ( $values as $field => $value ) {
- if ( is_integer( $field ) ) {
+ if ( is_int( $field ) ) {
if ( is_array( $value ) ) {
$field = $value[0];
$value = $value[1];
diff --git a/tests/phpunit/db/ORMRowTest.php b/tests/phpunit/db/ORMRowTest.php
index bd55bf4..76da4ad 100644
--- a/tests/phpunit/db/ORMRowTest.php
+++ b/tests/phpunit/db/ORMRowTest.php
@@ -147,7 +147,7 @@
$this->assertTrue( $item->save() );

$this->assertTrue( $item->hasIdField() );
- $this->assertTrue( is_integer( $item->getId() ) );
+ $this->assertTrue( is_int( $item->getId() ) );

$id = $item->getId();
--
To view, visit https://gerrit.wikimedia.org/r/400794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I88d36d7ece3bace8ed2e1d2e77d03fe476017e6c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <***@tools.wmflabs.org>
Gerrit-Reviewer: AndyRussG <***@gmail.com>
Gerrit-Reviewer: Legoktm <***@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>
Loading...