Skip to content

Commit 43f58f0

Browse files
committed
Lint fixes
1 parent 2ee6018 commit 43f58f0

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

phpcs.xml.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,13 @@
7373
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
7474
<exclude-pattern>*/utils/polyfills\.php$</exclude-pattern>
7575
</rule>
76+
77+
<!-- This is a procedural stand-alone file that is never loaded in a WordPress context,
78+
so this file does not have to comply with WP naming conventions. -->
79+
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
80+
<exclude-pattern>*/maybe-generate-wp-cli-coverage\.php$</exclude-pattern>
81+
</rule>
82+
<rule ref="WordPress.WP.GlobalVariablesOverride">
83+
<exclude-pattern>*/maybe-generate-wp-cli-coverage\.php$</exclude-pattern>
84+
</rule>
7685
</ruleset>

src/Context/FeatureContext.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ public function download_phar( $version = 'same' ) {
850850
);
851851

852852
$this->variables['PHAR_PATH'] = $this->variables['RUN_DIR'] . '/'
853-
. uniqid( 'wp-cli-download-', true )
854-
. '.phar';
853+
. uniqid( 'wp-cli-download-', true )
854+
. '.phar';
855855

856856
Process::create(
857857
Utils\esc_cmd(
@@ -1381,14 +1381,14 @@ private static function log_run_times_after_suite( AfterSuiteScope $scope ) {
13811381

13821382
$log .= PHP_EOL . 'Top ' . self::$num_top_processes . " process run times for '$suite'";
13831383
$log .= PHP_EOL . implode(
1384-
PHP_EOL,
1385-
array_map(
1386-
$runtime_callback,
1387-
array_keys( $tops ),
1388-
$tops,
1389-
array_keys( array_keys( $tops ) )
1390-
)
1391-
) . PHP_EOL;
1384+
PHP_EOL,
1385+
array_map(
1386+
$runtime_callback,
1387+
array_keys( $tops ),
1388+
$tops,
1389+
array_keys( array_keys( $tops ) )
1390+
)
1391+
) . PHP_EOL;
13921392

13931393
// Scenario run times.
13941394
arsort( self::$scenario_run_times );
@@ -1402,14 +1402,14 @@ private static function log_run_times_after_suite( AfterSuiteScope $scope ) {
14021402
$log .= PHP_EOL . 'Top ' . self::$num_top_scenarios . ' (of ' . self::$scenario_count . ") scenario run times for '$suite'";
14031403

14041404
$log .= PHP_EOL . implode(
1405-
PHP_EOL,
1406-
array_map(
1407-
$scenario_runtime_callback,
1408-
array_keys( $tops ),
1409-
$tops,
1410-
array_keys( array_keys( $tops ) )
1411-
)
1412-
) . PHP_EOL;
1405+
PHP_EOL,
1406+
array_map(
1407+
$scenario_runtime_callback,
1408+
array_keys( $tops ),
1409+
$tops,
1410+
array_keys( array_keys( $tops ) )
1411+
)
1412+
) . PHP_EOL;
14131413

14141414
$log .= PHP_EOL . str_repeat( ')', 80 );
14151415

0 commit comments

Comments
 (0)