Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
50 | 83 | public static function funcSumNoStrings(...$args) |
|
51 | { |
||
52 | 83 | $returnValue = 0; |
|
53 | |||
54 | // Loop through the arguments |
||
55 | 83 | foreach (Functions::flattenArray($args) as $arg) { |
|
56 | // Is it a numeric value? |
||
57 | 83 | if (is_numeric($arg)) { |
|
58 | 81 | $returnValue += $arg; |
|
59 | 24 | } elseif (Functions::isError($arg)) { |
|
60 | 2 | return $arg; |
|
61 | } else { |
||
62 | 23 | return Functions::VALUE(); |
|
63 | } |
||
64 | } |
||
65 | |||
66 | 63 | return $returnValue; |
|
67 | } |
||
69 |