Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
16 | 29 | public function run(array $args) |
|
17 | { |
||
18 | 29 | $value = 0; |
|
19 | 29 | foreach ($args as $arg) { |
|
20 | 28 | if (!$this->isDesmondType('Number', $arg)) { |
|
21 | 1 | throw new ArgumentException('"+" expects arguments to be Numbers.'); |
|
22 | } |
||
23 | 27 | $value += $arg->value(); |
|
24 | } |
||
25 | 28 | return $this->newReturnType('Number', abs($value)); |
|
26 | } |
||
27 | } |
||
28 |