Passed
Push — master ( 395e1e...8a0601 )
by Nicolas
08:55
created
public/php/main/games/games_release_main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $desc[] = "in ".join(
61 61
             ", ",
62 62
             array_map(
63
-                function ($location) {
63
+                function($location) {
64 64
                     return $location->getName();
65 65
                 },
66 66
                 $release_locations
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     if (count($dumps) > 0) {
81
-        $items[] = count($dumps). " downloads";
81
+        $items[] = count($dumps)." downloads";
82 82
     }
83 83
 
84 84
     $description = join(" ", $desc);
@@ -135,4 +135,4 @@  discard block
 block discarded – undo
135 135
     $dumps
136 136
 ));
137 137
 
138
-$smarty->display("file:" . $mainsite_template_folder. "games/games_release_main.html");
138
+$smarty->display("file:".$mainsite_template_folder."games/games_release_main.html");
Please login to merge, or discard this patch.
public/php/main/games/games_main_list.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
                                 )
578 578
                                 or die("Database error - selecting screenshots");
579 579
 
580
-                                while ($screenshot_result =  $sql_screenshots->fetch_array(MYSQLI_BOTH)) {
580
+                                while ($screenshot_result = $sql_screenshots->fetch_array(MYSQLI_BOTH)) {
581 581
                                     //Ready screenshots path and filename
582 582
                                     $screenshot_image = $game_boxscan_path;
583 583
                                     $screenshot_image .= $screenshot_result['game_boxscan_id'];
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
                                     ORDER BY RAND() LIMIT 1"
597 597
                                 ) or die("Database error - selecting screenshots");
598 598
 
599
-                                while ($screenshot_result =  $sql_screenshots->fetch_array(MYSQLI_BOTH)) {
599
+                                while ($screenshot_result = $sql_screenshots->fetch_array(MYSQLI_BOTH)) {
600 600
                                     //Ready screenshots path and filename
601 601
                                     $screenshot_image = $game_screenshot_path;
602 602
                                     $screenshot_image .= $screenshot_result['screenshot_id'];
@@ -651,19 +651,19 @@  discard block
 block discarded – undo
651 651
                         header("Location: ../games/games_detail.php?game_id=$game_id_1_result");
652 652
                     }
653 653
 
654
-                    $rest4 = $i%4;
654
+                    $rest4 = $i % 4;
655 655
                     $smarty->assign("rest4", $rest4);
656 656
 
657
-                    $rest3 = $i%3;
657
+                    $rest3 = $i % 3;
658 658
                     $smarty->assign("rest3", $rest3);
659 659
 
660
-                    $rest2 = $i%2;
660
+                    $rest2 = $i % 2;
661 661
                     $smarty->assign("rest2", $rest2);
662 662
 
663 663
                     $smarty->assign("query_time", $time_elapsed_secs);
664 664
 
665 665
                     //Send all smarty variables to the templates
666
-                    $smarty->display("file:" . $mainsite_template_folder . "games/games_main_list.html");
666
+                    $smarty->display("file:".$mainsite_template_folder."games/games_main_list.html");
667 667
                 }
668 668
             } else {
669 669
                 $edit_message             = "No entries found for your selection";
Please login to merge, or discard this patch.
public/php/main/games/games_main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 // get the genres for the genre dropdown
46 46
 $smarty->assign('game_genre', $GameGenreDao->getAllGameGenres());
47 47
 
48
-if (isset($mode) and ($mode ==! '')) {
48
+if (isset($mode) and ($mode == !'')) {
49 49
     $smarty->assign("mode", $mode);
50 50
 } else {
51 51
     $smarty->assign("mode", "standard");
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 //Send all smarty variables to the templates
71
-$smarty->display("file:" . $mainsite_template_folder. "games/games_main.html");
71
+$smarty->display("file:".$mainsite_template_folder."games/games_main.html");
72 72
 
73 73
 //close the connection
74 74
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/main/games/games_reviews_detail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 //***********************************************************************************
24 24
 //Let's get all the review and author data
25 25
 //***********************************************************************************
26
-$count= 0;
26
+$count = 0;
27 27
 
28 28
 $sql_review = $mysqli->query(
29 29
     "SELECT * FROM game
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do
149 149
         //a conversion to a <br>. However, when we edit a comment, this <br> should not be
150 150
         //visible to the user, hence again, now this conversion in php
151
-    $breaks = array("<br />","<br>","<br/>");
151
+    $breaks = array("<br />", "<br>", "<br/>");
152 152
     $comment = str_ireplace($breaks, "\r\n", $comment);
153 153
 
154 154
     $date = date("d/m/y", $query_comment['timestamp']);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 }
173 173
 
174 174
 //Send all smarty variables to the templates
175
-$smarty->display("file:" . $mainsite_template_folder . "games/games_reviews_detail.html");
175
+$smarty->display("file:".$mainsite_template_folder."games/games_reviews_detail.html");
176 176
 
177 177
 //close the connection
178 178
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/main/front/front.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 if (isset($action) and $action == 'construction') {
61 61
     $_SESSION['edit_message'] = 'This section will be available soon - currently under construction';
62 62
     if (isset($_SERVER['HTTP_REFERER'])) {
63
-        header('Location: ' . $_SERVER['HTTP_REFERER']);
63
+        header('Location: '.$_SERVER['HTTP_REFERER']);
64 64
     } else {
65 65
         header('Location: /');
66 66
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 //We are using this var to have the frontpage animation happen only once we visit AL
71
-if (isset($action) and $action=='first_time') {
71
+if (isset($action) and $action == 'first_time') {
72 72
     $smarty->assign('smarty_action', 'first_time');
73 73
 }
74 74
 
Please login to merge, or discard this patch.
public/php/main/front/sitemap_games.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 // Letter parameter is mandatory, and must only have one character
15 15
 // which is a letter, number or '-'
16
-if (! isset($letter) || !preg_match("/^[a-z0-9-]$/i", $letter)) {
16
+if (!isset($letter) || !preg_match("/^[a-z0-9-]$/i", $letter)) {
17 17
     http_response_code(400);
18 18
     exit();
19 19
 }
Please login to merge, or discard this patch.
public/php/main/news/news.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
 require "../../common/tiles/did_you_know_tile.php";
22 22
 require "../../common/tiles/latest_comments_tile.php";
23 23
 
24
-$v_counter= (isset($_GET["v_counter"]) ? $_GET["v_counter"] : 0);
24
+$v_counter = (isset($_GET["v_counter"]) ? $_GET["v_counter"] : 0);
25 25
 
26 26
 //Select the news from the DB
27 27
 $query_news = $mysqli->query(
28 28
     "SELECT * FROM news
29 29
                                LEFT JOIN news_image ON (news.news_image_id = news_image.news_image_id)
30 30
                                LEFT JOIN users ON (news.user_id = users.user_id)
31
-                               ORDER BY news.news_date DESC LIMIT  " . $v_counter . ", 6"
31
+                               ORDER BY news.news_date DESC LIMIT  " . $v_counter.", 6"
32 32
 );
33 33
 
34 34
 //check the number of news updates
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 //Check if back arrow is needed
69 69
 if ($v_counter > 0) {
70 70
     // Build the link
71
-    $v_linkback =('?v_counter=' . ($v_counter - 6));
71
+    $v_linkback = ('?v_counter='.($v_counter - 6));
72 72
 }
73 73
 
74 74
 //Check if we need to place a next arrow
75 75
 if ($v_rows > ($v_counter + 6)) {
76 76
     //Build the link
77
-    $v_linknext =('?v_counter=' . ($v_counter + 6));
77
+    $v_linknext = ('?v_counter='.($v_counter + 6));
78 78
 }
79 79
 
80 80
 if (empty($c_counter)) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 );
96 96
 
97 97
 //Send all smarty variables to the templates
98
-$smarty->display("file:" . $mainsite_template_folder . "news/news.html");
98
+$smarty->display("file:".$mainsite_template_folder."news/news.html");
99 99
 
100 100
 //close the connection
101 101
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/main/interviews/db_interviews_detail.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 require "../../config/admin.php";
19 19
 
20 20
 if (isset($action)) {
21
-    if ($action=='delete_comment') {
21
+    if ($action == 'delete_comment') {
22 22
         create_log_entry('Interviews', $comment_id, 'Comment', $comment_id, 'Delete', $_SESSION['user_id']);
23 23
 
24 24
         $sql = $mysqli->query("DELETE FROM interview_user_comments WHERE comment_id = '$comment_id'")
25 25
             or die("couldn't delete game_comment quote");
26 26
         $sql = $mysqli->query("DELETE FROM comments WHERE comments_id = '$comment_id'")
27 27
             or die("couldn't delete comment quote");
28
-    } elseif ($action=="save_comment") {
28
+    } elseif ($action == "save_comment") {
29 29
         //$data = $_POST['data'];
30 30
         $data = $mysqli->real_escape_string($data);
31 31
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do
80 80
         //a conversion to a <br>. However, when we edit a comment, this <br> should not be
81 81
         //visible to the user, hence again, now this conversion in php
82
-        $breaks = array("<br />","<br>","<br/>");
82
+        $breaks = array("<br />", "<br>", "<br/>");
83 83
         $comment = str_ireplace($breaks, "\r\n", $comment);
84 84
 
85 85
         $date = date("d/m/y", $query_comment['timestamp']);
@@ -106,5 +106,5 @@  discard block
 block discarded – undo
106 106
     $smarty->assign('selected_interview_id', $interview_id);
107 107
 
108 108
     //Send all smarty variables to the templates
109
-    $smarty->display("file:" . $mainsite_template_folder . "interviews/ajax_interviews_detail_comments.html");
109
+    $smarty->display("file:".$mainsite_template_folder."interviews/ajax_interviews_detail_comments.html");
110 110
 }
Please login to merge, or discard this patch.
public/php/main/interviews/interviews_detail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     //However, when we edit a comment, this <br> should not be visible to the user, hence again,
191 191
     //now this conversion in php
192 192
 
193
-    $breaks  = array(
193
+    $breaks = array(
194 194
         "<br />",
195 195
         "<br>",
196 196
         "<br/>"
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 }
219 219
 
220 220
 //Send all smarty variables to the templates
221
-$smarty->display("file:" . $mainsite_template_folder . "interviews/interviews_detail.html");
221
+$smarty->display("file:".$mainsite_template_folder."interviews/interviews_detail.html");
222 222
 
223 223
 //close the connection
224 224
 mysqli_close($mysqli);
Please login to merge, or discard this patch.