| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function trending(string $type, string $sport = 'nfl', int $hours = 24, int $limit = 25): array |
||
| 33 | { |
||
| 34 | $type = strtolower($type); |
||
| 35 | if($type !== 'add' && $type !== 'drop') { |
||
| 36 | throw new \InvalidArgumentException('trending function only accepts type "add" or "drop". Input was: '. $type); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $this->get('players/'. $sport .'/trending/'. $type .'?lookback_hours='. $hours .'&limit='. $limit); |
||
| 40 | } |
||
| 43 |