Skip to content

Commit 3b0151b

Browse files
authored
feat: bump squizlabs/php_codesniffer to v4 (#171)
1 parent 127cfff commit 3b0151b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
},
1616
"require": {
1717
"php": "^8.3",
18-
"doctrine/coding-standard": "^13.0.1",
19-
"slevomat/coding-standard": "^8.21.1",
20-
"squizlabs/php_codesniffer": "^3.13"
18+
"doctrine/coding-standard": "^14",
19+
"slevomat/coding-standard": "^8.23.0",
20+
"squizlabs/php_codesniffer": "^4"
2121
},
2222
"require-dev": {
2323
"phpstan/extension-installer": "^1.2",

src/Cdn77/Sniffs/Ordering/AlphabeticallyOrderedConstantsSniff.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public function process(File $phpcsFile, mixed $stackPtr): void
8383
continue;
8484
}
8585

86+
if ($namesWithValues === []) {
87+
continue;
88+
}
89+
8690
$firstNameWithValue = $namesWithValues[array_key_first($namesWithValues)];
8791
$fix = $phpcsFile->addFixableError(
8892
sprintf('%s constant names are not alphabetically ordered.', ucfirst($visibility)),

0 commit comments

Comments
 (0)