| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function shareCount($response) |
||
| 35 | { |
||
| 36 | $count = static::jsonResponse($response); |
||
| 37 | $score = 0; |
||
| 38 | |||
| 39 | if (isset($count['data']['children'][0])) { |
||
| 40 | foreach ($count['data']['children'] as $child) { |
||
| 41 | $score += isset($child['data']['score']) ? intval($child['data']['score']) : 0; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return $score; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |