Passed
Push — master ( 14e287...f4a883 )
by Nicolas
03:36
created
public/php/common/DAO/DumpDAO.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
         );
35 35
     }
36 36
 
37
-     /**
38
-     * Add a dump to a media
39
-     *
40
-     * @param int media_id
41
-     * @param varchar format
42
-     * @param varchar file name
43
-     * @param text info
44
-     */
37
+        /**
38
+         * Add a dump to a media
39
+         *
40
+         * @param int media_id
41
+         * @param varchar format
42
+         * @param varchar file name
43
+         * @param text info
44
+         */
45 45
     public function addDumpToMedia(
46 46
         $media_id,
47 47
         $format,
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
         return $dump;
190 190
     }
191 191
 
192
-      /**
193
-     * delete a dump from a media
194
-     *
195
-     * @param int dump_id
196
-     */
192
+        /**
193
+         * delete a dump from a media
194
+         *
195
+         * @param int dump_id
196
+         */
197 197
     public function deleteDumpFromMedia($dump_id, $game_file_path) {
198 198
         $stmt = \AL\Db\execute_query(
199 199
             "DumpDAO: deleteDumpFromMedia",
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Dump/Dump.php" ;
6
-require_once __DIR__."/../Model/User/User.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/Dump.php";
6
+require_once __DIR__."/../Model/User/User.php";
7 7
 require_once __DIR__."/../../vendor/autoload.php";
8 8
 
9 9
 /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
             // Obtain the contentlist of the zip file.
66 66
             if (($list = $zip->listContent()) == 0) {
67
-                die("Error : " . $zip->errorInfo(true));
67
+                die("Error : ".$zip->errorInfo(true));
68 68
             }
69 69
 
70 70
             // Get the filename from the returned array
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $ext = strtolower($ext[1]);
81 81
 
82 82
             // check if the extention is valid.
83
-            if ($ext == "stx" || $ext == "msa" || $ext == "st"  || $file_ext == "scp") { // pretty isn't it? ;)
83
+            if ($ext == "stx" || $ext == "msa" || $ext == "st" || $file_ext == "scp") { // pretty isn't it? ;)
84 84
             } else {
85 85
                 exit("Try uploading a diskimage type that is allowed, like stx or msa not $ext");
86 86
             }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             $archive = new \PclZip("$tempfilename");
111 111
 
112 112
             if ($archive->extract(PCLZIP_OPT_PATH, "$game_file_temp_path") == 0) {
113
-                die("Error : " . $archive->errorInfo(true));
113
+                die("Error : ".$archive->errorInfo(true));
114 114
             }
115 115
 
116 116
             // rename diskimage to increment number
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $v_list  = $archive->create("$game_file_temp_path$new_dump_id.$file_ext", PCLZIP_OPT_REMOVE_ALL_PATH);
129 129
         }
130 130
         if ($v_list == 0) {
131
-            die("Error : " . $archive->errorInfo(true));
131
+            die("Error : ".$archive->errorInfo(true));
132 132
         }
133 133
 
134 134
         // Time to do the safeties, here we do a sha512 file hash that we later enter into
Please login to merge, or discard this patch.
public/php/common/DAO/GameGenreDAO.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         $stmt->close();
105 105
     }
106 106
      
107
-     /**
108
-     * add a genre to the database
109
-     *
110
-     * @param varchar Genre
111
-     */
107
+        /**
108
+         * add a genre to the database
109
+         *
110
+         * @param varchar Genre
111
+         */
112 112
     public function addGenre($genre) {
113 113
         $stmt = \AL\Db\execute_query(
114 114
             "GameGenreDAO: addGenre",
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
     }
138 138
     
139 139
         /**
140
-     * update a genre
141
-     *
142
-     * @param int genre_id
143
-     * @param varchar genre_name
144
-     */
140
+         * update a genre
141
+         *
142
+         * @param int genre_id
143
+         * @param varchar genre_name
144
+         */
145 145
     public function updateGenre($genre_id, $genre_name) {
146 146
         $stmt = \AL\Db\execute_query(
147 147
             "GameGenreDAO: updateGenre",
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/GameGenre.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/GameGenre.php";
6 6
 
7 7
 /**
8 8
  * DAO for game genres
Please login to merge, or discard this patch.
public/php/common/DAO/GameReleaseAkaDAO.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -87,13 +87,13 @@
 block discarded – undo
87 87
         $stmt->close();
88 88
     }
89 89
 
90
-     /**
91
-     * Delete an AKA for a release
92
-     *
93
-     * @param integer Game_release_aka_id
94
-     * @param integer Game_release_id
95
-     *
96
-     */
90
+        /**
91
+         * Delete an AKA for a release
92
+         *
93
+         * @param integer Game_release_aka_id
94
+         * @param integer Game_release_id
95
+         *
96
+         */
97 97
     public function deleteAkaForRelease($game_release_aka_id, $game_release_id) {
98 98
         $stmt = \AL\Db\execute_query(
99 99
             "GameReleaseAkaDAO: DeleteAkaForRelease",
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/GameReleaseAka.php" ;
6
-require_once __DIR__."/../Model/Language/Language.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/GameReleaseAka.php";
6
+require_once __DIR__."/../Model/Language/Language.php";
7 7
 
8 8
 /**
9 9
  * DAO for Game Releases AKAs
Please login to merge, or discard this patch.
public/php/common/DAO/TosDAO.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
         return $tos_versions;
46 46
     }
47 47
 
48
-     /**
49
-     * Get all tos IDs incompatible with a release
50
-     *
51
-     * @param integer Release ID
52
-     * @return integer[] List of incompatible TOS IDs
53
-     */
48
+        /**
49
+         * Get all tos IDs incompatible with a release
50
+         *
51
+         * @param integer Release ID
52
+         * @return integer[] List of incompatible TOS IDs
53
+         */
54 54
     public function getIncompatibleTosForRelease($release_id) {
55 55
         $stmt = \AL\Db\execute_query(
56 56
             "TosDAO: getIncompatibleTosForRelease",
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
 
147
-     /**
148
-     * add a tos to the database
149
-     *
150
-     * @param varchar tos
151
-     */
147
+        /**
148
+         * add a tos to the database
149
+         *
150
+         * @param varchar tos
151
+         */
152 152
     public function addTos($tos) {
153 153
         $stmt = \AL\Db\execute_query(
154 154
             "TosDAO: addTos",
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
         $stmt->close();
177 177
     }
178 178
 
179
-     /**
180
-     * update a tos version
181
-     *
182
-     * @param int tos_id
183
-     * @param varchar tos_name
184
-     */
179
+        /**
180
+         * update a tos version
181
+         *
182
+         * @param int tos_id
183
+         * @param varchar tos_name
184
+         */
185 185
     public function updateTos($tos_id, $tos_name) {
186 186
         $stmt = \AL\Db\execute_query(
187 187
             "TosDAO: updateTos",
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/Tos.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Tos.php";
6 6
 
7 7
 /**
8 8
  * DAO for Tos versions
Please login to merge, or discard this patch.
public/php/common/DAO/MediaScanDAO.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
         $this->mysqli = $mysqli;
16 16
     }
17 17
 
18
-     /**
19
-     * Add a mediaScan to a media
20
-     *
21
-     * @param int release_id
22
-     * @param int media_type_id
23
-     */
18
+        /**
19
+         * Add a mediaScan to a media
20
+         *
21
+         * @param int release_id
22
+         * @param int media_type_id
23
+         */
24 24
     public function addMediaScanToMedia($media_id, $scan_type_id, $media_scan_save_path, $image) {
25 25
 
26 26
         foreach ($image['tmp_name'] as $key => $tmp_name) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Dump/MediaScan.php" ;
6
-require_once __DIR__."/../Model/Dump/MediaScanType.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/MediaScan.php";
6
+require_once __DIR__."/../Model/Dump/MediaScanType.php";
7 7
 
8 8
 /**
9 9
  * DAO for MediaScan
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $media_scan_id = null;
146 146
         if ($stmt->fetch()) {
147
-            $media_scan_id  = new \AL\Common\Model\Dump\MediaScan(
147
+            $media_scan_id = new \AL\Common\Model\Dump\MediaScan(
148 148
                 $media_scan_id, null, null, null
149 149
             );
150 150
         }
Please login to merge, or discard this patch.
public/php/common/DAO/NewsDAO.php 2 patches
Indentation   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -155,10 +155,9 @@  discard block
 block discarded – undo
155 155
     }
156 156
 
157 157
     /**
158
-    * Return a specific news article
159
-
160
-    * @return \AL\Common\Model\News\News A single news
161
-    */
158
+     * Return a specific news article
159
+     * @return \AL\Common\Model\News\News A single news
160
+     */
162 161
     public function getNews($news_id) {
163 162
         $stmt = \AL\Db\execute_query(
164 163
             "NewsDAO: getNews",
@@ -239,9 +238,9 @@  discard block
 block discarded – undo
239 238
     }
240 239
 
241 240
     /**
242
-    * Get the total count of news on the website
243
-    * @return number Total number of news
244
-    */
241
+     * Get the total count of news on the website
242
+     * @return number Total number of news
243
+     */
245 244
     public function getNewsCount() {
246 245
         $stmt = \AL\Db\execute_query(
247 246
             "NewsDAO: getNewsCount",
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/News/News.php" ;
6
-require_once __DIR__."/../Model/User/User.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/News/News.php";
6
+require_once __DIR__."/../Model/User/User.php";
7 7
 
8 8
 /**
9 9
  * DAO for News
Please login to merge, or discard this patch.
public/php/common/DAO/UserDAO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/User/User.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/User/User.php";
6 6
 
7 7
 /**
8 8
  * DAO for User
Please login to merge, or discard this patch.
public/php/common/DAO/ValidateLinkDAO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5 5
 
6 6
 /**
7 7
  * DAO for links submitted by users that need to be validated
Please login to merge, or discard this patch.
public/php/common/DAO/GameReleaseScanDAO.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @param string $imgext Image extension
36 36
      *
37 37
      * @return int ID of the newly created scan
38
-    */
38
+     */
39 39
     public function addScanToRelease($game_release_id, $type, $imgext, $notes) {
40 40
         $stmt = \AL\Db\execute_query(
41 41
             "GameReleaseScanDAO: addScanToRelease",
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace AL\Common\DAO;
3 3
 
4
-require_once __DIR__."/../../lib/Db.php" ;
5
-require_once __DIR__."/../Model/Game/GameReleaseScan.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/GameReleaseScan.php";
6 6
 
7 7
 /**
8 8
  * DAO for Game Release Scans
Please login to merge, or discard this patch.