Passed
Push — master ( 14e287...f4a883 )
by Nicolas
03:36
created
public/php/main/games/games_detail.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -373,13 +373,13 @@
 block discarded – undo
373 373
                 $smarty->append(
374 374
                     'interviews',
375 375
                     array( 'ind_id' => $game_individual['id'],
376
-                           'ind_name' => $game_individual['ind_name'],
377
-                           'ind_img' => $v_ind_image,
378
-                           'int_id' => $interview['interview_id'],
379
-                           'int_text' => $int_text,
380
-                           'int_date' => $interview_date,
381
-                           'int_user_id' => $interview['user_id'],
382
-                           'int_userid' => $interview['userid']
376
+                            'ind_name' => $game_individual['ind_name'],
377
+                            'ind_img' => $v_ind_image,
378
+                            'int_id' => $interview['interview_id'],
379
+                            'int_text' => $int_text,
380
+                            'int_date' => $interview_date,
381
+                            'int_user_id' => $interview['user_id'],
382
+                            'int_userid' => $interview['userid']
383 383
                         )
384 384
                 );
385 385
             }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     if ($game_genres) {
94 94
         for ($i = 0; $i < count($game_genres); $i++) {
95 95
             $desc .= strtolower($game_genres[$i]->getName());
96
-            if ($i+1 < count($game_genres)) {
96
+            if ($i + 1 < count($game_genres)) {
97 97
                 $desc .= ", ";
98 98
             }
99 99
         }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             if ($v_ind_image != 'none') {
373 373
                 $smarty->append(
374 374
                     'interviews',
375
-                    array( 'ind_id' => $game_individual['id'],
375
+                    array('ind_id' => $game_individual['id'],
376 376
                            'ind_name' => $game_individual['ind_name'],
377 377
                            'ind_img' => $v_ind_image,
378 378
                            'int_id' => $interview['interview_id'],
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 // if no boxscans are attached
556 556
 $smarty->assign('numberscans', $imagenum_rows);
557 557
 
558
-$front=0;
558
+$front = 0;
559 559
 
560 560
 $game_boxscans_count = 0;
561 561
 
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
                 ."WHERE game_boxscan_cross=$rowimage[game_boxscan_id]"
582 582
             )
583 583
                 or die("Database error - selecting gamebox scan");
584
-            $couplerow        = $couple->fetch_row();
584
+            $couplerow = $couple->fetch_row();
585 585
 
586 586
             $back_image_filename = "$game_boxscan_save_path$rowimage[game_boxscan_id].$rowimage[imgext]";
587 587
             $back_image_pop_filename = "$game_boxscan_path$rowimage[game_boxscan_id].$rowimage[imgext]";
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 
603 603
 // Get box scans for all release
604 604
 // This is temporary until we revamp the games/relase details page
605
-$nr_of_release_scans=0;
605
+$nr_of_release_scans = 0;
606 606
 
607 607
 $smarty->assign('release_scans', []);
608 608
 foreach ($releases as $release) {
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
     //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do
648 648
     //a conversion to a <br>. However, when we edit a comment, this <br> should not be
649 649
     //visible to the user, hence again, now this conversion in php
650
-    $breaks = array("<br />","<br>","<br/>");
650
+    $breaks = array("<br />", "<br>", "<br/>");
651 651
     $comment = str_ireplace($breaks, "\r\n", $comment);
652 652
 
653 653
     $date = date("d/m/y", $query_comment['timestamp']);
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
     $pos_end = strpos($review_text, '[/frontpage]');
700 700
     $nr_char = $pos_end - $pos_start;
701 701
 
702
-    $review_text  = substr($review_text, $pos_start, $nr_char);
702
+    $review_text = substr($review_text, $pos_start, $nr_char);
703 703
     $review_text = nl2br($review_text);
704 704
     $review_text = InsertALCode($review_text); // disabled this as it wrecked the design.
705 705
     $review_text = trim($review_text);
@@ -875,9 +875,9 @@  discard block
 block discarded – undo
875 875
 
876 876
 //Send all smarty variables to the templates
877 877
 if (isset($use_new_layout)) {
878
-    $smarty->display("file:" . $mainsite_template_folder . "games/games_detail.new.html");
878
+    $smarty->display("file:".$mainsite_template_folder."games/games_detail.new.html");
879 879
 } else {
880
-    $smarty->display("file:" . $mainsite_template_folder . "games/games_detail.html");
880
+    $smarty->display("file:".$mainsite_template_folder."games/games_detail.html");
881 881
 }
882 882
 
883 883
 //close the connection
Please login to merge, or discard this patch.
public/php/main/games/games_comment_main.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
                 LEFT JOIN comments ON ( game_user_comments.comment_id = comments.comments_id )
57 57
                 LEFT JOIN users ON ( comments.user_id = users.user_id )
58 58
                 LEFT JOIN game ON ( game_user_comments.game_id = game.game_id )
59
-                 " . $where_clause . "
60
-                ORDER BY comments.timestamp DESC LIMIT  " . $v_counter . ", 5";
59
+                 " . $where_clause."
60
+                ORDER BY comments.timestamp DESC LIMIT  " . $v_counter.", 5";
61 61
 
62 62
 $sql_comment = $mysqli->query($sql_build);
63 63
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do
136 136
     //a conversion to a <br>. However, when we edit a comment, this <br> should not be
137 137
     //visible to the user, hence again, now this conversion in php
138
-    $breaks = array("<br />","<br>","<br/>");
138
+    $breaks = array("<br />", "<br>", "<br/>");
139 139
     $comment = str_ireplace($breaks, "\r\n", $comment);
140 140
 
141 141
     if ($query_comment['join_date'] == "") {
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
 //Check if back arrow is needed
185 185
 if ($v_counter > 0) {
186 186
     // Build the link
187
-    $v_linkback = ('?v_counter=' . ($v_counter - 5 . $users_comments));
187
+    $v_linkback = ('?v_counter='.($v_counter - 5.$users_comments));
188 188
 }
189 189
 
190 190
 //Check if we need to place a next arrow
191 191
 if ($v_rows > ($v_counter + 5)) {
192 192
     //Build the link
193
-    $v_linknext = ('?v_counter=' . ($v_counter + 5 . $users_comments));
193
+    $v_linknext = ('?v_counter='.($v_counter + 5.$users_comments));
194 194
 }
195 195
 
196 196
 if (empty($c_counter)) {
@@ -215,4 +215,4 @@  discard block
 block discarded – undo
215 215
 );
216 216
 
217 217
 //Send all smarty variables to the templates
218
-$smarty->display("file:" . $mainsite_template_folder . "games/games_comment_main.html");
218
+$smarty->display("file:".$mainsite_template_folder."games/games_comment_main.html");
Please login to merge, or discard this patch.
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.