Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function create(ItemType $itemType, mixed ... $args): DatabaseItem |
||
34 | { |
||
35 | $class = new \ReflectionClass($itemType->value); |
||
36 | $item = $class->newInstanceArgs($args); |
||
37 | $item->setChangeLogger($this->changeLogger); |
||
38 | $item->init(); |
||
39 | $item->setFactory($this); |
||
40 | $item->setStack($this->stack); |
||
41 | $item->setHome($this->home); |
||
42 | $this->stack->push($item); |
||
43 | return $item; |
||
44 | } |
||
51 |