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