Skip to content

Commit 35c998a

Browse files
Maximilian GroschMaximilian Grosch
authored andcommitted
Merge pull request #5 in CFA/coding-guidelines from namespace_upper_camel_case to master
* commit '65368caa307ec0d9dc73f76f4dcd8c472be42532': added constraint to only test namespace of class itself, not vendor namespaces Pass-Test for upper camel case namespaces
2 parents 47222b9 + 65368ca commit 35c998a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function process(File $phpcsFile, $stackPtr)
4040
'NamespaceDeclarationWithInvalidCapitalization'
4141
);
4242
}
43+
if (strpos($tokens[$ptr + 2]['content'], ';') !== false) {
44+
break;
45+
}
4346
}
4447
}
4548
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
// @expectedPass
4+
5+
namespace flyeralarm\FooBar;
6+
7+
class NamespaceVendorLowercasePackageUpperCamelCase extends \PHP_CodeSniffer_File
8+
{
9+
}

0 commit comments

Comments
 (0)