Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
52 | 1 | public function process(PHP_CodeSniffer_File $file, $position) |
|
53 | { |
||
54 | 1 | $this->file = $file; |
|
55 | 1 | $this->position = $position; |
|
56 | |||
57 | 1 | if ( ! $this->isClassAbstract()) { |
|
58 | 1 | return; |
|
59 | } |
||
60 | |||
61 | 1 | if (strpos($this->getClassName(), 'Abstract') === 0) { |
|
62 | 1 | return; |
|
63 | } |
||
64 | |||
65 | 1 | $file->addError('Abstract class should have prefix "Abstract".', $position); |
|
66 | 1 | } |
|
67 | |||
90 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: