Skip to content

Commit 2163593

Browse files
Improved error message
1 parent 69c1c59 commit 2163593

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

custom-standards/Flyeralarm/Sniffs/File/NamespacesSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public function process(File $phpcsFile, $stackPtr)
2727
while($ptr = $phpcsFile->findNext(T_NS_SEPARATOR, $ptr + 1)) {
2828
if (ctype_upper($tokens[$ptr + 1]['content'][0]) === false) {
2929
$phpcsFile->addError(
30-
'Namespace declarations after the first must be in UpperCamelCase',
30+
'Namespace declarations after vendor name must be in UpperCamelCase',
3131
$stackPtr,
3232
'NamespaceDeclarationWithInvalidCapitalization'
3333
);
3434
}
3535

3636
if (strpos($tokens[$ptr + 1]['content'], '_') !== false) {
3737
$phpcsFile->addError(
38-
'Namespace declarations after the first must be in UpperCamelCase',
38+
'Namespace declarations after vendor name must be in UpperCamelCase',
3939
$stackPtr,
4040
'NamespaceDeclarationWithInvalidCapitalization'
4141
);

tests/rules/classes/not-allowed/LowercaseNamespaceCapitalization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
// @expectedError Namespace declarations after the first must be in UpperCamelCase
3+
// @expectedError Namespace declarations after vendor name must be in UpperCamelCase
44

55
namespace flyeralarm\lowerCase;
66

tests/rules/classes/not-allowed/UnderscoreNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
// @expectedError Namespace declarations after the first must be in UpperCamelCase
3+
// @expectedError Namespace declarations after vendor name must be in UpperCamelCase
44

55
namespace flyeralarm\under_score;
66

0 commit comments

Comments
 (0)