| Conditions | 6 |
| Paths | 5 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function scoreArgument($argument) |
||
| 42 | { |
||
| 43 | if (!$argument instanceof \Traversable && !is_array($argument)) { |
||
| 44 | return false; |
||
| 45 | } |
||
| 46 | |||
| 47 | $scores = array(); |
||
| 48 | foreach ($argument as $key => $argumentEntry) { |
||
| 49 | $scores[] = $this->value->scoreArgument($argumentEntry); |
||
| 50 | } |
||
| 51 | |||
| 52 | if (empty($scores) || in_array(false, $scores, true)) { |
||
| 53 | return false; |
||
| 54 | } |
||
| 55 | |||
| 56 | return array_sum($scores) / count($scores); |
||
|
|
|||
| 57 | } |
||
| 58 | |||
| 83 |