Skip to content

Commit 29c5843

Browse files
committed
QA: minor tweak
On failure, `substr()` can return `false` or an empty string and as of PHP 8.0, that will be reduced to just an empty string. This simple tweak harden the code just in case `false` would be returned.
1 parent 3afa254 commit 29c5843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/CheckSniffCompleteness.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ protected function processCliCommand()
258258
foreach ($args as $arg) {
259259
if (\strpos($arg, '--exclude=') === 0) {
260260
$exclude = \substr($arg, 10);
261-
if ($exclude === '') {
261+
if (empty($exclude)) {
262262
$this->excludedDirs = [];
263263
continue;
264264
}

0 commit comments

Comments
 (0)