jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/360133 )
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.ExtraParamComment * MediaWiki.Commenting.FunctionComment.MissingParamComment * MediaWiki.Commenting.FunctionComment.MissingParamName * MediaWiki.Commenting.FunctionComment.MissingParamTag * MediaWiki.Commenting.FunctionComment.MissingReturn * MediaWiki.Commenting.FunctionComment.ParamNameNoMatch * MediaWiki.FunctionComment.Missing.Protected * MediaWiki.FunctionComment.Missing.Public * MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment Change-Id: I93c3488f6b50a5943f4613582e0d31a379beaa1f --- M composer.json M includes/SpecialCollaborationKitIcons.php M includes/SpecialCreateCollaborationHub.php M includes/SpecialCreateHubFeature.php M includes/content/CollaborationHubContent.php M includes/content/CollaborationHubContentHandler.php M includes/content/CollaborationKitImage.php M includes/content/CollaborationListContent.php M phpcs.xml M tests/phpunit/CollaborationHubContentTest.php 10 files changed, 21 insertions(+), 20 deletions(-) Approvals: Harej: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 8564df8..cd1d6fe 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.7.2", + "mediawiki/mediawiki-codesniffer": "0.9.0", "jakub-onderka/php-console-highlighter": "0.3.2" }, "scripts": { diff --git a/includes/SpecialCollaborationKitIcons.php b/includes/SpecialCollaborationKitIcons.php index 214114a..dc7a6df 100644 --- a/includes/SpecialCollaborationKitIcons.php +++ b/includes/SpecialCollaborationKitIcons.php @@ -34,11 +34,11 @@ $wikitext .= "{| class='wikitable'\n"; $wikitext .= "|-\n"; $wikitext .= '! ' . - $this->msg( 'collaborationkit-iconlist-columnheader-icon' )->plain() . - "\n"; + $this->msg( 'collaborationkit-iconlist-columnheader-icon' )->plain() . + "\n"; $wikitext .= '! ' . - $this->msg( 'collaborationkit-iconlist-columnheader-iconname' )->plain() . - "\n"; + $this->msg( 'collaborationkit-iconlist-columnheader-iconname' )->plain() . + "\n"; $wikitext .= "|-\n"; // Iterate through each icon and generate a row diff --git a/includes/SpecialCreateCollaborationHub.php b/includes/SpecialCreateCollaborationHub.php index 5a96b3b..4922fde 100644 --- a/includes/SpecialCreateCollaborationHub.php +++ b/includes/SpecialCreateCollaborationHub.php @@ -127,8 +127,7 @@ 'icon', 'colour', 'introduction' ] - as $fieldName ) - { + as $fieldName ) { if ( $this->getRequest()->getVal( $fieldName ) ) { $fields[ $fieldName ][ 'default' ] = $this->getRequest()->getVal( $fieldName ); } diff --git a/includes/SpecialCreateHubFeature.php b/includes/SpecialCreateHubFeature.php index 6a486f4..0119fc2 100644 --- a/includes/SpecialCreateHubFeature.php +++ b/includes/SpecialCreateHubFeature.php @@ -151,8 +151,7 @@ // Create feature $contentModel = $data[ 'contenttype' ]; if ( $contentModel != 'wikitext' - && $contentModel != 'CollaborationListContent' ) - { + && $contentModel != 'CollaborationListContent' ) { return Status::newFatal( 'collaborationkit-createhubfeature-invalidcontenttype' ); } diff --git a/includes/content/CollaborationHubContent.php b/includes/content/CollaborationHubContent.php index 1967101..cc40d37 100644 --- a/includes/content/CollaborationHubContent.php +++ b/includes/content/CollaborationHubContent.php @@ -891,7 +891,6 @@ array_keys( array_filter( $wgCollaborationHubAllowedNamespaces ) ) ) ) { - $parentTitle = $title->getBaseTitle(); while ( !$title->equals( $parentTitle ) ) { $parentRev = Revision::newFromTitle( $parentTitle ); diff --git a/includes/content/CollaborationHubContentHandler.php b/includes/content/CollaborationHubContentHandler.php index ddd52d9..a1fee2d 100644 --- a/includes/content/CollaborationHubContentHandler.php +++ b/includes/content/CollaborationHubContentHandler.php @@ -40,7 +40,6 @@ ) && MWNamespace::hasSubpages( $namespace ) ) { - return true; } return false; diff --git a/includes/content/CollaborationKitImage.php b/includes/content/CollaborationKitImage.php index ac7f39d..de118b5 100644 --- a/includes/content/CollaborationKitImage.php +++ b/includes/content/CollaborationKitImage.php @@ -36,7 +36,6 @@ * $options['renderAsWikitext'] */ public static function makeImage( $image, $width, $options = [] ) { - $cannedIcons = self::getCannedIcons(); // Setting up options diff --git a/includes/content/CollaborationListContent.php b/includes/content/CollaborationListContent.php index f39a580..2c7dad6 100644 --- a/includes/content/CollaborationListContent.php +++ b/includes/content/CollaborationListContent.php @@ -1198,7 +1198,7 @@ $action = $context->getRequest()->getVal( 'action', 'view' ); // @todo Does not trigger on perma-link to current revision - // not sure if that's a desired behaviour or not. + // not sure if that's a desired behaviour or not. if ( $title->getContentModel() === __CLASS__ && $action === 'view' && $title->getArticleID() !== 0 diff --git a/phpcs.xml b/phpcs.xml index 63c9297..f08882e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,12 +1,22 @@ <?xml version="1.0"?> <ruleset> - <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/> + <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> + <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" /> + <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.ParamNameNoMatch" /> + <exclude name="MediaWiki.FunctionComment.Missing.Protected" /> + <exclude name="MediaWiki.FunctionComment.Missing.Public" /> + <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> + </rule> <rule ref="Generic.Files.LineLength.TooLong"> <exclude-pattern>*/tests/*</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>node_modules</exclude-pattern> <exclude-pattern>vendor</exclude-pattern> </ruleset> diff --git a/tests/phpunit/CollaborationHubContentTest.php b/tests/phpunit/CollaborationHubContentTest.php index f65ee66..eb590cd 100644 --- a/tests/phpunit/CollaborationHubContentTest.php +++ b/tests/phpunit/CollaborationHubContentTest.php @@ -181,7 +181,6 @@ $wc = TestingAccessWrapper::newFromObject( $content ); $actual = $wc->getMembersBlock( Title::newMainPage(), new ParserOptions, new ParserOutput, $testMemberList ); static::assertEquals( $expected[ $id ], $actual, $id ); - } /** @@ -195,7 +194,6 @@ $wc = TestingAccessWrapper::newFromObject( $content ); $actual = $wc->getParsedAnnouncements( Title::newMainPage(), new ParserOptions, $testAnnouncement ); static::assertEquals( $expected[ $id ], $actual, $id ); - } /** @@ -208,7 +206,6 @@ $wc = TestingAccessWrapper::newFromObject( $content ); $actual = $wc->getSecondFooter( Title::newMainPage() ); static::assertEquals( $expected[ $id ], $actual, $id ); - } /** @@ -224,7 +221,6 @@ $wc = TestingAccessWrapper::newFromObject( $content ); $actual = $wc->makeHeader( Title::newMainPage(), $testContentArray ); static::assertEquals( $expected[ $id ], $actual, $id ); - } /** -- To view, visit https://gerrit.wikimedia.org/r/360133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93c3488f6b50a5943f4613582e0d31a379beaa1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits