Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 14 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 5 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
81 | View Code Duplication | public function viewAction() |
|
82 | { |
||
83 | if ($this->getRequest()->getParam('id')) { |
||
84 | $this->view->user = \mQueue\Model\UserMapper::find($this->getRequest()->getParam('id')); |
||
1 ignored issue
–
show
|
|||
85 | } else { |
||
86 | $this->view->user = \mQueue\Model\User::getCurrent(); |
||
1 ignored issue
–
show
|
|||
87 | } |
||
88 | |||
89 | if (!$this->view->user) { |
||
1 ignored issue
–
show
|
|||
90 | throw new Exception($this->view->translate('User not found')); |
||
1 ignored issue
–
show
|
|||
91 | } |
||
92 | |||
93 | $this->view->userActivity = $this->_helper->createPaginator(\mQueue\Model\StatusMapper::getActivityQuery($this->view->user)); |
||
2 ignored issues
–
show
|
|||
94 | } |
||
95 | } |
||
96 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.