| Conditions | 4 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function getTaskArguments() |
||
| 29 | { |
||
| 30 | $arguments = $this->arguments; |
||
| 31 | |||
| 32 | unset($arguments['task']); |
||
| 33 | |||
| 34 | $argumentsAllowed = \array_combine( |
||
| 35 | static::ARGUMENTS, |
||
| 36 | static::ARGUMENTS |
||
| 37 | ); |
||
| 38 | |||
| 39 | if (empty($argumentsAllowed)) { |
||
| 40 | return $arguments; |
||
| 41 | } |
||
| 42 | |||
| 43 | foreach ($arguments as $key => $value) { |
||
| 44 | if (isset($argumentsAllowed[$key])) { |
||
| 45 | continue; |
||
| 46 | } |
||
| 47 | |||
| 48 | unset($arguments[$key]); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $arguments; |
||
| 52 | } |
||
| 64 |