| 1 | <?php |
||
| 9 | class ClassManifestVisitor extends NodeVisitorAbstract |
||
| 10 | { |
||
| 11 | |||
| 12 | private $classes = []; |
||
| 13 | |||
| 14 | private $traits = []; |
||
| 15 | |||
| 16 | private $interfaces = []; |
||
| 17 | |||
| 18 | public function resetState() |
||
| 24 | |||
| 25 | public function beforeTraverse(array $nodes) |
||
| 29 | |||
| 30 | public function enterNode(Node $node) |
||
| 66 | |||
| 67 | public function getClasses() |
||
| 71 | |||
| 72 | public function getTraits() |
||
| 76 | |||
| 77 | public function getInterfaces() |
||
| 81 | } |
||
| 82 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.