From: Umherirrender Date: Sun, 22 Oct 2017 14:44:04 +0000 (+0200) Subject: Remove @codingStandardsIgnore from long lines X-Git-Tag: 1.31.0-rc.0~1698^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=9aa56950c2a83809b17506ad69c2918cd22a0eed;p=lhc%2Fweb%2Fwiklou.git Remove @codingStandardsIgnore from long lines Breaks some line where the ignore is not needed. The sniff was changed upstream to be okay with long unbreakable lines in comments Change-Id: I2bbe2be7cedd4d3c0ce8dc3e62d0e268bc171876 --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index aea441b8aa..edc1a3e7e9 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -125,7 +125,6 @@ class ApiMain extends ApiBase { 'none' => 'ApiFormatNone', ]; - // @codingStandardsIgnoreStart String contenation on "msg" not allowed to break long line /** * List of user roles that are specifically relevant to the API. * [ 'right' => [ 'msg' => 'Some message with a $1', @@ -142,7 +141,6 @@ class ApiMain extends ApiBase { 'params' => [ ApiBase::LIMIT_SML2, ApiBase::LIMIT_BIG2 ] ] ]; - // @codingStandardsIgnoreEnd /** * @var ApiFormatBase diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 899054d6c4..ef67477c66 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -605,14 +605,15 @@ class DifferenceEngine extends ContextSource { $out->addHTML( "

{$revHeader}

\n" ); # Page content may be handled by a hooked call instead... - # @codingStandardsIgnoreStart Ignoring long lines. if ( Hooks::run( 'ArticleContentOnDiff', [ $this, $out ] ) ) { $this->loadNewText(); $out->setRevisionId( $this->mNewid ); $out->setRevisionTimestamp( $this->mNewRev->getTimestamp() ); $out->setArticleFlag( true ); - if ( !Hooks::run( 'ArticleContentViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) { + if ( !Hooks::run( 'ArticleContentViewCustom', + [ $this->mNewContent, $this->mNewPage, $out ] ) + ) { // Handled by extension } else { // Normal page @@ -631,13 +632,14 @@ class DifferenceEngine extends ContextSource { # WikiPage::getParserOutput() should not return false, but just in case if ( $parserOutput ) { // Allow extensions to change parser output here - if ( Hooks::run( 'DifferenceEngineRenderRevisionAddParserOutput', [ $this, $out, $parserOutput, $wikiPage ] ) ) { + if ( Hooks::run( 'DifferenceEngineRenderRevisionAddParserOutput', + [ $this, $out, $parserOutput, $wikiPage ] ) + ) { $out->addParserOutput( $parserOutput ); } } } } - # @codingStandardsIgnoreEnd // Allow extensions to optionally not show the final patrolled link if ( Hooks::run( 'DifferenceEngineRenderRevisionShowFinalPatrolLink' ) ) { diff --git a/includes/http/PhpHttpRequest.php b/includes/http/PhpHttpRequest.php index 0c5d162345..0636314577 100644 --- a/includes/http/PhpHttpRequest.php +++ b/includes/http/PhpHttpRequest.php @@ -47,13 +47,11 @@ class PhpHttpRequest extends MWHttpRequest { if ( $this->caInfo ) { $certLocations = [ 'manual' => $this->caInfo ]; } elseif ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) { - // @codingStandardsIgnoreStart Generic.Files.LineLength // Default locations, based on // https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/ // PHP 5.5 and older doesn't have any defaults, so we try to guess ourselves. // PHP 5.6+ gets the CA location from OpenSSL as long as it is not set manually, // so we should leave capath/cafile empty there. - // @codingStandardsIgnoreEnd $certLocations = array_filter( [ getenv( 'SSL_CERT_DIR' ), getenv( 'SSL_CERT_PATH' ), diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index ab7c5cb72b..b28bb7df77 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -261,19 +261,15 @@ class LogFormatter { $text = wfMessage( 'undeletedarticle' ) ->rawParams( $target )->inContentLanguage()->escaped(); break; - // @codingStandardsIgnoreStart Long line //case 'revision': // Revision deletion //case 'event': // Log deletion // see https://github.com/wikimedia/mediawiki/commit/a9c243b7b5289dad204278dbe7ed571fd914e395 //default: - // @codingStandardsIgnoreEnd } break; case 'patrol': - // @codingStandardsIgnoreStart Long line // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff - // @codingStandardsIgnoreEnd // Create a diff link to the patrolled revision if ( $entry->getSubtype() === 'patrol' ) { $diffLink = htmlspecialchars( diff --git a/includes/shell/Shell.php b/includes/shell/Shell.php index a660a22314..604c96a6ad 100644 --- a/includes/shell/Shell.php +++ b/includes/shell/Shell.php @@ -113,14 +113,12 @@ class Shell { if ( wfIsWindows() ) { // Escaping for an MSVC-style command line parser and CMD.EXE - // @codingStandardsIgnoreStart For long URLs // Refs: // * https://web.archive.org/web/20020708081031/http://mailman.lyra.org/pipermail/scite-interest/2002-March/000436.html // * https://technet.microsoft.com/en-us/library/cc723564.aspx // * T15518 // * CR r63214 // Double the backslashes before any double quotes. Escape the double quotes. - // @codingStandardsIgnoreEnd $tokens = preg_split( '/(\\\\*")/', $arg, -1, PREG_SPLIT_DELIM_CAPTURE ); $arg = ''; $iteration = 0; diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php index fbe92702df..82c35bb881 100644 --- a/includes/tidy/Balancer.php +++ b/includes/tidy/Balancer.php @@ -1669,13 +1669,11 @@ class BalanceActiveFormattingElements { $this->addToNoahList( $b ); } - // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong /** * Reconstruct the active formatting elements. * @param BalanceStack $stack The open elements stack * @see https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements */ - // @codingStandardsIgnoreEnd public function reconstruct( $stack ) { $entry = $this->tail; // If there are no entries in the list of active formatting elements,