Skip to content

Commit cbef364

Browse files
committed
- Removed namespace case sniff (decision from 2017/08/10 http://confluence.flyeralarm/display/DEV/3.24+Technische+Abstimmungsrunde)
1 parent 080e0d5 commit cbef364

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ public function process(File $phpcsFile, $stackPtr)
2525
$tokens = $phpcsFile->getTokens();
2626
$ptr = -1;
2727
while($ptr = $phpcsFile->findNext(T_NS_SEPARATOR, $ptr + 1)) {
28-
if (ctype_upper($tokens[$ptr + 1]['content'][0]) === false) {
29-
$phpcsFile->addError(
30-
'Namespace declarations after vendor name must be in UpperCamelCase',
31-
$stackPtr,
32-
'NamespaceDeclarationWithInvalidCapitalization'
33-
);
34-
}
35-
3628
if (strpos($tokens[$ptr + 1]['content'], '_') !== false) {
3729
$phpcsFile->addError(
3830
'Namespace declarations after vendor name must be in UpperCamelCase',

tests/rules/classes/not-allowed/LowercaseNamespaceCapitalization.php renamed to tests/rules/classes/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 vendor name must be in UpperCamelCase
3+
// @expectedPass
44

55
namespace flyeralarm\lowerCase;
66

0 commit comments

Comments
 (0)