Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | final class StaticLocator implements LocatorInterface |
||
18 | { |
||
19 | /** @var []string */ |
||
|
|||
20 | private $commands; |
||
21 | |||
22 | /** @var ContainerInterface */ |
||
23 | private $factory; |
||
24 | |||
25 | /** |
||
26 | * @param array $commands |
||
27 | * @param ContainerInterface $container |
||
28 | */ |
||
29 | public function __construct(array $commands, ContainerInterface $container = null) |
||
30 | { |
||
31 | $this->commands = $commands; |
||
32 | $this->factory = $container ?? new Container(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function locateCommands(): array |
||
46 | } |
||
47 | } |
||
48 |