| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function find(string $name, ContextInterface $context = null): ?EntityInterface |
||
| 42 | { |
||
| 43 | if (isset($this->registry[$name])) { |
||
| 44 | return $this->registry[$name]; |
||
| 45 | } |
||
| 46 | $entity = $this->loader->load($name, $context); |
||
| 47 | if (!$entity) { |
||
| 48 | return null; |
||
| 49 | } |
||
| 50 | $this->registry[$name] = $entity; |
||
| 51 | return $entity; |
||
| 52 | } |
||
| 59 |