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