| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 6 | public function __invoke( int $id ) : AddressInterface |
|
| 45 | { |
||
| 46 | 6 | if (!$this->stmt->execute(['id' => $id])) |
|
| 47 | 2 | throw new \RuntimeException("Could not execute SELECT Address PDOStatement"); |
|
| 48 | |||
| 49 | 4 | $pdo_address_array = $this->stmt->fetch(\PDO::FETCH_ASSOC); |
|
| 50 | 4 | return ($this->address_factory)($pdo_address_array); |
|
| 51 | } |
||
| 52 | } |