Total Complexity | 12 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 77.78% |
Changes | 0 |
1 | <?php |
||
8 | class HomeModel |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Show all items. |
||
13 | * |
||
14 | * @return object as a response object |
||
15 | */ |
||
16 | 2 | public function recentTopics($topics) |
|
17 | { |
||
18 | 2 | $arrayRes = []; |
|
19 | 2 | foreach (array_reverse($topics) as $q) { |
|
20 | if (count($topics)-3 < $q->id) { |
||
21 | array_push($arrayRes, $q->topic); |
||
22 | } |
||
23 | } |
||
24 | 2 | return $arrayRes; |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * Show all items. |
||
29 | * |
||
30 | * @return object as a response object |
||
31 | */ |
||
32 | 2 | public function topUsers($users) |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Show all items. |
||
46 | * |
||
47 | * @return object as a response object |
||
48 | */ |
||
49 | 2 | public function topTags($tags, $questions) |
|
69 |