| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 69 | public function __resolve() |
||
| 70 | { |
||
| 71 | if (!is_null($this->orm)) { |
||
| 72 | if (count($this->scope) !== 1) { |
||
| 73 | $this->resolved = $this->orm->getRepository($this->target)->findOne($this->scope); |
||
| 74 | } else { |
||
| 75 | $key = key($this->scope); |
||
| 76 | $value = $this->scope[$key]; |
||
| 77 | |||
| 78 | $this->resolved = $this->orm->get($this->target, $key, $value, true); |
||
| 79 | } |
||
| 80 | |||
| 81 | $this->orm = null; |
||
| 82 | } |
||
| 83 | |||
| 84 | return $this->resolved; |
||
| 85 | } |
||
| 86 | } |