| 1 | <?php |
||
| 15 | final class SourceFilesProvider |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var File[] |
||
| 19 | */ |
||
| 20 | private $files; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var SourceFinder |
||
| 24 | */ |
||
| 25 | private $sourceFinder; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var FileFactory |
||
| 29 | */ |
||
| 30 | private $fileFactory; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var Configuration |
||
| 34 | */ |
||
| 35 | private $configuration; |
||
| 36 | |||
| 37 | public function __construct( |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return File[] |
||
| 49 | */ |
||
| 50 | public function getFiles() : array |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param SplFileInfo[] $files |
||
| 64 | * @return File[] |
||
| 65 | */ |
||
| 66 | private function wrapFilesToValueObjects(array $files) : array |
||
| 74 | } |
||
| 75 |
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.