Conditions | 3 |
Paths | 3 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
19 | protected function main() |
||
20 | { |
||
21 | $path = $this->getSiteConfiguration()->getFilePath() . '/team.json'; |
||
22 | $json = file_get_contents($path); |
||
23 | |||
24 | $teamData = json_decode($json, true); |
||
25 | |||
26 | $active = array(); |
||
27 | $inactive = array(); |
||
28 | |||
29 | foreach ($teamData as $name => $item) { |
||
30 | if (count($item['Role']) == 0) { |
||
31 | $inactive[$name] = $item; |
||
32 | } |
||
33 | else { |
||
34 | $active[$name] = $item; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | $this->assign('developer', $this->assocArrayShuffle($active)); |
||
39 | $this->assign('inactiveDeveloper', $this->assocArrayShuffle($inactive)); |
||
40 | $this->setTemplate('team/team.tpl'); |
||
41 | } |
||
56 |