| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class FetchEntity implements FetcherInterface |
||
| 14 | { |
||
| 15 | private ExtendedPdoInterface $pdo; |
||
| 16 | private string $entity; |
||
| 17 | |||
| 18 | /** @param class-string $entity */ |
||
|
|
|||
| 19 | public function __construct(ExtendedPdoInterface $pdo, string $entity) |
||
| 20 | { |
||
| 21 | assert(class_exists($entity)); |
||
| 22 | $this->pdo = $pdo; |
||
| 23 | $this->entity = $entity; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritDoc} |
||
| 28 | */ |
||
| 29 | public function __invoke(string $sql, array $params): array |
||
| 36 | }); |
||
| 37 | } |
||
| 39 |