Conditions | 6 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
62 | public function errorHandler(callable $callback) |
||
63 | { |
||
64 | foreach ($this->list as $table => $objects) |
||
65 | { |
||
66 | foreach ($objects as $object) |
||
67 | { |
||
68 | $alterBinds = $object->getAlterBinds(); |
||
69 | |||
70 | if(!is_null($alterBinds) && count($alterBinds)>1){ |
||
71 | exception()->runtime('Only one command can be applied to alter groups'); |
||
72 | } |
||
73 | |||
74 | if(count($object->getError())){ |
||
75 | exception()->runtime(''.$object->getFile().' -> '.$object->getError()[0].''); |
||
76 | } |
||
77 | |||
78 | } |
||
79 | } |
||
80 | |||
81 | return call_user_func($callback); |
||
82 | } |
||
83 | } |