Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
49 | { |
||
50 | $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); |
||
51 | if ($nextClass !== false) { |
||
52 | $error = 'Only one trait is allowed in a file'; |
||
53 | $phpcsFile->addError($error, $nextClass, 'MultipleFound'); |
||
54 | } |
||
55 | |||
56 | }//end process() |
||
57 | |||
60 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider
.