1 | <?php |
||
14 | class CommandsFactory |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @param string $alias |
||
19 | * @param ModelLocator $modelLocator |
||
20 | * @return Command |
||
21 | */ |
||
22 | 6 | public static function create($alias, $modelLocator = null) |
|
30 | |||
31 | /** |
||
32 | * @param string $alias |
||
33 | * @param Configuration|null $configuration |
||
34 | * @return Command |
||
35 | */ |
||
36 | public static function createFromAlias($alias, $configuration = null) |
||
42 | |||
43 | /** |
||
44 | * @param Command $command |
||
45 | * @param Configuration|null $configuration |
||
46 | * @return Command |
||
47 | */ |
||
48 | 6 | protected static function hydrateConfiguration(Command $command, $configuration) |
|
55 | |||
56 | /** |
||
57 | * @param Command $command |
||
58 | * @param ModelRegistry|null $registry |
||
59 | * @return Command |
||
60 | */ |
||
61 | 6 | protected static function hydrateModelRegistry(Command $command, $registry) |
|
68 | } |
||
69 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: