| Conditions | 5 |
| Paths | 10 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 5 | public function getScope() |
|
| 41 | { |
||
| 42 | 5 | $scope = $this->request->request->get('scope', false); |
|
| 43 | |||
| 44 | 5 | if (!$scope) { |
|
| 45 | 3 | $scope = $this->request->query->get('scope', false); |
|
| 46 | } |
||
| 47 | |||
| 48 | 5 | if (!$scope) { |
|
| 49 | 2 | if (!$this->form) { |
|
| 50 | 1 | return null; |
|
| 51 | } |
||
| 52 | 1 | $form = $this->form->getName(); |
|
| 53 | 1 | $scope = $this->request->request->get("{$form}[scope]", false, true); |
|
| 54 | } |
||
| 55 | |||
| 56 | 4 | return !is_array($scope) ? explode(' ', $scope) : $scope; |
|
| 57 | } |
||
| 59 |