Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
58 | 1 | private function build(Name $name): object |
|
59 | { |
||
60 | 1 | if ($this->instances->contains((string) $name)) { |
|
61 | 1 | return $this->instances->get((string) $name); |
|
62 | } |
||
63 | |||
64 | 1 | $instance = $this->definitions->build($name); |
|
65 | 1 | $this->instances = $this->instances->put((string) $name, $instance); |
|
66 | |||
67 | 1 | return $instance; |
|
68 | } |
||
70 |