Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | trait ModelFactoryTrait |
||
17 | { |
||
18 | /** |
||
19 | * Store the factory instance. |
||
20 | * |
||
21 | * @var FactoryInterface |
||
22 | */ |
||
23 | protected $modelFactory; |
||
24 | |||
25 | /** |
||
26 | * Set an model factory. |
||
27 | * |
||
28 | * @param FactoryInterface $factory The factory to create models. |
||
29 | * @return void |
||
30 | */ |
||
31 | protected function setModelFactory(FactoryInterface $factory) |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Retrieve the model factory. |
||
38 | * |
||
39 | * @throws RuntimeException If the model factory is missing. |
||
40 | * @return FactoryInterface |
||
41 | */ |
||
42 | public function modelFactory() |
||
54 |