Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/295728
Change subject: phpcs: Enable Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore and make pass ...................................................................... phpcs: Enable Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore and make pass Change-Id: I9b645a1ded14cbc799a9e293aef241d1024edbe8 --- M ProofreadPage.body.php M includes/Parser/PagesTagParser.php M includes/page/PageContentBuilder.php M phpcs.xml 4 files changed, 19 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/28/295728/1 diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index 7e2916e..f33a0fd 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -760,7 +760,9 @@ 'text' => wfMessage( 'proofreadpage_image' )->plain() ]; } - } catch ( FileNotFoundException $e ) {} + } + catch ( FileNotFoundException $e ) { + } //Prev, Next and Index links $indexPage = $page->getIndex(); @@ -777,7 +779,9 @@ 'href' => self::getLinkUrlForTitle( $prevTitle ), 'text' => wfMessage( 'proofreadpage_prevpage' )->plain() ]; - } catch ( OutOfBoundsException $e ) {} //if the previous page does not exits + } + catch ( OutOfBoundsException $e ) { + } //if the previous page does not exits try { $nextPage = $pagination->getPage( $pageNumber + 1 ); @@ -787,8 +791,12 @@ 'href' => self::getLinkUrlForTitle( $nextTitle ), 'text' => wfMessage( 'proofreadpage_nextpage' )->plain() ]; - } catch ( OutOfBoundsException $e ) {} //if the next page does not exits - } catch ( PageNotInPaginationException $e ) {} + } + catch ( OutOfBoundsException $e ) { + } //if the next page does not exits + } + catch ( PageNotInPaginationException $e ) { + } $links['namespaces']['proofreadPageIndexLink'] = [ 'class' => ( $skin->skinname === 'vector' ) ? 'icon' : '', diff --git a/includes/Parser/PagesTagParser.php b/includes/Parser/PagesTagParser.php index 72e4201..e6396eb 100644 --- a/includes/Parser/PagesTagParser.php +++ b/includes/Parser/PagesTagParser.php @@ -242,7 +242,9 @@ $firstpage->getArticleID(), $firstpage->getLatestRevID() ); - } catch ( OutOfBoundsException $e ) {} //if the first page does not exists + } + catch ( OutOfBoundsException $e ) { + } //if the first page does not exists } if ( $header ) { diff --git a/includes/page/PageContentBuilder.php b/includes/page/PageContentBuilder.php index e31fa68..3367ebf 100644 --- a/includes/page/PageContentBuilder.php +++ b/includes/page/PageContentBuilder.php @@ -53,7 +53,8 @@ $displayedPageNumber = $pagination->getDisplayedPageNumber( $pageNumber ); $params['pagenum'] = $displayedPageNumber->getFormattedPageNumber( $page->getTitle()->getPageLanguage() ); } catch ( PageNotInPaginationException $e ) { - } catch ( OutOfBoundsException $e ) {} //should not happen + } catch ( OutOfBoundsException $e ) { + } //should not happen $header = $index->replaceVariablesWithIndexEntries( 'header', $params ); $footer = $index->replaceVariablesWithIndexEntries( 'footer', $params ); @@ -77,7 +78,8 @@ $body = preg_replace( "/(\\\\\d*)/", '', $text ); } } - } catch ( FileNotFoundException $e ) {} + } catch ( FileNotFoundException $e ) { + } return new PageContent( new WikitextContent( $header ), diff --git a/phpcs.xml b/phpcs.xml index b7d9bf1..67e7303 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -21,9 +21,6 @@ <rule ref="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment"> <severity>0</severity> </rule> - <rule ref="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"> - <severity>0</severity> - </rule> <file>.</file> <arg name="extensions" value="php" /> <exclude-pattern>node_modules/</exclude-pattern> -- To view, visit https://gerrit.wikimedia.org/r/295728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b645a1ded14cbc799a9e293aef241d1024edbe8 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