| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function fileToClassCandidates(FilePath $filePath): ClassNameCandidates |
||
| 23 | { |
||
| 24 | $classNames = []; |
||
| 25 | |||
| 26 | $className = $this->classScanner->getClassNameFromFile($filePath->__toString()); |
||
| 27 | |||
| 28 | if ($className) { |
||
|
|
|||
| 29 | $classNames[] = ClassName::fromString($className); |
||
| 30 | } |
||
| 31 | |||
| 32 | return ClassNameCandidates::fromClassNames($classNames); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: