Skip to content

Commit 17a9d60

Browse files
committed
CS: remove long condition end comments
Includes removing the rule from the PHPCS native ruleset.
1 parent 6e97cd2 commit 17a9d60

File tree

227 files changed

+963
-964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+963
-964
lines changed

autoload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static function load(string $className)
9292
} else {
9393
self::$composerAutoloader = false;
9494
}
95-
}//end if
95+
}
9696

9797
$ds = DIRECTORY_SEPARATOR;
9898
$path = false;
@@ -332,4 +332,4 @@ public static function getLoadedFiles()
332332
// it gets a chance to hear about every autoload request, and record
333333
// the file and class name for it.
334334
spl_autoload_register(__NAMESPACE__ . '\Autoload::load', true, true);
335-
}//end if
335+
}

phpcs.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
4545
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
4646
<rule ref="Squiz.Commenting.InlineComment"/>
47-
<rule ref="Squiz.Commenting.LongConditionClosingComment"/>
4847
<rule ref="Squiz.Commenting.PostStatementComment">
4948
<exclude name="Squiz.Commenting.PostStatementComment.AnnotationFound"/>
5049
</rule>

scripts/BuildRequirementsCheckMatrix.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ private function getMissingExtensionsBuilds()
174174
];
175175
}
176176
}
177-
}//end foreach
178-
}//end foreach
177+
}
178+
}
179179

180180
return $builds;
181181
}

scripts/build-phar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function stripWhitespaceAndComments(string $fullpath, Config $config)
136136
}
137137

138138
++$fileCount;
139-
}//end foreach
139+
}
140140

141141
// Add requirements check.
142142
$phar->addFromString('requirements.php', stripWhitespaceAndComments(realpath(__DIR__ . '/../requirements.php'), $config));
@@ -168,7 +168,7 @@ function stripWhitespaceAndComments(string $fullpath, Config $config)
168168
$phar->setStub($stub);
169169

170170
echo 'done' . PHP_EOL;
171-
}//end foreach
171+
}
172172

173173
Timing::printRunTime();
174174

src/Config.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public function __set(string $name, $value)
344344
default :
345345
// No validation required.
346346
break;
347-
}//end switch
347+
}
348348

349349
$this->settings[$name] = $value;
350350
}
@@ -444,7 +444,7 @@ public function __construct(array $cliArgs = [], bool $dieOnUnknownArg = true)
444444
$lastDir = $currentDir;
445445
$currentDir = dirname($currentDir);
446446
} while ($currentDir !== '.' && $currentDir !== $lastDir && Common::isReadable($currentDir) === true);
447-
}//end if
447+
}
448448

449449
if (defined('STDIN') === false
450450
|| PHP_OS_FAMILY === 'Windows'
@@ -478,7 +478,7 @@ public function __construct(array $cliArgs = [], bool $dieOnUnknownArg = true)
478478
$this->overriddenDefaults['stdin'] = true;
479479
$this->overriddenDefaults['stdinContent'] = true;
480480
}
481-
}//end if
481+
}
482482

483483
fclose($handle);
484484
}
@@ -529,8 +529,8 @@ public function setCommandLineValues(array $args)
529529
}
530530
} else {
531531
$this->processUnknownArgument($arg, $i);
532-
}//end if
533-
}//end for
532+
}
533+
}
534534
}
535535

536536

@@ -764,7 +764,7 @@ public function processShortArgument(string $arg, int $pos)
764764
} else {
765765
$this->processUnknownArgument('-' . $arg, $pos);
766766
}
767-
}//end switch
767+
}
768768
}
769769

770770

@@ -958,7 +958,7 @@ public function processLongArgument(string $arg, int $pos)
958958
$this->cacheFile = $dir . '/' . basename($this->cacheFile);
959959
}
960960
}
961-
}//end if
961+
}
962962

963963
$this->overriddenDefaults['cacheFile'] = true;
964964

@@ -1035,7 +1035,7 @@ public function processLongArgument(string $arg, int $pos)
10351035
}
10361036

10371037
$this->reportFile = $dir . '/' . basename($this->reportFile);
1038-
}//end if
1038+
}
10391039

10401040
$this->overriddenDefaults['reportFile'] = true;
10411041

@@ -1106,8 +1106,8 @@ public function processLongArgument(string $arg, int $pos)
11061106
$error .= $this->printShortUsage(true);
11071107
throw new DeepExitException($error, ExitCode::PROCESS_ERROR);
11081108
}
1109-
}//end if
1110-
}//end if
1109+
}
1110+
}
11111111

11121112
$reports[$report] = $output;
11131113
} else {
@@ -1120,7 +1120,7 @@ public function processLongArgument(string $arg, int $pos)
11201120
foreach ($reportNames as $report) {
11211121
$reports[$report] = null;
11221122
}
1123-
}//end if
1123+
}
11241124

11251125
// Remove the default value so the CLI value overrides it.
11261126
if (isset($this->overriddenDefaults['reports']) === false) {
@@ -1293,9 +1293,9 @@ public function processLongArgument(string $arg, int $pos)
12931293
} else {
12941294
$this->processUnknownArgument('--' . $arg, $pos);
12951295
}
1296-
}//end if
1296+
}
12971297
break;
1298-
}//end switch
1298+
}
12991299
}
13001300

13011301

@@ -1343,7 +1343,7 @@ private function parseSniffCodes(string $input, string $argument)
13431343
$parts = explode('.', $sniff, 4);
13441344
$sniffs[] = $parts[0] . '.' . $parts[1] . '.' . $parts[2];
13451345
}
1346-
}//end foreach
1346+
}
13471347

13481348
$sniffs = array_reduce(
13491349
$sniffs,
@@ -1639,7 +1639,7 @@ public function setConfigData(string $key, ?string $value, bool $temp = false)
16391639
$error = 'ERROR: Config file ' . $configFile . ' is not writable' . PHP_EOL . PHP_EOL;
16401640
throw new DeepExitException($error, ExitCode::PROCESS_ERROR);
16411641
}
1642-
}//end if
1642+
}
16431643

16441644
$phpCodeSnifferConfig = self::getAllConfigData();
16451645

0 commit comments

Comments
 (0)