Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
62 | protected function initTable(): void |
||
63 | { |
||
64 | $tableClass = class_namespace(static::class) . '\\Table'; |
||
65 | |||
66 | // check class initialization |
||
67 | if (!class_exists($tableClass) || !is_subclass_of($tableClass, TableInterface::class)) { |
||
68 | throw new TableNotFoundException('`Table` class is not exists or not initialized'); |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @var TableInterface $tableClass |
||
73 | */ |
||
74 | $this->setTable($tableClass::getInstance()); |
||
75 | } |
||
77 |