| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | |||
| 11 | final readonly class FetchAssoc implements FetcherInterface |
||
|
|
|||
| 12 | { |
||
| 13 | public function __construct(private ExtendedPdoInterface $pdo) |
||
| 14 | { |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritDoc} |
||
| 19 | */ |
||
| 20 | #[Override] |
||
| 21 | public function __invoke(string $sql, array $params): array |
||
| 22 | { |
||
| 23 | return $this->pdo->perform($sql, $params)->fetchAll(PDO::FETCH_ASSOC); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |