| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 9 |
| Ratio | 100 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 79 | 1 | View Code Duplication | private function getClassName() |
| 80 | { |
||
| 81 | 1 | $namePosition = $this->file->findNext(T_STRING, $this->position); |
|
| 82 | 1 | if ( ! $namePosition) { |
|
|
|
|||
| 83 | return FALSE; |
||
| 84 | } |
||
| 85 | |||
| 86 | 1 | return $this->file->getTokens()[$namePosition]['content']; |
|
| 87 | } |
||
| 88 | |||
| 90 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: