Passed
Push — dpa_docker_wrapper12 ( e18bd7 )
by David
08:59
created
html/ops/cancel_wu_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 $wuid2 = get_int('wuid2');
31 31
 $unsent_only = get_str('unsent_only', true);
32 32
 
33
-if ($wuid1<1 || $wuid2<$wuid1) {
33
+if ($wuid1 < 1 || $wuid2 < $wuid1) {
34 34
     admin_error_page(
35 35
         "<h2>Workunit IDs fail to satisfy the conditions:<p> 0 < ID1 <= ID2"
36 36
     );
Please login to merge, or discard this patch.
html/ops/profile_screen_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 db_init();
25 25
 
26 26
 admin_page_head("screen profile action");
27
-for ($i=0; $i<$n; $i++) {
27
+for ($i = 0; $i < $n; $i++) {
28 28
     $y = "user".$i;
29 29
     $val = $_GET[$y];
30 30
     $x = "userid".$i;
Please login to merge, or discard this patch.
html/ops/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 $apps = BoincApp::enum("");
156 156
 foreach ($apps as $app) {
157 157
     if (in_array($app->id, $show_only)
158
-       || ( in_array("all", $show_only)
158
+       || (in_array("all", $show_only)
159 159
           && (!$app->deprecated || $show_deprecated)
160 160
     )) {
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             <b>Results for <tt>$app->name</tt>:</b>
164 164
             <ul>
165 165
 ";
166
-        for ($i=0; $i<2; $i++) {
166
+        for ($i = 0; $i < 2; $i++) {
167 167
             if ($i) {
168 168
                 $secs = 7*86400;
169 169
                 $period = "&nbsp;&nbsp;&nbsp;7 days";
Please login to merge, or discard this patch.
html/ops/create_forums.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
     return $db->insert_id();
42 42
 }
43 43
 
44
-function create_forum($category, $orderID, $title, $description, $is_dev_blog=0) {
44
+function create_forum($category, $orderID, $title, $description, $is_dev_blog = 0) {
45 45
     $q = "(category, orderID, title, description, is_dev_blog) values ($category, $orderID, '$title', '$description', $is_dev_blog)";
46 46
     $db = BoincDB::get();
47
-    $result = $db->insert("forum",$q);
47
+    $result = $db->insert("forum", $q);
48 48
     if (!$result) {
49 49
         $forum = BoincForum::lookup("category=$category and title='$title'");
50 50
         if ($forum) return $forum->id;
Please login to merge, or discard this patch.
html/user/team_email_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
     echo "<users>\n";
52 52
     $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
53
-    foreach($users as $user) {
53
+    foreach ($users as $user) {
54 54
         show_team_member($user, $creditonly);
55 55
     }
56 56
     echo "</users>\n";
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
84
-foreach($users as $user) {
84
+foreach ($users as $user) {
85 85
     if ($plain) {
86 86
         echo "$user->name $user->id\n";
87 87
     } else {
Please login to merge, or discard this patch.
html/user/prefs_remove.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 $venue = get_str("venue");
30 30
 $confirmed = get_str("confirmed", true);
31 31
 $columns = get_int("cols", true);
32
-$c = $columns?"&cols=$columns":"";
32
+$c = $columns ? "&cols=$columns" : "";
33 33
 
34 34
 if ($confirmed) {
35 35
     if ($subset == "global") {
Please login to merge, or discard this patch.
html/user/forum_rate.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     $rating = post_int('rating', true);
35 35
     if (!$choice) $choice = get_str('choice', true);
36 36
 
37
-    if ($choice == SOLUTION or $choice=="p") {
37
+    if ($choice == SOLUTION or $choice == "p") {
38 38
         $rating = 1;
39 39
     } else {
40 40
         $rating = -1;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     // Make sure the user has the forum's minimum amount of RAC and total credit
54 54
     // before allowing them to rate a post.
55 55
     //
56
-    if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) {
56
+    if ($user->total_credit < $forum->rate_min_total_credit || $user->expavg_credit < $forum->rate_min_expavg_credit) {
57 57
         error_page(tra("You need more average or total credit to rate a post."));
58 58
     }
59 59
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     $user = get_logged_in_user();
44 44
 
45 45
     if ($choice == null && ($rating == null || $rating > 2 || $rating < -2)) {
46
-        show_result_page(false, NULL, NULL, $choice);
46
+        show_result_page(false, null, null, $choice);
47 47
     }
48 48
 
49 49
     $post = BoincPost::lookup_id($post_id);
Please login to merge, or discard this patch.
html/user/pending.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $sum = 0;
48 48
     echo "<pending_credit>\n";
49 49
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
50
-    foreach($results as $result) {
50
+    foreach ($results as $result) {
51 51
         echo "<result>\n";
52 52
         echo "    <resultid>".$result->id."</resultid>\n";
53 53
         echo "    <workunitid>".$result->workunitid."</workunitid>\n";
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     start_table();
68 68
     echo "<tr><th>".tra("Result ID")."</th><th>".tra("Workunit ID")."</th><th>".tra("Host ID")."</th><th>".tra("Claimed credit")."</th></tr>\n";
69 69
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
70
-    foreach($results as $result) {
70
+    foreach ($results as $result) {
71 71
         echo "<tr>\n";
72 72
         echo "<td><a href=\"result.php?resultid=$result->id\">$result->id</a></td>\n";
73 73
         echo "<td><a href=\"workunit.php?wuid=$result->workunitid\">$result->workunitid</a></td>\n";
Please login to merge, or discard this patch.
html/user/profile_menu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 start_table();
42 42
 
43 43
 $today = getdate(time());
44
-$UOTD_heading = tra("User of the Day")." -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year'];
44
+$UOTD_heading = tra("User of the Day")." -- ".$today['month']." ".$today['mday'].", ".$today['year'];
45 45
 row1($UOTD_heading);
46 46
 echo "<tr><td>";
47 47
     $profile = get_current_uotd();
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 row1(tra("User Profile Explorer"));
60 60
 echo "<tr><td>
61 61
     <ul>
62
-    <li>".tra("View the %1 User Picture Gallery %2.", "<a href=\"" . url_base() . "user_profile/user_gallery_1.html\">", "</a>")."</li>
63
-    <li>".tra("Browse profiles %1 by country %2.", "<a href=\"" . url_base() . "user_profile/profile_country.html\">", "</a>")."</li>
62
+    <li>".tra("View the %1 User Picture Gallery %2.", "<a href=\"".url_base()."user_profile/user_gallery_1.html\">", "</a>")."</li>
63
+    <li>".tra("Browse profiles %1 by country %2.", "<a href=\"".url_base()."user_profile/profile_country.html\">", "</a>")."</li>
64 64
     <li>".tra("Browse profiles %1 at random %2, %3 at random with pictures %2, or %4 at random without pictures %2.", "<a href=\"?cmd=rand&amp;pic=-1\">", "</a>",
65 65
             "<a href=\"?cmd=rand&amp;pic=1\">", "<a href=\"?cmd=rand&amp;pic=0\">")."</li>
66 66
 ";
67
-if (file_exists(PROFILE_PATH . "profile_alpha.html")) {
67
+if (file_exists(PROFILE_PATH."profile_alpha.html")) {
68 68
     echo "<li>".tra("Alphabetical profile listings:")."<br>";
69 69
 
70
-    include( PROFILE_PATH . "profile_alpha.html" );
70
+    include(PROFILE_PATH."profile_alpha.html");
71 71
 }
72 72
 echo "</ul></td></tr>";
73 73
 
Please login to merge, or discard this patch.