Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 1 | public function make(StatefulInterface $stateful): Machine |
|
40 | { |
||
41 | 1 | $blueprint = $this->loader[get_class($stateful)]; |
|
42 | |||
43 | 1 | if (!array_key_exists($blueprint, $this->blueprints)) { |
|
44 | 1 | $this->blueprints[$blueprint] = new $blueprint(); |
|
45 | } |
||
46 | |||
47 | 1 | return new Machine($stateful, $this->blueprints[$blueprint]); |
|
48 | } |
||
50 |