| Conditions | 5 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | public function populateRequest() |
||
| 14 | { |
||
| 15 | $params = $this->getParams(); |
||
|
|
|||
| 16 | foreach ($params as $param => $value) { |
||
| 17 | switch ($param) { |
||
| 18 | case 'module': |
||
| 19 | $this->getRequest()->setModuleName($value); |
||
| 20 | break; |
||
| 21 | case 'controller': |
||
| 22 | $this->getRequest()->setControllerName($value); |
||
| 23 | break; |
||
| 24 | case 'action': |
||
| 25 | $this->getRequest()->setActionName($value); |
||
| 26 | break; |
||
| 27 | default: |
||
| 28 | $this->getRequest()->attributes->set($param, $value); |
||
| 29 | break; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | $this->getRequest()->attributes->add($this->getMatches()); |
||
| 33 | } |
||
| 51 |