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