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