Conditions | 4 |
Paths | 5 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | protected function ControllerForm($controller, string $method, array $values){ |
||
43 | if(Validator::execute($values)){ |
||
44 | |||
45 | $this->check_role(); |
||
46 | |||
47 | $role = ($method !== 'method') ? $method : $this->getData()['POST']['role']; |
||
48 | $data = (!is_null($values)) ? json_decode($values['data']) : null; |
||
|
|||
49 | $controller->$role($data); |
||
50 | } |
||
53 | } |