| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 48 | 1 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
| 49 | { |
||
| 50 | 1 | $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); |
|
| 51 | 1 | if ($nextClass !== false) { |
|
| 52 | 1 | $error = 'Only one trait is allowed in a file'; |
|
| 53 | 1 | $phpcsFile->addError($error, $nextClass, 'MultipleFound'); |
|
| 54 | 1 | } |
|
| 55 | |||
| 56 | 1 | }//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.