Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 1 | public function pass(ClassConst $stmt, Context $context) |
|
19 | { |
||
20 | 1 | $result = false; |
|
21 | 1 | foreach ($stmt->consts as $const) { |
|
22 | 1 | if ($const->name !== strtoupper($const->name)) { |
|
23 | 1 | $context->notice( |
|
24 | 1 | 'constant.naming', |
|
25 | 1 | 'Constant names should be all uppercase.', |
|
26 | $stmt |
||
27 | 1 | ); |
|
28 | |||
29 | 1 | $result = true; |
|
30 | 1 | } |
|
31 | 1 | } |
|
32 | |||
33 | 1 | return $result; |
|
34 | } |
||
35 | |||
59 |