| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function switchAction() |
||
| 35 | { |
||
| 36 | $lang = $this->getEvent()->getRouteMatch()->getParam('lang'); |
||
| 37 | $context = $this->getEvent()->getRouteMatch()->getParam('area'); |
||
| 38 | $redirect = (!empty($this->getEvent()->getRouteMatch()->getParam('redirect')))? urldecode($this->getEvent()->getRouteMatch()->getParam('redirect')) : '/'.$lang; |
||
| 39 | |||
| 40 | $cookie = new \Zend\Http\Header\SetCookie('pg_locale_'.$context, $lang, time() + 60*60*24*365, '/'); |
||
| 41 | $this->getResponse()->getHeaders()->addHeader($cookie); |
||
| 42 | |||
| 43 | return $this->redirect()->toUrl($redirect); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..