Completed
Push — master ( 40b7eb...708e0f )
by Christian
07:55
created
html/user/per_app_list.php 3 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@  discard block
 block discarded – undo
29 29
 // return a column title (Average or Total),
30 30
 // hyperlinked if this is not the current sort column
31 31
 //
32
+/**
33
+ * @param integer $i
34
+ */
32 35
 function col_title($is_team, $app, $appid, $is_total, $i) {
33 36
     $x = $i?"Total":"Average";
34 37
     if ($app->id == $appid && ($is_total?$i:!$i)) {
@@ -62,6 +65,9 @@  discard block
 block discarded – undo
62 65
 
63 66
 // show a user or team, with their credit for each app
64 67
 //
68
+/**
69
+ * @param integer $i
70
+ */
65 71
 function show_row($item, $apps, $is_team, $i) {
66 72
     if ($is_team) {
67 73
         $team = BoincTeam::lookup_id($item->teamid);
@@ -96,6 +102,9 @@  discard block
 block discarded – undo
96 102
     echo "</tr>\n";
97 103
 }
98 104
 
105
+/**
106
+ * @param string $appid
107
+ */
99 108
 function show_list($is_team, $appid, $is_total) {
100 109
     $x = $is_team?"teams":"participants";
101 110
     page_head("Top $x by application");
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 // hyperlinked if this is not the current sort column
31 31
 //
32 32
 function col_title($is_team, $app, $appid, $is_total, $i) {
33
-    $x = $i?"Total":"Average";
34
-    if ($app->id == $appid && ($is_total?$i:!$i)) {
33
+    $x = $i ? "Total" : "Average";
34
+    if ($app->id == $appid && ($is_total ? $i : !$i)) {
35 35
         return $x;
36 36
     } else {
37 37
         return "<a href=per_app_list.php?appid=$app->id&is_team=$is_team&is_total=$i>$x</a>";
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     echo "<tr>";
52 52
     echo "<th>Rank</th><th>Name</th>\n";
53 53
     foreach ($apps as $app) {
54
-        for ($i=0; $i<2; $i++) {
54
+        for ($i = 0; $i < 2; $i++) {
55 55
             $x = col_title($is_team, $app, $appid, $is_total, $i);
56 56
             echo "<th>$x</th>\n";
57 57
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     } else {
71 71
         $user = BoincUser::lookup_id($item->userid);
72 72
         if (!$user) return;
73
-        $x= "<td>".user_links($user, BADGE_HEIGHT_MEDIUM)."</td>\n";
73
+        $x = "<td>".user_links($user, BADGE_HEIGHT_MEDIUM)."</td>\n";
74 74
     }
75 75
     echo "<tr>";
76 76
     echo "<td>$i</td>\n";
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 }
98 98
 
99 99
 function show_list($is_team, $appid, $is_total) {
100
-    $x = $is_team?"teams":"participants";
100
+    $x = $is_team ? "teams" : "participants";
101 101
     page_head("Top $x by application");
102 102
     $apps = BoincApp::enum("deprecated=0");
103 103
     if (!$appid) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     }
106 106
     start_table('table-striped');
107 107
     show_header($is_team, $apps, $appid, $is_total);
108
-    $x = $is_total?"total":"expavg";
108
+    $x = $is_total ? "total" : "expavg";
109 109
     if ($is_team) {
110 110
         $items = BoincCreditTeam::enum("appid=$appid order by $x desc");
111 111
     } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
 function show_list($is_team, $appid, $is_total) {
100 100
     $x = $is_team?"teams":"participants";
101
-    page_head("Top $x by application");
101
+    page_head("top $x by application");
102 102
     $apps = BoincApp::enum("deprecated=0");
103 103
     if (!$appid) {
104 104
         $appid = $apps[0]->id;
Please login to merge, or discard this patch.