This run took 22 seconds.
From 33b2854598927100ad4002afe6d08a0b4fe6ec22 Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Mon, 18 Nov 2024 00:12:40 +0000 Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 The following sniffs now pass and were enabled: * Generic.WhiteSpace.ScopeIndent.IncorrectExact Change-Id: Ia1939194d0fb3eef80f788dd2311ee844d2b10f6 --- .phpcs.xml | 1 - composer.json | 2 +- shared/Page.php | 6 +-- shared/WikimediaUiThemePageBase.php | 64 ++++++++++++++--------------- 4 files changed, 36 insertions(+), 37 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index f0e532c..fcab13a 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,7 +2,6 @@ <ruleset> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <exclude name="Generic.Files.LineLength.TooLong"/> - <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate"/> <exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate"/> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected"/> diff --git a/composer.json b/composer.json index 7280a9d..fdf7b84 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "ext-simplexml": "*" }, "require-dev": { - "mediawiki/mediawiki-codesniffer": "44.0.0", + "mediawiki/mediawiki-codesniffer": "45.0.0", "mediawiki/mediawiki-phan-config": "0.14.0", "php-parallel-lint/php-parallel-lint": "1.4.0", "phpunit/phpunit": "9.6.16" diff --git a/shared/Page.php b/shared/Page.php index ae03003..2e47fa8 100644 --- a/shared/Page.php +++ b/shared/Page.php @@ -182,9 +182,9 @@ class Page { <a role="banner" href="/" title="Navigate to home of <?php echo htmlentities( $this->site ); ?>"><?php echo htmlentities( $this->site ); ?></a> <main role="main"> <?php - if ( $this->pageName ) { - echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; - } +if ( $this->pageName ) { + echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; +} echo '<article>' . $this->content . '</article>'; ?> </main> diff --git a/shared/WikimediaUiThemePageBase.php b/shared/WikimediaUiThemePageBase.php index 9ee2065..b9c76b8 100644 --- a/shared/WikimediaUiThemePageBase.php +++ b/shared/WikimediaUiThemePageBase.php @@ -20,21 +20,21 @@ class WikimediaUiThemePageBase extends Page { <head> <meta charset="utf-8"> <title><?php - if ( $this->pageName ) { - echo htmlentities( "$this->pageName - $this->org $this->site" ); - } else { - echo htmlentities( "$this->org $this->site" ); - } +if ( $this->pageName ) { + echo htmlentities( "$this->pageName - $this->org $this->site" ); +} else { + echo htmlentities( "$this->org $this->site" ); +} ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="/favicon.ico"> <?php - foreach ( $this->stylesheets as $stylesheet ) { - echo '<link rel="stylesheet" href="' . htmlspecialchars( $stylesheet ) . '">' . "\n"; - } - if ( count( $this->embeddedCSS ) ) { - echo "<style>\n" . implode( "\n", $this->embeddedCSS ) . "\n</style>\n"; - } +foreach ( $this->stylesheets as $stylesheet ) { + echo '<link rel="stylesheet" href="' . htmlspecialchars( $stylesheet ) . '">' . "\n"; +} +if ( count( $this->embeddedCSS ) ) { + echo "<style>\n" . implode( "\n", $this->embeddedCSS ) . "\n</style>\n"; +} ?> </head> <body> @@ -49,27 +49,27 @@ class WikimediaUiThemePageBase extends Page { <main role="main"><div class="wm-container"> <nav class="wm-site-nav"><ul class="wm-nav"> <?php - foreach ( $this->getNavItems() as $href => $text ) { - $isActive = $this->isNavActive( $href ); - $subItems = $isActive ? $this->getSubnavItems() : []; +foreach ( $this->getNavItems() as $href => $text ) { + $isActive = $this->isNavActive( $href ); + $subItems = $isActive ? $this->getSubnavItems() : []; - $attr = $isActive ? ' class="wm-nav-item-active"' : ''; - echo "<li>" . '<a href="' . htmlspecialchars( $href ) . '"' . $attr . '>' . htmlspecialchars( $text ) . '</a>'; - if ( $subItems ) { - echo '<ul>'; - foreach ( $subItems as $subHref => $subText ) { - echo '<li><a href="' . htmlspecialchars( $subHref ) . '">' . htmlspecialchars( $subText ) . '</a>'; - } - echo '</ul>'; + $attr = $isActive ? ' class="wm-nav-item-active"' : ''; + echo "<li>" . '<a href="' . htmlspecialchars( $href ) . '"' . $attr . '>' . htmlspecialchars( $text ) . '</a>'; + if ( $subItems ) { + echo '<ul>'; + foreach ( $subItems as $subHref => $subText ) { + echo '<li><a href="' . htmlspecialchars( $subHref ) . '">' . htmlspecialchars( $subText ) . '</a>'; } - echo '</li>'; + echo '</ul>'; } + echo '</li>'; +} ?> </ul></nav> <article><?php - if ( $this->pageName ) { - echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; - } +if ( $this->pageName ) { + echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; +} $this->renderContent(); ?></article> </div></main> @@ -77,17 +77,17 @@ class WikimediaUiThemePageBase extends Page { <p class="wm-modified">Modified: <?php echo date( DateTimeInterface::ATOM ); ?> </p> <nav role="navigation"><ul> <?php - foreach ( $this->getFooterItems() as $href => $text ) { - echo '<li><a href="' . htmlspecialchars( $href ) . '">' . htmlspecialchars( $text ) . '</a></li>'; - } +foreach ( $this->getFooterItems() as $href => $text ) { + echo '<li><a href="' . htmlspecialchars( $href ) . '">' . htmlspecialchars( $text ) . '</a></li>'; +} ?> </ul></nav> <a class="wm-link--powered" href="https://www.wikimedia.org">A Wikimedia Foundation project</a> </div></footer> <?php - foreach ( $this->scripts as $script ) { - echo '<script defer src="' . htmlspecialchars( $script ) . '"></script>' . "\n"; - } +foreach ( $this->scripts as $script ) { + echo '<script defer src="' . htmlspecialchars( $script ) . '"></script>' . "\n"; +} ?> </body> </html> -- 2.39.2
$ date --- stdout --- Mon Nov 18 00:12:25 UTC 2024 --- end --- $ git clone file:///srv/git/integration-docroot.git repo --depth=1 -b master --- stderr --- Cloning into 'repo'... --- stdout --- --- end --- $ git config user.name libraryupgrader --- stdout --- --- end --- $ git config user.email tools.libraryupgrader@tools.wmflabs.org --- stdout --- --- end --- $ git submodule update --init --- stdout --- --- end --- $ grr init --- stdout --- Installed commit-msg hook. --- end --- $ git show-ref refs/heads/master --- stdout --- 0b0348888223a156965c560a174eda33c24f7a92 refs/heads/master --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": {}, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 0, "high": 0, "critical": 0, "total": 0 }, "dependencies": { "prod": 1, "dev": 240, "optional": 0, "peer": 1, "peerOptional": 0, "total": 240 } } } --- end --- $ /usr/bin/composer install --- stderr --- No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information. Loading composer repositories with package information Updating dependencies Lock file operations: 63 installs, 0 updates, 0 removals - Locking composer/pcre (3.3.2) - Locking composer/semver (3.4.2) - Locking composer/spdx-licenses (1.5.8) - Locking composer/xdebug-handler (3.0.5) - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0) - Locking doctrine/deprecations (1.1.3) - Locking doctrine/instantiator (2.0.0) - Locking felixfbecker/advanced-json-rpc (v3.2.1) - Locking mediawiki/mediawiki-codesniffer (v44.0.0) - Locking mediawiki/mediawiki-phan-config (0.14.0) - Locking mediawiki/phan-taint-check-plugin (6.0.0) - Locking microsoft/tolerant-php-parser (v0.1.2) - Locking myclabs/deep-copy (1.12.1) - Locking netresearch/jsonmapper (v4.5.0) - Locking nikic/php-parser (v5.3.1) - Locking phan/phan (5.4.3) - Locking phar-io/manifest (2.0.4) - Locking phar-io/version (3.2.1) - Locking php-parallel-lint/php-parallel-lint (v1.4.0) - Locking phpcsstandards/phpcsextra (1.2.1) - Locking phpcsstandards/phpcsutils (1.0.11) - Locking phpdocumentor/reflection-common (2.2.0) - Locking phpdocumentor/reflection-docblock (5.6.0) - Locking phpdocumentor/type-resolver (1.10.0) - Locking phpstan/phpdoc-parser (2.0.0) - Locking phpunit/php-code-coverage (9.2.32) - Locking phpunit/php-file-iterator (3.0.6) - Locking phpunit/php-invoker (3.1.1) - Locking phpunit/php-text-template (2.0.4) - Locking phpunit/php-timer (5.0.3) - Locking phpunit/phpunit (9.6.16) - Locking psr/container (2.0.2) - Locking psr/log (3.0.2) - Locking sabre/event (5.1.7) - Locking sebastian/cli-parser (1.0.2) - Locking sebastian/code-unit (1.0.8) - Locking sebastian/code-unit-reverse-lookup (2.0.3) - Locking sebastian/comparator (4.0.8) - Locking sebastian/complexity (2.0.3) - Locking sebastian/diff (4.0.6) - Locking sebastian/environment (5.1.5) - Locking sebastian/exporter (4.0.6) - Locking sebastian/global-state (5.0.7) - Locking sebastian/lines-of-code (1.0.4) - Locking sebastian/object-enumerator (4.0.4) - Locking sebastian/object-reflector (2.0.4) - Locking sebastian/recursion-context (4.0.5) - Locking sebastian/resource-operations (3.0.4) - Locking sebastian/type (3.2.1) - Locking sebastian/version (3.0.2) - Locking squizlabs/php_codesniffer (3.9.0) - Locking symfony/console (v7.1.8) - Locking symfony/deprecation-contracts (v3.5.0) - Locking symfony/polyfill-ctype (v1.31.0) - Locking symfony/polyfill-intl-grapheme (v1.31.0) - Locking symfony/polyfill-intl-normalizer (v1.31.0) - Locking symfony/polyfill-mbstring (v1.31.0) - Locking symfony/polyfill-php80 (v1.31.0) - Locking symfony/service-contracts (v3.5.0) - Locking symfony/string (v7.1.8) - Locking theseer/tokenizer (1.2.3) - Locking tysonandre/var_representation_polyfill (0.1.3) - Locking webmozart/assert (1.11.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 63 installs, 0 updates, 0 removals 0 [>---------------------------] 0 [->--------------------------] - Installing squizlabs/php_codesniffer (3.9.0): Extracting archive - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive - Installing composer/pcre (3.3.2): Extracting archive - Installing symfony/polyfill-php80 (v1.31.0): Extracting archive - Installing phpcsstandards/phpcsutils (1.0.11): Extracting archive - Installing phpcsstandards/phpcsextra (1.2.1): Extracting archive - Installing symfony/polyfill-mbstring (v1.31.0): Extracting archive - Installing composer/spdx-licenses (1.5.8): Extracting archive - Installing composer/semver (3.4.2): Extracting archive - Installing mediawiki/mediawiki-codesniffer (v44.0.0): Extracting archive - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive - Installing symfony/polyfill-intl-normalizer (v1.31.0): Extracting archive - Installing symfony/polyfill-intl-grapheme (v1.31.0): Extracting archive - Installing symfony/polyfill-ctype (v1.31.0): Extracting archive - Installing symfony/string (v7.1.8): Extracting archive - Installing symfony/deprecation-contracts (v3.5.0): Extracting archive - Installing psr/container (2.0.2): Extracting archive - Installing symfony/service-contracts (v3.5.0): Extracting archive - Installing symfony/console (v7.1.8): Extracting archive - Installing sabre/event (5.1.7): Extracting archive - Installing netresearch/jsonmapper (v4.5.0): Extracting archive - Installing microsoft/tolerant-php-parser (v0.1.2): Extracting archive - Installing webmozart/assert (1.11.0): Extracting archive - Installing phpstan/phpdoc-parser (2.0.0): Extracting archive - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive - Installing doctrine/deprecations (1.1.3): Extracting archive - Installing phpdocumentor/type-resolver (1.10.0): Extracting archive - Installing phpdocumentor/reflection-docblock (5.6.0): Extracting archive - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive - Installing psr/log (3.0.2): Extracting archive - Installing composer/xdebug-handler (3.0.5): Extracting archive - Installing phan/phan (5.4.3): Extracting archive - Installing mediawiki/phan-taint-check-plugin (6.0.0): Extracting archive - Installing mediawiki/mediawiki-phan-config (0.14.0): Extracting archive - Installing php-parallel-lint/php-parallel-lint (v1.4.0): Extracting archive - Installing sebastian/version (3.0.2): Extracting archive - Installing sebastian/type (3.2.1): Extracting archive - Installing sebastian/resource-operations (3.0.4): Extracting archive - Installing sebastian/recursion-context (4.0.5): Extracting archive - Installing sebastian/object-reflector (2.0.4): Extracting archive - Installing sebastian/object-enumerator (4.0.4): Extracting archive - Installing sebastian/global-state (5.0.7): Extracting archive - Installing sebastian/exporter (4.0.6): Extracting archive - Installing sebastian/environment (5.1.5): Extracting archive - Installing sebastian/diff (4.0.6): Extracting archive - Installing sebastian/comparator (4.0.8): Extracting archive - Installing sebastian/code-unit (1.0.8): Extracting archive - Installing sebastian/cli-parser (1.0.2): Extracting archive - Installing phpunit/php-timer (5.0.3): Extracting archive - Installing phpunit/php-text-template (2.0.4): Extracting archive - Installing phpunit/php-invoker (3.1.1): Extracting archive - Installing phpunit/php-file-iterator (3.0.6): Extracting archive - Installing theseer/tokenizer (1.2.3): Extracting archive - Installing nikic/php-parser (v5.3.1): Extracting archive - Installing sebastian/lines-of-code (1.0.4): Extracting archive - Installing sebastian/complexity (2.0.3): Extracting archive - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive - Installing phpunit/php-code-coverage (9.2.32): Extracting archive - Installing phar-io/version (3.2.1): Extracting archive - Installing phar-io/manifest (2.0.4): Extracting archive - Installing myclabs/deep-copy (1.12.1): Extracting archive - Installing doctrine/instantiator (2.0.0): Extracting archive - Installing phpunit/phpunit (9.6.16): Extracting archive 0/61 [>---------------------------] 0% 20/61 [=========>------------------] 32% 36/61 [================>-----------] 59% 48/61 [======================>-----] 78% 60/61 [===========================>] 98% 61/61 [============================] 100% 5 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files 42 packages you are using are looking for funding. Use the `composer fund` command to find out more! --- stdout --- PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils --- end --- Upgrading c:mediawiki/mediawiki-codesniffer from 44.0.0 -> 45.0.0 $ /usr/bin/composer update --- stderr --- Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 4 updates, 0 removals - Upgrading composer/semver (3.4.2 => 3.4.3) - Upgrading mediawiki/mediawiki-codesniffer (v44.0.0 => v45.0.0) - Upgrading phpcsstandards/phpcsutils (1.0.11 => 1.0.12) - Upgrading squizlabs/php_codesniffer (3.9.0 => 3.10.3) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 4 updates, 0 removals 0 [>---------------------------] 0 [->--------------------------] - Upgrading squizlabs/php_codesniffer (3.9.0 => 3.10.3): Extracting archive - Upgrading phpcsstandards/phpcsutils (1.0.11 => 1.0.12): Extracting archive - Upgrading composer/semver (3.4.2 => 3.4.3): Extracting archive - Upgrading mediawiki/mediawiki-codesniffer (v44.0.0 => v45.0.0): Extracting archive 0/4 [>---------------------------] 0% 3/4 [=====================>------] 75% 4/4 [============================] 100% Generating autoload files 42 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found --- stdout --- PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils --- end --- Previously failing phpcs rules: {'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic', 'Generic.WhiteSpace.ScopeIndent.IncorrectExact', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected', 'MediaWiki.Commenting.FunctionComment.MissingReturn', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate', 'Generic.Files.LineLength.TooLong', 'MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals', 'MediaWiki.Commenting.FunctionComment.MissingParamTag'} $ vendor/bin/phpcs --report=json --- stdout --- {"totals":{"errors":64,"warnings":6,"fixable":21},"files":{"\/src\/repo\/dev\/wmf_doc_path\/indexphp\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/autoload.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/cover-extensions\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/metrics\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/IntegrationPage.php":{"errors":3,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15}]},"\/src\/repo\/org\/wikimedia\/doc\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/cover\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/dir.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/DocPage.php":{"errors":3,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15}]},"\/src\/repo\/shared\/test\/UtilsTest.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/test\/StructureTest.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/cover-skins\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/.phan\/config.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/test\/CoveragePageTest.php":{"errors":0,"warnings":1,"messages":[{"message":"Line exceeds 120 characters; contains 225 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":22,"column":23}]},"\/src\/repo\/org\/wikimedia\/doc\/index\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/integration\/zuul\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/DocIndexPage.php":{"errors":1,"warnings":0,"messages":[{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":5,"column":12}]},"\/src\/repo\/shared\/Utils.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/dev\/router.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/WikimediaUiThemePageBase.php":{"errors":24,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":5,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":7,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":12,"column":15},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":23,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":25,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":27,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":32,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":34,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":35,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":37,"column":5},{"message":"Line exceeds 120 characters; contains 207 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":42,"column":204},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":52,"column":5},{"message":"Line indented incorrectly; expected 1 tabs, found 2","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":58,"column":9},{"message":"Line indented incorrectly; expected 2 tabs, found 3","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":60,"column":13},{"message":"Line indented incorrectly; expected 2 tabs, found 3","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":62,"column":13},{"message":"Line indented incorrectly; expected 1 tabs, found 2","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":64,"column":9},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":66,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":70,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":72,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":80,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":82,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":88,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":90,"column":5}]},"\/src\/repo\/org\/wikimedia\/integration\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/DocHomePage.php":{"errors":7,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":5,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":6,"column":13},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":8,"column":19},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":21,"column":15},{"message":"Line exceeds 120 characters; contains 153 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":31,"column":153},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":41,"column":13},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":73,"column":13}]},"\/src\/repo\/shared\/test\/PageTest.php":{"errors":1,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":7,"column":13}]},"\/src\/repo\/shared\/Page.php":{"errors":18,"warnings":2,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":13,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":14,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":16,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":17,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":18,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":19,"column":15},{"message":"Doc comment for parameter \"$base\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":52,"column":5},{"message":"Doc comment for parameter \"$path\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":52,"column":5},{"message":"Missing return type or @return tag in function comment","source":"MediaWiki.Commenting.FunctionComment.MissingReturn","severity":5,"fixable":false,"type":"ERROR","line":57,"column":6},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":111,"column":12},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":159,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":163,"column":15},{"message":"Line exceeds 120 characters; contains 143 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":182,"column":140},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":185,"column":5},{"message":"Line indented incorrectly; expected 0 tabs, found 1","source":"Generic.WhiteSpace.ScopeIndent.IncorrectExact","severity":5,"fixable":true,"type":"ERROR","line":187,"column":5},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":195,"column":15},{"message":"Line exceeds 120 characters; contains 129 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":230,"column":129},{"message":"Doc comment for parameter \"$msg\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":244,"column":5},{"message":"Doc comment for parameter \"$statusCode\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":244,"column":5}]},"\/src\/repo\/shared\/CoveragePage.php":{"errors":7,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":26,"column":13},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":128,"column":38},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":128,"column":72},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":131,"column":16},{"message":"Line exceeds 120 characters; contains 149 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":189,"column":1},{"message":"Doc comment for parameter \"$dir\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":258,"column":5},{"message":"Doc comment for parameter \"$urlPath\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":258,"column":5},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":268,"column":15}]}}} --- end --- PHPCS run failed $ vendor/bin/phpcbf --- stdout --- PHPCBF RESULT SUMMARY ---------------------------------------------------------------------- FILE FIXED REMAINING ---------------------------------------------------------------------- /src/repo/shared/WikimediaUiThemePageBase.php 19 6 /src/repo/shared/Page.php 2 18 ---------------------------------------------------------------------- A TOTAL OF 21 ERRORS WERE FIXED IN 2 FILES ---------------------------------------------------------------------- Time: 452ms; Memory: 8MB --- end --- $ vendor/bin/phpcs --report=json --- stdout --- {"totals":{"errors":43,"warnings":6,"fixable":0},"files":{"\/src\/repo\/dev\/wmf_doc_path\/indexphp\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/test\/UtilsTest.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/autoload.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/cover\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/index\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/DocPage.php":{"errors":3,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15}]},"\/src\/repo\/shared\/DocIndexPage.php":{"errors":1,"warnings":0,"messages":[{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":5,"column":12}]},"\/src\/repo\/shared\/IntegrationPage.php":{"errors":3,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15}]},"\/src\/repo\/org\/wikimedia\/doc\/cover-extensions\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/metrics\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/doc\/dir.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/test\/StructureTest.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/Utils.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/integration\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/WikimediaUiThemePageBase.php":{"errors":5,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":5,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":6,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":7,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":12,"column":15},{"message":"Line exceeds 120 characters; contains 207 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":42,"column":204}]},"\/src\/repo\/shared\/test\/CoveragePageTest.php":{"errors":0,"warnings":1,"messages":[{"message":"Line exceeds 120 characters; contains 225 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":22,"column":23}]},"\/src\/repo\/.phan\/config.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/DocHomePage.php":{"errors":7,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":4,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":5,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":6,"column":13},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":8,"column":19},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":21,"column":15},{"message":"Line exceeds 120 characters; contains 153 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":31,"column":153},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":41,"column":13},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":73,"column":13}]},"\/src\/repo\/org\/wikimedia\/doc\/cover-skins\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/org\/wikimedia\/integration\/zuul\/index.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/test\/PageTest.php":{"errors":1,"warnings":0,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":7,"column":13}]},"\/src\/repo\/dev\/router.php":{"errors":0,"warnings":0,"messages":[]},"\/src\/repo\/shared\/Page.php":{"errors":16,"warnings":2,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":13,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":14,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":15,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":16,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":17,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":18,"column":15},{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":19,"column":15},{"message":"Doc comment for parameter \"$base\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":52,"column":5},{"message":"Doc comment for parameter \"$path\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":52,"column":5},{"message":"Missing return type or @return tag in function comment","source":"MediaWiki.Commenting.FunctionComment.MissingReturn","severity":5,"fixable":false,"type":"ERROR","line":57,"column":6},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic","severity":5,"fixable":false,"type":"ERROR","line":111,"column":12},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":159,"column":15},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":163,"column":15},{"message":"Line exceeds 120 characters; contains 143 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":182,"column":140},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":195,"column":15},{"message":"Line exceeds 120 characters; contains 129 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":230,"column":129},{"message":"Doc comment for parameter \"$msg\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":244,"column":5},{"message":"Doc comment for parameter \"$statusCode\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":244,"column":5}]},"\/src\/repo\/shared\/CoveragePage.php":{"errors":7,"warnings":1,"messages":[{"message":"Missing class property doc comment","source":"MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate","severity":5,"fixable":false,"type":"ERROR","line":26,"column":13},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":128,"column":38},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":128,"column":72},{"message":"\"$_GET\" superglobals should not be accessed.","source":"MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals","severity":5,"fixable":false,"type":"ERROR","line":131,"column":16},{"message":"Line exceeds 120 characters; contains 149 characters","source":"Generic.Files.LineLength.TooLong","severity":5,"fixable":false,"type":"WARNING","line":189,"column":1},{"message":"Doc comment for parameter \"$dir\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":258,"column":5},{"message":"Doc comment for parameter \"$urlPath\" missing","source":"MediaWiki.Commenting.FunctionComment.MissingParamTag","severity":5,"fixable":false,"type":"ERROR","line":258,"column":5},{"message":"Missing function doc comment","source":"MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected","severity":5,"fixable":false,"type":"ERROR","line":268,"column":15}]}}} --- end --- * sniff Generic.WhiteSpace.ScopeIndent.IncorrectExact is no longer failing $ git checkout .phpcs.xml --- stderr --- Updated 1 path from the index --- stdout --- --- end --- $ /usr/bin/composer install --- stderr --- Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Generating autoload files 42 packages you are using are looking for funding. Use the `composer fund` command to find out more! --- stdout --- --- end --- $ /usr/bin/composer test --- stderr --- > parallel-lint . --exclude vendor > phpunit > phan --allow-polyfill-parser --long-progress-bar Parsing files... ░░░░░░░░░░░░░░░░░░░░░░░░ 24 / 24 (100%) 18MB Analyzing classes... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 34MB Analyzing functions... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 35MB Analyzing methods... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 35MB Analyzing files... ░░░░░░░░░░░░░░░░░░░░ 20 / 20 (100%) 42MB > phpcs -sp --cache --- stdout --- PHP 8.2.20 | 10 parallel jobs ......................... 25/25 (100%) Checked 25 files in 0.1 seconds No syntax error found PHPUnit 9.6.16 by Sebastian Bergmann and contributors. ................. 17 / 17 (100%) Time: 00:00.006, Memory: 6.00 MB OK (17 tests, 307 assertions) ......................... 25 / 25 (100%) Time: 195ms; Memory: 8MB --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": {}, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 0, "high": 0, "critical": 0, "total": 0 }, "dependencies": { "prod": 1, "dev": 240, "optional": 0, "peer": 1, "peerOptional": 0, "total": 240 } } } --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 The following sniffs now pass and were enabled: * Generic.WhiteSpace.ScopeIndent.IncorrectExact $ git add . --- stdout --- --- end --- $ git commit -F /tmp/tmp9iq1l8zj --- stdout --- [master 33b2854] build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 4 files changed, 36 insertions(+), 37 deletions(-) --- end --- $ git format-patch HEAD~1 --stdout --- stdout --- From 33b2854598927100ad4002afe6d08a0b4fe6ec22 Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Mon, 18 Nov 2024 00:12:40 +0000 Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 The following sniffs now pass and were enabled: * Generic.WhiteSpace.ScopeIndent.IncorrectExact Change-Id: Ia1939194d0fb3eef80f788dd2311ee844d2b10f6 --- .phpcs.xml | 1 - composer.json | 2 +- shared/Page.php | 6 +-- shared/WikimediaUiThemePageBase.php | 64 ++++++++++++++--------------- 4 files changed, 36 insertions(+), 37 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index f0e532c..fcab13a 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,7 +2,6 @@ <ruleset> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <exclude name="Generic.Files.LineLength.TooLong"/> - <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate"/> <exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate"/> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected"/> diff --git a/composer.json b/composer.json index 7280a9d..fdf7b84 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "ext-simplexml": "*" }, "require-dev": { - "mediawiki/mediawiki-codesniffer": "44.0.0", + "mediawiki/mediawiki-codesniffer": "45.0.0", "mediawiki/mediawiki-phan-config": "0.14.0", "php-parallel-lint/php-parallel-lint": "1.4.0", "phpunit/phpunit": "9.6.16" diff --git a/shared/Page.php b/shared/Page.php index ae03003..2e47fa8 100644 --- a/shared/Page.php +++ b/shared/Page.php @@ -182,9 +182,9 @@ class Page { <a role="banner" href="/" title="Navigate to home of <?php echo htmlentities( $this->site ); ?>"><?php echo htmlentities( $this->site ); ?></a> <main role="main"> <?php - if ( $this->pageName ) { - echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; - } +if ( $this->pageName ) { + echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; +} echo '<article>' . $this->content . '</article>'; ?> </main> diff --git a/shared/WikimediaUiThemePageBase.php b/shared/WikimediaUiThemePageBase.php index 9ee2065..b9c76b8 100644 --- a/shared/WikimediaUiThemePageBase.php +++ b/shared/WikimediaUiThemePageBase.php @@ -20,21 +20,21 @@ class WikimediaUiThemePageBase extends Page { <head> <meta charset="utf-8"> <title><?php - if ( $this->pageName ) { - echo htmlentities( "$this->pageName - $this->org $this->site" ); - } else { - echo htmlentities( "$this->org $this->site" ); - } +if ( $this->pageName ) { + echo htmlentities( "$this->pageName - $this->org $this->site" ); +} else { + echo htmlentities( "$this->org $this->site" ); +} ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="/favicon.ico"> <?php - foreach ( $this->stylesheets as $stylesheet ) { - echo '<link rel="stylesheet" href="' . htmlspecialchars( $stylesheet ) . '">' . "\n"; - } - if ( count( $this->embeddedCSS ) ) { - echo "<style>\n" . implode( "\n", $this->embeddedCSS ) . "\n</style>\n"; - } +foreach ( $this->stylesheets as $stylesheet ) { + echo '<link rel="stylesheet" href="' . htmlspecialchars( $stylesheet ) . '">' . "\n"; +} +if ( count( $this->embeddedCSS ) ) { + echo "<style>\n" . implode( "\n", $this->embeddedCSS ) . "\n</style>\n"; +} ?> </head> <body> @@ -49,27 +49,27 @@ class WikimediaUiThemePageBase extends Page { <main role="main"><div class="wm-container"> <nav class="wm-site-nav"><ul class="wm-nav"> <?php - foreach ( $this->getNavItems() as $href => $text ) { - $isActive = $this->isNavActive( $href ); - $subItems = $isActive ? $this->getSubnavItems() : []; +foreach ( $this->getNavItems() as $href => $text ) { + $isActive = $this->isNavActive( $href ); + $subItems = $isActive ? $this->getSubnavItems() : []; - $attr = $isActive ? ' class="wm-nav-item-active"' : ''; - echo "<li>" . '<a href="' . htmlspecialchars( $href ) . '"' . $attr . '>' . htmlspecialchars( $text ) . '</a>'; - if ( $subItems ) { - echo '<ul>'; - foreach ( $subItems as $subHref => $subText ) { - echo '<li><a href="' . htmlspecialchars( $subHref ) . '">' . htmlspecialchars( $subText ) . '</a>'; - } - echo '</ul>'; + $attr = $isActive ? ' class="wm-nav-item-active"' : ''; + echo "<li>" . '<a href="' . htmlspecialchars( $href ) . '"' . $attr . '>' . htmlspecialchars( $text ) . '</a>'; + if ( $subItems ) { + echo '<ul>'; + foreach ( $subItems as $subHref => $subText ) { + echo '<li><a href="' . htmlspecialchars( $subHref ) . '">' . htmlspecialchars( $subText ) . '</a>'; } - echo '</li>'; + echo '</ul>'; } + echo '</li>'; +} ?> </ul></nav> <article><?php - if ( $this->pageName ) { - echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; - } +if ( $this->pageName ) { + echo '<h1>' . htmlentities( $this->pageName ) . '</h1>'; +} $this->renderContent(); ?></article> </div></main> @@ -77,17 +77,17 @@ class WikimediaUiThemePageBase extends Page { <p class="wm-modified">Modified: <?php echo date( DateTimeInterface::ATOM ); ?> </p> <nav role="navigation"><ul> <?php - foreach ( $this->getFooterItems() as $href => $text ) { - echo '<li><a href="' . htmlspecialchars( $href ) . '">' . htmlspecialchars( $text ) . '</a></li>'; - } +foreach ( $this->getFooterItems() as $href => $text ) { + echo '<li><a href="' . htmlspecialchars( $href ) . '">' . htmlspecialchars( $text ) . '</a></li>'; +} ?> </ul></nav> <a class="wm-link--powered" href="https://www.wikimedia.org">A Wikimedia Foundation project</a> </div></footer> <?php - foreach ( $this->scripts as $script ) { - echo '<script defer src="' . htmlspecialchars( $script ) . '"></script>' . "\n"; - } +foreach ( $this->scripts as $script ) { + echo '<script defer src="' . htmlspecialchars( $script ) . '"></script>' . "\n"; +} ?> </body> </html> -- 2.39.2 --- end ---