Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295729

Change subject: phpcs: Enable 
MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment
 and make pass
......................................................................

phpcs: Enable 
MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment
 and make pass

Change-Id: Ia93304b7e025263adde585d8936d3ac3982f5f48
---
M ProofreadPage.body.php
M ProofreadPage.namespaces.php
M SpecialProofreadPages.php
M includes/FileProvider.php
M includes/Pagination/FilePagination.php
M includes/Pagination/PageList.php
M includes/Pagination/Pagination.php
M includes/Pagination/PaginationFactory.php
M includes/Parser/PagelistTagParser.php
M includes/Parser/PagesTagParser.php
M includes/ProofreadPageInit.php
M includes/index/EditProofreadIndexPage.php
M includes/index/ProofreadIndexDbConnector.php
M includes/index/ProofreadIndexPage.php
M includes/index/ProofreadIndexValue.php
M includes/index/oai/SpecialProofreadIndexOai.php
M includes/page/EditPagePage.php
M includes/page/PageContent.php
M includes/page/PageContentBuilder.php
M includes/page/PageViewAction.php
M phpcs.xml
M tests/includes/page/PageContentTest.php
22 files changed, 54 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/29/295729/1

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index f33a0fd..7073a8f 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -103,7 +103,7 @@
         * @return boolean hook return value
         */
        public static function onCustomEditor( Article $article, User $user ) {
-               if ( $article->getTitle()->inNamespace( 
self::getIndexNamespaceId() ) ) { //TODO ExternalEditor case
+               if ( $article->getTitle()->inNamespace( 
self::getIndexNamespaceId() ) ) { // TODO ExternalEditor case
                        $editor = new EditProofreadIndexPage( $article );
                        $editor->edit();
                        return false;
@@ -311,7 +311,7 @@
                $title = $article->getTitle();
 
                // if it's an index, update pr_index table
-               if ( $title->inNamespace( ProofreadPage::getIndexNamespaceId() 
) ) {    //Move this part to EditProofreadIndexPage
+               if ( $title->inNamespace( ProofreadPage::getIndexNamespaceId() 
) ) {    // Move this part to EditProofreadIndexPage
                        ProofreadPage::updatePrIndex( $article );
                        return true;
                }
@@ -661,14 +661,14 @@
         */
        public static function onGetPreferences( $user, &$preferences ) {
 
-               //Show header and footer fields when editing in the Page 
namespace
+               // Show header and footer fields when editing in the Page 
namespace
                $preferences['proofreadpage-showheaders'] = [
                        'type'           => 'toggle',
                        'label-message'  => 
'proofreadpage-preferences-showheaders-label',
                        'section'        => 'editing/advancedediting',
                ];
 
-               //Use horizontal layout when editing in the Page namespace
+               // Use horizontal layout when editing in the Page namespace
                $preferences['proofreadpage-horizontal-layout'] = [
                        'type'           => 'toggle',
                        'label-message'  => 
'proofreadpage-preferences-horizontal-layout-label',
@@ -701,7 +701,7 @@
 
                $updater->addExtensionTable( 'pr_index', $dir . 
'ProofreadIndex.sql', true );
 
-               //fix issue with content type hardcoded in database
+               // fix issue with content type hardcoded in database
                if ( isset( $wgContentHandlerUseDB ) && $wgContentHandlerUseDB 
) {
                        $updater->addPostDatabaseUpdateMaintenance( 
'FixProofreadPagePagesContentModel' );
                }
@@ -731,7 +731,7 @@
                }
                $page = ProofreadPagePage::newFromTitle( $title );
 
-               //Image link
+               // Image link
                try {
                        $image = 
Context::getDefaultContext()->getFileProvider()->getForPagePage( $page );
                        $imageUrl = null;
@@ -749,7 +749,7 @@
                                        $imageUrl = $image->getThumbUrl( 
$thumbName );
                                }
                        } else {
-                               //The thumb returned is invalid for not 
multipage pages when the width requested is the image width
+                               // The thumb returned is invalid for not 
multipage pages when the width requested is the image width
                                $imageUrl = $image->getViewURL();
                        }
 
@@ -764,7 +764,7 @@
                catch ( FileNotFoundException $e ) {
         }
 
-               //Prev, Next and Index links
+               // Prev, Next and Index links
                $indexPage = $page->getIndex();
                if ( $indexPage ) {
                        $pagination = 
Context::getDefaultContext()->getPaginationFactory()->getPaginationForIndexPage(
 $indexPage );
@@ -781,7 +781,7 @@
                                        ];
                                }
                                catch ( OutOfBoundsException $e ) {
-          } //if the previous page does not exits
+          } // if the previous page does not exits
 
                                try {
                                        $nextPage  = $pagination->getPage( 
$pageNumber + 1 );
@@ -793,7 +793,7 @@
                                        ];
                                }
                                catch ( OutOfBoundsException $e ) {
-          } //if the next page does not exits
+          } // if the next page does not exits
                        }
                        catch ( PageNotInPaginationException $e ) {
          }
diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index cb8571b..b9c6cfc 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -6,7 +6,7 @@
  * @ingroup Extensions
  */
 
-global $proofreadPageNamespacesNames; //needed in order to be used inside of 
ProofreadPageInit
+global $proofreadPageNamespacesNames; // needed in order to be used inside of 
ProofreadPageInit
 $proofreadPageNamespacesNames = [];
 
 /** English (English) */
diff --git a/SpecialProofreadPages.php b/SpecialProofreadPages.php
index bfa95d1..12eb0e0 100644
--- a/SpecialProofreadPages.php
+++ b/SpecialProofreadPages.php
@@ -97,7 +97,7 @@
 
        function reallyDoQuery( $limit, $offset = false ) {
                $count = count( $this->searchList );
-               if ( $count > $this->limit ) { //Delete the last item to avoid 
the sort done by reallyDoQuery move it to another position than the last
+               if ( $count > $this->limit ) { // Delete the last item to avoid 
the sort done by reallyDoQuery move it to another position than the last
                        $this->addOne = true;
                        unset( $this->searchList[ $count - 1 ] );
                }
@@ -111,7 +111,7 @@
 
        function preprocessResults( $dbr, $res ) {
                if ( $this->addOne !== null ) {
-                       $this->numRows++; //there is a deleted item
+                       $this->numRows++; // there is a deleted item
                }
        }
 
diff --git a/includes/FileProvider.php b/includes/FileProvider.php
index 0567d8d..ea55570 100644
--- a/includes/FileProvider.php
+++ b/includes/FileProvider.php
@@ -57,9 +57,9 @@
         * @throws FileNotFoundException
         */
        public function getForPagePage( ProofreadPagePage $page ) {
-               //try to get an image with the same name as the file
+               // try to get an image with the same name as the file
                return $this->getFileFromTitle(
-                       Title::makeTitle( NS_IMAGE, strtok( 
$page->getTitle()->getText(), '/' ) ) //use the base name as file name
+                       Title::makeTitle( NS_IMAGE, strtok( 
$page->getTitle()->getText(), '/' ) ) // use the base name as file name
                );
        }
 }
diff --git a/includes/Pagination/FilePagination.php 
b/includes/Pagination/FilePagination.php
index 97a3add..0f959a5 100644
--- a/includes/Pagination/FilePagination.php
+++ b/includes/Pagination/FilePagination.php
@@ -105,7 +105,7 @@
                $i18nNumber = 
$this->index->getTitle()->getPageLanguage()->formatNum( $pageNumber, true );
                $title = $this->buildPageTitleFromPageNumber( $i18nNumber );
 
-               //fallback to arabic number
+               // fallback to arabic number
                if ( $i18nNumber !== $pageNumber && !$title->exists() ) {
                        $arabicTitle = $this->buildPageTitleFromPageNumber( 
$pageNumber );
                        if ( $arabicTitle->exists() ) {
diff --git a/includes/Pagination/PageList.php b/includes/Pagination/PageList.php
index 63a591b..e1dc4c8 100644
--- a/includes/Pagination/PageList.php
+++ b/includes/Pagination/PageList.php
@@ -47,7 +47,7 @@
         * @return PageNumber
         */
        private function buildNumber( $pageNumber ) {
-               $mode = PageNumber::DISPLAY_NORMAL; //default mode
+               $mode = PageNumber::DISPLAY_NORMAL; // default mode
                $offset = 0;
                $displayedpageNumber = '';
                $isEmpty = false;
diff --git a/includes/Pagination/Pagination.php 
b/includes/Pagination/Pagination.php
index bd629dc..6ee77b0 100644
--- a/includes/Pagination/Pagination.php
+++ b/includes/Pagination/Pagination.php
@@ -86,7 +86,7 @@
         * @see Iterator::rewind
         */
        public function rewind() {
-               $this->position = 1; //pages numbers starts with 1
+               $this->position = 1; // pages numbers starts with 1
        }
 
        /**
diff --git a/includes/Pagination/PaginationFactory.php 
b/includes/Pagination/PaginationFactory.php
index d8ba32d..834723d 100644
--- a/includes/Pagination/PaginationFactory.php
+++ b/includes/Pagination/PaginationFactory.php
@@ -51,7 +51,7 @@
                        $file = false;
                }
 
-               //check if it is using pagelist
+               // check if it is using pagelist
                $pagelist = $indexPage->getPagelistTagContent();
                if ( $pagelist !== null && $file && $file->isMultipage() ) {
                        return new FilePagination(
diff --git a/includes/Parser/PagelistTagParser.php 
b/includes/Parser/PagelistTagParser.php
index 309bb75..76d1117 100644
--- a/includes/Parser/PagelistTagParser.php
+++ b/includes/Parser/PagelistTagParser.php
@@ -75,7 +75,7 @@
                        if ( $pageNumber->isEmpty() || !$title ) {
                                $return .= $view . ' ';
                        } else {
-                               $return .= '[[' . $pageTitle->getPrefixedText() 
. '|' . $view . ']] '; //TODO: use linker?
+                               $return .= '[[' . $pageTitle->getPrefixedText() 
. '|' . $view . ']] '; // TODO: use linker?
                        }
                }
 
diff --git a/includes/Parser/PagesTagParser.php 
b/includes/Parser/PagesTagParser.php
index e6396eb..7f90117 100644
--- a/includes/Parser/PagesTagParser.php
+++ b/includes/Parser/PagesTagParser.php
@@ -88,7 +88,7 @@
 
                                $pagenums = [];
 
-                               //add page selected with $include in pagenums
+                               // add page selected with $include in pagenums
                                if ( $include ) {
                                        $list = $this->parseNumList( $include );
                                        if ( $list  == null ) {
@@ -97,7 +97,7 @@
                                        $pagenums = $list;
                                }
 
-                               //ad pages selected with from and to in pagenums
+                               // ad pages selected with from and to in 
pagenums
                                if ( $from || $to ) {
                                        if ( !$from ) {
                                                $from = 1;
@@ -118,7 +118,7 @@
                                        }
                                }
 
-                               //remove excluded pages form $pagenums
+                               // remove excluded pages form $pagenums
                                if ( $exclude ) {
                                        $excluded = $this->parseNumList( 
$exclude );
                                        if ( $excluded  == null ) {
@@ -131,12 +131,12 @@
                                        return $this->formatError( 
'proofreadpage_interval_too_large' );
                                }
 
-                               ksort( $pagenums ); //we must sort the array 
even if the numerical keys are in a good order.
+                               ksort( $pagenums ); // we must sort the array 
even if the numerical keys are in a good order.
                                if ( end( $pagenums ) > $count ) {
                                        return $this->formatError( 
'proofreadpage_invalid_interval' );
                                }
 
-                               //Create the list of pages to translude. the 
step system start with the smaller pagenum
+                               // Create the list of pages to translude. the 
step system start with the smaller pagenum
                                $mod = reset( $pagenums ) % $step;
                                foreach ( $pagenums as $num ) {
                                        if ( $step == 1 || $num % $step == $mod 
) {
@@ -244,7 +244,7 @@
                                );
                        }
                        catch ( OutOfBoundsException $e ) {
-         } //if the first page does not exists
+         } // if the first page does not exists
                }
 
                if ( $header ) {
diff --git a/includes/ProofreadPageInit.php b/includes/ProofreadPageInit.php
index 96a2e63..dadf817 100644
--- a/includes/ProofreadPageInit.php
+++ b/includes/ProofreadPageInit.php
@@ -44,14 +44,14 @@
                        if ( !isset( 
$wgExtraNamespaces[$wgProofreadPageNamespaceIds[$key]] ) ) {
                                self::createNamespace( 
$wgProofreadPageNamespaceIds[$key], $key );
                        }
-               } else { //try to find if a namespace with a known name is set 
(for backward compatibility)
+               } else { // try to find if a namespace with a known name is set 
(for backward compatibility)
                        $id = self::getNamespaceIdForDefaultName( $key );
                        if ( $id !== false ) {
                                $wgProofreadPageNamespaceIds[$key] = $id;
                        } else {
                                if ( self::createNamespace( 
self::$defaultNamespaceIds[$key], $key ) ) {
                                        $wgProofreadPageNamespaceIds[$key] = 
self::$defaultNamespaceIds[$key];
-                               } //else: the relevant error message is output 
by getNamespaceId
+                               } // else: the relevant error message is output 
by getNamespaceId
                        }
                }
 
@@ -93,7 +93,7 @@
 
                $wgExtraNamespaces[$id] = self::getNamespaceName( $key );
                $wgExtraNamespaces[$id + 1] = self::getNamespaceName( $key . 
'_talk' );
-               $wgCanonicalNamespaceNames[$id] = $wgExtraNamespaces[$id]; 
//Very hugly but needed because initNamespaces() is called after the add of 
$wgExtraNamespaces into $wgCanonicalNamespaceNames
+               $wgCanonicalNamespaceNames[$id] = $wgExtraNamespaces[$id]; // 
Very hugly but needed because initNamespaces() is called after the add of 
$wgExtraNamespaces into $wgCanonicalNamespaceNames
                $wgCanonicalNamespaceNames[$id + 1] = $wgExtraNamespaces[$id + 
1];
 
                return true;
@@ -128,7 +128,7 @@
                global $wgProofreadPageNamespaceIds;
 
                if ( !isset( $wgProofreadPageNamespaceIds[$key] ) ) {
-                       die( 'Namespace with id ' . 
self::$defaultNamespaceIds[$key] . ' is already set ! ProofreadPage can\'t use 
his id in order to create ' . self::getNamespaceName( $key, 'en' ) . ' 
namespace. Update your LocalSettings.php adding $wgProofreadPageNamespaceIds[' 
. $key . '] = /* NUMERICAL ID OF THE ' . self::getNamespaceName( $key, 'en' ) . 
' NAMESPACE */; AFTER the inclusion of Proofread Page' ); //The only case where 
$wgProofreadPageNamespaceIds is not set is when a namespace with the default id 
already exist and is not a prp namespace.
+                       die( 'Namespace with id ' . 
self::$defaultNamespaceIds[$key] . ' is already set ! ProofreadPage can\'t use 
his id in order to create ' . self::getNamespaceName( $key, 'en' ) . ' 
namespace. Update your LocalSettings.php adding $wgProofreadPageNamespaceIds[' 
. $key . '] = /* NUMERICAL ID OF THE ' . self::getNamespaceName( $key, 'en' ) . 
' NAMESPACE */; AFTER the inclusion of Proofread Page' ); // The only case 
where $wgProofreadPageNamespaceIds is not set is when a namespace with the 
default id already exist and is not a prp namespace.
                }
 
                return $wgProofreadPageNamespaceIds[$key];
diff --git a/includes/index/EditProofreadIndexPage.php 
b/includes/index/EditProofreadIndexPage.php
index 4143822..ac69e63 100644
--- a/includes/index/EditProofreadIndexPage.php
+++ b/includes/index/EditProofreadIndexPage.php
@@ -88,7 +88,7 @@
                        foreach ( $values as $value => $label ) {
                                $select->addOption( $label, $value );
                        }
-                       if ( !isset( $values[$val] ) && $val !== '' ) { 
//compatiblity with already set data that aren't in the list
+                       if ( !isset( $values[$val] ) && $val !== '' ) { // 
compatiblity with already set data that aren't in the list
                                $select->addOption( $val, $val );
                        }
                        $out->addHTML( $select->getHtml() );
@@ -188,7 +188,7 @@
        function internalAttemptSave( &$result, $bot = false ) {
                $index = new ProofreadIndexPage( $this->mTitle, 
ProofreadIndexPage::getDataConfig(), $this->textbox1 );
 
-               //Get list of pages titles
+               // Get list of pages titles
                $links = $index->getLinksToPageNamespace();
                $linksTitle = [];
                foreach ( $links as $link ) {
diff --git a/includes/index/ProofreadIndexDbConnector.php 
b/includes/index/ProofreadIndexDbConnector.php
index bf41376..7b02dcf 100644
--- a/includes/index/ProofreadIndexDbConnector.php
+++ b/includes/index/ProofreadIndexDbConnector.php
@@ -54,7 +54,7 @@
                $n3 = $x->pr_q3;
                $n4 = $x->pr_q4;
 
-               if ( isset( $article->new_q ) ) { //new_q is undefined in 
parser tests
+               if ( isset( $article->new_q ) ) { // new_q is undefined in 
parser tests
                        switch ( $article->new_q ) {
                                case 0:
                                        $n0++;
@@ -73,7 +73,7 @@
                                        break;
                        }
                }
-               if ( isset( $article->old_q ) ) { //old_q is undefined in 
parser tests
+               if ( isset( $article->old_q ) ) { // old_q is undefined in 
parser tests
                        switch ( $article->old_q ) {
                                case 0:
                                        $n0--;
diff --git a/includes/index/ProofreadIndexPage.php 
b/includes/index/ProofreadIndexPage.php
index af17a0c..62d4372 100644
--- a/includes/index/ProofreadIndexPage.php
+++ b/includes/index/ProofreadIndexPage.php
@@ -362,7 +362,7 @@
                        return null;
                }
 
-               //we can't use the parser here because it replace tags like 
<references /> by strange UIDs
+               // we can't use the parser here because it replace tags like 
<references /> by strange UIDs
                $params = $this->getIndexEntriesForHeaderAsTemplateParams() + 
$otherParams;
                return preg_replace_callback( '/{\{\{(.*)(\|(.*))?\}\}\}/U', 
function( $matches ) use ( $params ) {
                        $paramKey = trim( strtolower( $matches[1] ) );
diff --git a/includes/index/ProofreadIndexValue.php 
b/includes/index/ProofreadIndexValue.php
index 0c0f709..c59f230 100644
--- a/includes/index/ProofreadIndexValue.php
+++ b/includes/index/ProofreadIndexValue.php
@@ -141,7 +141,7 @@
         * Return the value of the entry as string
         * @return string
         */
-       public function __toString() { //TODO improve by removing all tags.
+       public function __toString() { // TODO improve by removing all tags.
                if ( $this->value !== null ) {
                        return $this->value;
                }
@@ -641,7 +641,7 @@
         * Return the value of the entry as URI
         * @return string
         */
-       public function getUri() { //TODO add the canonical NMA
+       public function getUri() { // TODO add the canonical NMA
                if ( $this->naan ) {
                        return 'ark:/' . $this->naan . '/' . $this->value;
                } else {
@@ -662,7 +662,7 @@
         * @param string $value
         * @return bool
         */
-       public function isValid( $value ) { //TODO to improve
+       public function isValid( $value ) { // TODO to improve
                if ( $this->naan ) {
                        return true;
                } else {
diff --git a/includes/index/oai/SpecialProofreadIndexOai.php 
b/includes/index/oai/SpecialProofreadIndexOai.php
index dd1bf6b..4ccfe07 100644
--- a/includes/index/oai/SpecialProofreadIndexOai.php
+++ b/includes/index/oai/SpecialProofreadIndexOai.php
@@ -420,7 +420,7 @@
         * Output the ListSets action
         */
        protected function listSets() {
-               //try if the page exist (required by specification)
+               // try if the page exist (required by specification)
                if ( !ProofreadIndexOaiSets::withSets() ) {
                        throw new ProofreadIndexOaiError( "This repository 
doesn't support sets.", 'noSetHierarchy' );
                }
@@ -452,7 +452,7 @@
         * Output the ListMetadataFormats action
         */
        protected function listMetadataFormats() {
-               //try if the page exist (required by specification)
+               // try if the page exist (required by specification)
                if ( isset( $this->request['identifier'] ) ) {
                        $page = $this->getRecordPage( 
$this->request['identifier'] );
                }
@@ -677,7 +677,7 @@
                if ( isset( $nextToken ) ) {
                        $cursor = isset( $startToken['cursor'] ) ? 
$startToken['cursor'] : 0;
                        echo Xml::element( 'resumptionToken', [ 'cursor' => 
$cursor ], $nextToken ) . "\n";
-               } //TODO Add <resumptionToken completeListSize="6" cursor="4"/> 
http://www.openarchives.org/OAI/openarchivesprotocol.html#ListIdentifiers
+               } // TODO Add <resumptionToken completeListSize="6" 
cursor="4"/> 
http://www.openarchives.org/OAI/openarchivesprotocol.html#ListIdentifiers
                echo Xml::closeElement( $verb ) . "\n";
        }
 
diff --git a/includes/page/EditPagePage.php b/includes/page/EditPagePage.php
index 6047f30..86dfcc0 100644
--- a/includes/page/EditPagePage.php
+++ b/includes/page/EditPagePage.php
@@ -77,7 +77,7 @@
        protected function showContentForm() {
                $out = $this->mArticle->getContext()->getOutput();
 
-               //custom CSS for preview
+               // custom CSS for preview
                $css = $this->pagePage->getCustomCss();
                if ( $css !== '' ) {
                        $out->addInlineStyle( $css );
@@ -112,7 +112,7 @@
                        $content->getFooter()->serialize(),
                        $inputAttributes + [ 'rows' => '2', 'tabindex' => '1' ]
                );
-               //the 3 textarea tabindex are set to 1 because summary tabindex 
is 1 too
+               // the 3 textarea tabindex are set to 1 because summary 
tabindex is 1 too
                $out->addHTML( $this->pagePage->getPageContainerEnd() );
 
                $out->addModules( 'ext.proofreadpage.page.edit' );
diff --git a/includes/page/PageContent.php b/includes/page/PageContent.php
index ed2c266..cbd67ab 100644
--- a/includes/page/PageContent.php
+++ b/includes/page/PageContent.php
@@ -225,7 +225,7 @@
                        $options = 
$this->getContentHandler()->makeParserOptions( 'canonical' );
                }
 
-               //create content
+               // create content
                $wikitextContent = new WikitextContent(
                        $this->header->getNativeData() . "\n\n" . 
$this->body->getNativeData() . $this->footer->getNativeData()
                );
@@ -239,7 +239,7 @@
                );
 
 
-               //html container
+               // html container
                $html = Html::openElement( 'div', [ 'class' => 
'prp-page-qualityheader quality' . $this->level->getLevel() ] ) .
                        wfMessage( 'proofreadpage_quality' . 
$this->level->getLevel() . '_message' )->inContentLanguage()->parse() .
                        Html::closeElement( 'div' ) .
@@ -248,10 +248,10 @@
                        Html::closeElement( 'div' );
                $parserOutput->setText( $html );
 
-               //add modules
+               // add modules
                $parserOutput->addModuleStyles( 'ext.proofreadpage.base' );
 
-               //add scan image to dependencies
+               // add scan image to dependencies
                $parserOutput->addImage( strtok( $title->getDBkey(), '/' ) );
 
                return $parserOutput;
diff --git a/includes/page/PageContentBuilder.php 
b/includes/page/PageContentBuilder.php
index 3367ebf..9b8c5e8 100644
--- a/includes/page/PageContentBuilder.php
+++ b/includes/page/PageContentBuilder.php
@@ -44,7 +44,7 @@
                $index = $page->getIndex();
                $body = '';
 
-               //default header and footer
+               // default header and footer
                if ( $index ) {
                        $params = [];
                        try {
@@ -54,7 +54,7 @@
                                $params['pagenum'] = 
$displayedPageNumber->getFormattedPageNumber( 
$page->getTitle()->getPageLanguage() );
                        } catch ( PageNotInPaginationException $e ) {
                        } catch ( OutOfBoundsException $e ) {
-         } //should not happen
+         } // should not happen
 
                        $header = $index->replaceVariablesWithIndexEntries( 
'header', $params );
                        $footer = $index->replaceVariablesWithIndexEntries( 
'footer', $params );
@@ -63,7 +63,7 @@
                        $footer = $this->contextSource->msg( 
'proofreadpage_default_footer' )->inContentLanguage()->plain();
                }
 
-               //Extract text layer
+               // Extract text layer
                try {
                        $image = 
$this->context->getFileProvider()->getForPagePage( $page );
                        $pageNumber = $page->getPageNumber();
diff --git a/includes/page/PageViewAction.php b/includes/page/PageViewAction.php
index 867b23c..80a0f0c 100644
--- a/includes/page/PageViewAction.php
+++ b/includes/page/PageViewAction.php
@@ -37,12 +37,12 @@
                $page = ProofreadPagePage::newFromTitle( $wikiPage->getTitle() 
);
                $out = $this->getOutput();
 
-               //render HTML
+               // render HTML
                $out->addHTML( $page->getPageContainerBegin() );
                $this->page->view();
                $out->addHTML( $page->getPageContainerEnd() );
 
-               //add modules
+               // add modules
                $out->addModules( 'ext.proofreadpage.page' );
                $out->addModuleStyles( [
                        'ext.proofreadpage.base', 'ext.proofreadpage.page'
@@ -51,7 +51,7 @@
                        'prpPageQuality' => $content->getLevel()->getLevel()
                ] );
 
-               //custom CSS
+               // custom CSS
                $css = $page->getCustomCss();
                if ( $css !== '' ) {
                        $out->addInlineStyle( $css );
diff --git a/phpcs.xml b/phpcs.xml
index 67e7303..66c6ac8 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -18,9 +18,6 @@
        <rule ref="MediaWiki.WhiteSpace.MultipleEmptyLines.MultipleEmptyLines">
                <severity>0</severity>
        </rule>
-       <rule 
ref="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment">
-               <severity>0</severity>
-       </rule>
        <file>.</file>
        <arg name="extensions" value="php" />
        <exclude-pattern>node_modules/</exclude-pattern>
diff --git a/tests/includes/page/PageContentTest.php 
b/tests/includes/page/PageContentTest.php
index 2dd56dd..16087ad 100644
--- a/tests/includes/page/PageContentTest.php
+++ b/tests/includes/page/PageContentTest.php
@@ -220,7 +220,7 @@
 
                $content = self::newContent( '', 'RRRR' );
                $newContent = $content->updateRedirect( $title );
-               $this->assertEquals( $content, $newContent ); //no update
+               $this->assertEquals( $content, $newContent ); // no update
 
                $content = self::newContent( '', '#REDIRECT [[Test]]' );
                $newContent = $content->updateRedirect( $title );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia93304b7e025263adde585d8936d3ac3982f5f48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

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

Reply via email to