1 | <?php |
||
7 | class Optimizer implements OptimizerInterface |
||
8 | { |
||
9 | /** @var Finder\FinderInterface null */ |
||
10 | protected $finder = null; |
||
11 | |||
12 | /** @var Handler\HandlerInterface */ |
||
13 | protected $handlers; |
||
14 | |||
15 | /** @var array Массив найденных файлов для обработки */ |
||
16 | private $files = []; |
||
17 | |||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | public function __construct(Finder\FinderInterface $finder = null, Handler\HandlerProcessor $handler = null) |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function optimize() |
||
36 | |||
37 | private function setQueue() |
||
50 | |||
51 | private function handleQueue() |
||
58 | |||
59 | private function findFiles() |
||
63 | } |
||
64 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: