Total Complexity | 2 |
Total Lines | 25 |
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 | /** |
||
19 | * @param class-string $entity |
||
|
|||
20 | */ |
||
21 | public function __construct(ExtendedPdoInterface $pdo, string $entity) |
||
22 | { |
||
23 | assert(class_exists($entity)); |
||
24 | $this->pdo = $pdo; |
||
25 | $this->entity = $entity; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * {@inheritDoc} |
||
30 | */ |
||
31 | public function __invoke(string $sql, array $params): array |
||
38 | }); |
||
39 | } |
||
41 |