Conditions | 4 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | public function listTeams($args = []) |
||
8 | { |
||
9 | $response = $this->call('listTeams', $args); |
||
10 | |||
11 | $teams = []; |
||
12 | |||
13 | if (is_object($response) === true) { |
||
14 | if (isset($response->teams)) { |
||
15 | foreach($response->teams as $tm) { |
||
16 | $team = new Twitch\Team; |
||
17 | $team->setName($tm->name); |
||
18 | $team->setInfo($tm->info); |
||
19 | $team->setDisplayName($tm->display_name); |
||
20 | $team->setCreatedAt($tm->created_at); |
||
21 | $team->setUpdatedAt($tm->updated_at); |
||
22 | $team->setBackground($tm->background); |
||
23 | $team->setLogo($tm->logo); |
||
24 | $teams[] = $team; |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 | return $teams; |
||
29 | } |
||
30 | |||
46 | } |