Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class VirtualTables { |
||
8 | /** @var array<string, Closure|Select> */ |
||
9 | private array $virtualTables = []; |
||
10 | |||
11 | /** |
||
12 | * @param string $tableName |
||
13 | * @param Select|Closure $select |
||
14 | * @return $this |
||
15 | */ |
||
16 | public function add(string $tableName, $select) { |
||
17 | $this->virtualTables[$tableName] = $select; |
||
18 | return $this; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @param string|VirtualTable $tableName |
||
23 | * @return bool |
||
24 | */ |
||
25 | public function has($tableName): bool { |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param string|VirtualTable $tableName |
||
31 | * @return Select|null |
||
32 | */ |
||
33 | public function get($tableName): ?Select { |
||
48 |