Conditions | 4 |
Paths | 4 |
Total Lines | 29 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function process() |
||
22 | { |
||
23 | switch ($this->_attributeParse()) { |
||
24 | case 'list': |
||
25 | $options = issetor($this->attributes['options'], []); |
||
|
|||
26 | $crud = new Ajde_Crud($this->attributes['model'], $options); |
||
27 | $crud->setAction('list'); |
||
28 | |||
29 | return $crud; |
||
30 | break; |
||
31 | case 'edit': |
||
32 | $options = issetor($this->attributes['options'], []); |
||
33 | $id = issetor($this->attributes['id'], null); |
||
34 | $crud = new Ajde_Crud($this->attributes['model'], $options); |
||
35 | $crud->setId($id); |
||
36 | $crud->setAction('edit/layout'); |
||
37 | |||
38 | return $crud; |
||
39 | break; |
||
40 | case 'mainfilter': |
||
41 | $controller = Ajde_Controller::fromRoute(new Ajde_Core_Route('_core/crud:mainfilter')); |
||
42 | $controller->setCrudInstance($this->attributes['crud']); |
||
43 | $controller->setRefresh(issetor($this->attributes['refresh'], false)); |
||
44 | |||
45 | return $controller->invoke(); |
||
46 | } |
||
47 | // TODO: |
||
48 | throw new Ajde_Component_Exception(); |
||
49 | } |
||
50 | } |
||
51 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.