WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/361435 )

Change subject: Fixes to address MW PHPCS 9.0
......................................................................

Fixes to address MW PHPCS 9.0

Change-Id: I3cf10f4c6247227906bd5640005717b0d6c73a16
---
M includes/TwoColConflictHooks.php
M includes/TwoColConflictPage.php
M phpcs.xml
3 files changed, 28 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/35/361435/1

diff --git a/includes/TwoColConflictHooks.php b/includes/TwoColConflictHooks.php
index 6b0fd3b..4f64a80 100644
--- a/includes/TwoColConflictHooks.php
+++ b/includes/TwoColConflictHooks.php
@@ -11,6 +11,11 @@
  */
 class TwoColConflictHooks {
 
+       /**
+        * @param Article $article
+        * @param User $user
+        * @return bool
+        */
        public static function onCustomEditor( Article $article, User $user ) {
                $config = MediaWikiServices::getInstance()->getMainConfig();
 
@@ -56,6 +61,11 @@
                }
        }
 
+       /**
+        * @param array &$testModules
+        * @param ResourceLoader $rl
+        * @return bool
+        */
        public static function onResourceLoaderTestModules( array 
&$testModules, ResourceLoader $rl ) {
                $testModules['qunit']['ext.TwoColConflict.tests'] = [
                        'scripts' => [
diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index dc4ae50..12cf346 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -10,6 +10,9 @@
        const WHITESPACES =
                
'\s\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}';
 
+       /**
+        * Increment stats to count conflicts handled
+        */
        protected function incrementConflictStats() {
                parent::incrementConflictStats();
                $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
@@ -19,7 +22,7 @@
        /**
         * Replace default header for explaining the conflict screen.
         *
-        * @param OutputPage $out
+        * @param OutputPage $out OutputPage used for page output.
         */
        protected function addExplainConflictHeader( OutputPage $out ) {
                // don't show conflict message when coming from VisualEditor
@@ -44,7 +47,8 @@
        /**
         * Set the HTML to encapsulate the default edit form.
         *
-        * @param callable|null $formCallback
+        * @param callable|null $formCallback That takes an OutputPage 
parameter; will be called
+        *     during form output near the top, for captchas and the like.
         */
        public function showEditForm( $formCallback = null ) {
                if ( $this->isConflict ) {
@@ -59,6 +63,12 @@
                parent::showEditForm( $formCallback );
        }
 
+       /**
+        * Shows the diff part in the original conflict handling. Is not
+        * used and overwritten.
+        *
+        * @return bool
+        */
        protected function showConflict() {
                $this->incrementConflictStats();
 
@@ -211,7 +221,8 @@
 
                $attribs = $this->buildTextboxAttribs( $name, $customAttribs, 
$this->context->getUser() );
 
-               $wikiText = '<div>' . $wikiText . '</div>'; // to set the 
cursor style see T156483
+               // div to set the cursor style see T156483
+               $wikiText = '<div>' . $wikiText . '</div>';
                return Html::rawElement( 'div', $attribs, $wikiText );
        }
 
@@ -363,7 +374,8 @@
                                                        '<div 
class="mw-twocolconflict-diffchange-title">' .
                                                        '<span 
mw-twocolconflict-diffchange-title-pseudo="' .
                                                        $this->context->msg( 
'twoColConflict-diffchange-own-title' )->escaped() .
-                                                       '" unselectable="on">' 
. // used by IE9
+                                                       // unselectable used by 
IE9
+                                                       '" unselectable="on">' .
                                                        '</span>' .
                                                        '</div>' .
                                                        $changeSet['new'] .
@@ -382,7 +394,8 @@
                                                                
'twoColConflict-diffchange-foreign-title',
                                                                $lastUser
                                                        )->escaped() .
-                                                       '" unselectable="on">' 
. // used by IE9
+                                                       // unselectable used by 
IE9
+                                                       '" unselectable="on">' .
                                                        '</span>' .
                                                        '</div>' .
                                                        $changeSet['old'] .
diff --git a/phpcs.xml b/phpcs.xml
index a4d92fd..b350241 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,10 +2,7 @@
 <ruleset>
        <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
-               <exclude name="MediaWiki.FunctionComment.Missing.Protected" />
-               <exclude name="MediaWiki.FunctionComment.Missing.Public" />
                <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
-               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cf10f4c6247227906bd5640005717b0d6c73a16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to