Passed
Push — master ( 0483c6...e7012a )
by Nicolas
08:54
created
public/php/common/DAO/NewsSubmissionDAO.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
     }
51 51
     
52 52
     /**
53
-    * Return all news submissions, sorted by descending date
54
-    * @return \AL\Common\Model\News\News[] An array of news
55
-    */
53
+     * Return all news submissions, sorted by descending date
54
+     * @return \AL\Common\Model\News\News[] An array of news
55
+     */
56 56
     public function getAllSubmissions() {
57 57
         $stmt = \AL\Db\execute_query(
58 58
             "NewsSubmissionDAO: getAllSubmissions",
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
     }
113 113
     
114 114
     /**
115
-    * Return all news submissions, sorted by descending date
116
-    * @return \AL\Common\Model\News\News[] An array of news
117
-    */
115
+     * Return all news submissions, sorted by descending date
116
+     * @return \AL\Common\Model\News\News[] An array of news
117
+     */
118 118
     public function getAllSubmissionsForUser($user_id) {
119 119
         $stmt = \AL\Db\execute_query(
120 120
             "NewsSubmissionDAO: getAllSubmissions",
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
     
176 176
     
177 177
     /**
178
-    * Return a specific news submissions
179
-    * @return \AL\Common\Model\News\News[] An array of news
180
-    */
178
+     * Return a specific news submissions
179
+     * @return \AL\Common\Model\News\News[] An array of news
180
+     */
181 181
     public function getSpecificSubmissions($news_id) {
182 182
         $stmt = \AL\Db\execute_query(
183 183
             "NewsSubmissionDAO: getSpecificSubmissions",
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
     }
261 261
   
262 262
     /**
263
-    * Get the total count of comments on the website
264
-    *
265
-    * @param  integer $user_id Optional ID of a user to count comments for
266
-    * @return integer Number of comments     */
263
+     * Get the total count of comments on the website
264
+     *
265
+     * @param  integer $user_id Optional ID of a user to count comments for
266
+     * @return integer Number of comments     */
267 267
     public function getSubmissionCount($user_id = null) {
268 268
         if (isset($user_id)) {
269 269
             $stmt = \AL\Db\execute_query(
@@ -296,11 +296,11 @@  discard block
 block discarded – undo
296 296
     }
297 297
     
298 298
     /**
299
-    * Get the comment text for a specific comment
300
-    *
301
-    * @param  integer $comments_id ID of a comment
302
-    * @return text the text of the comment
303
-    */
299
+     * Get the comment text for a specific comment
300
+     *
301
+     * @param  integer $comments_id ID of a comment
302
+     * @return text the text of the comment
303
+     */
304 304
     public function getNewsText($news_id = null) {
305 305
         if (isset($news_id)) {
306 306
             $stmt = \AL\Db\execute_query(
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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__."/../../lib/functions.php" ;
6
-require_once __DIR__."/../Model/News/NewsSubmission.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../../lib/functions.php";
6
+require_once __DIR__."/../Model/News/NewsSubmission.php";
7 7
 
8 8
 use AL\Common\Model\NewsSubmission;
9 9
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     }
20 20
     
21 21
     private function getSubmissionQuery($user_id = null, $news_id = null) {
22
-        $query =  "SELECT
22
+        $query = "SELECT
23 23
                 news_submission.news_submission_id,
24 24
                   news_submission.news_headline,
25 25
                   news_submission.news_text, 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             //$text = InsertALCode($text);
234 234
             //$text = trim($text);
235 235
             //$text = RemoveSmillies($text);
236
-            $breaks = array("<br />","<br>","<br/>");
236
+            $breaks = array("<br />", "<br>", "<br/>");
237 237
             $text = str_ireplace($breaks, "\r\n", $text);
238 238
         
239 239
             $news[] = new \AL\Common\Model\NewsSubmission\NewsSubmission(
Please login to merge, or discard this patch.
public/php/common/DAO/GameReviewDAO.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/Review/GameReview.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Review/GameReview.php";
6 6
 
7 7
 /**
8 8
  * DAO for Game Review
Please login to merge, or discard this patch.
public/php/common/DAO/LinkCategoryDAO.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/Link/LinkCategory.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Link/LinkCategory.php";
6 6
 
7 7
 /**
8 8
  * DAO for Link Categories
Please login to merge, or discard this patch.
public/php/common/DAO/PortDAO.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
         return $ports;
46 46
     }
47 47
 
48
-     /**
49
-     * Get the game port for a game
50
-     *
51
-     * @param integer Game ID
52
-     *
53
-     * @return Port system of the game
54
-     */
48
+        /**
49
+         * Get the game port for a game
50
+         *
51
+         * @param integer Game ID
52
+         *
53
+         * @return Port system of the game
54
+         */
55 55
     public function getPortForGame($game_id) {
56 56
         $stmt = \AL\Db\execute_query(
57 57
             "PortDAO: getPortForGame",
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
     }
102 102
     
103 103
         /**
104
-     * add a port to the database
105
-     *
106
-     * @param varchar port
107
-     */
104
+         * add a port to the database
105
+         *
106
+         * @param varchar port
107
+         */
108 108
     public function addPort($port) {
109 109
         $stmt = \AL\Db\execute_query(
110 110
             "PortDAO: addPort",
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
     }
134 134
     
135 135
         /**
136
-     * update a port
137
-     *
138
-     * @param int port_id
139
-     * @param varchar port_name
140
-     */
136
+         * update a port
137
+         *
138
+         * @param int port_id
139
+         * @param varchar port_name
140
+         */
141 141
     public function updatePort($port_id, $port_name) {
142 142
         $stmt = \AL\Db\execute_query(
143 143
             "PortDAO: updatePort",
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/Port.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Port.php";
6 6
 
7 7
 /**
8 8
  * DAO for ports
Please login to merge, or discard this patch.
public/php/common/DAO/MemoryDAO.php 2 patches
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/Memory.php" ;
6
-require_once __DIR__."/../Model/Game/Enhancement.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Memory.php";
6
+require_once __DIR__."/../Model/Game/Enhancement.php";
7 7
 
8 8
 /**
9 9
  * DAO for memory
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
         $stmt->close();
103 103
     }
104 104
 
105
-     /**
106
-     * Update enhancement for memory
107
-     *
108
-     * @param integer Game Release ID
109
-     * @param integer memory ID
110
-     */
105
+        /**
106
+         * Update enhancement for memory
107
+         *
108
+         * @param integer Game Release ID
109
+         * @param integer memory ID
110
+         */
111 111
     public function updateMemoryForRelease($game_release_id, $memory_id, $enhancement_id) {
112 112
         $stmt = \AL\Db\execute_query(
113 113
             "MemoryDAO: UpdateMemoryForRelease",
@@ -123,12 +123,12 @@  discard block
 block discarded – undo
123 123
     }
124 124
 
125 125
 
126
-         /**
127
-     * Delete Memory enhancement for release
128
-     *
129
-     * @param integer Game Release ID
130
-     * @param integer memory ID
131
-     */
126
+            /**
127
+             * Delete Memory enhancement for release
128
+             *
129
+             * @param integer Game Release ID
130
+             * @param integer memory ID
131
+             */
132 132
     public function deleteMemoryForRelease($game_release_id, $memory_id) {
133 133
         $stmt = \AL\Db\execute_query(
134 134
             "MemoryDAO: DeleteMemoryForRelease",
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
         $stmt->close();
212 212
     }
213 213
 
214
-     /**
215
-     * Get list of incompatible memory IDs for a game release
216
-     *
217
-     * @param integer release ID
218
-     */
214
+        /**
215
+         * Get list of incompatible memory IDs for a game release
216
+         *
217
+         * @param integer release ID
218
+         */
219 219
     public function getMemoryIncompatibleForRelease($release_id) {
220 220
         $stmt = \AL\Db\execute_query(
221 221
             "MemoryDAO: getMemoryIncompatibleForRelease",
@@ -263,12 +263,12 @@  discard block
 block discarded – undo
263 263
         $stmt->close();
264 264
     }
265 265
 
266
-         /**
267
-     * Delete incompatible memory for release
268
-     *
269
-     * @param integer Game Release ID
270
-     * @param integer memory ID
271
-     */
266
+            /**
267
+             * Delete incompatible memory for release
268
+             *
269
+             * @param integer Game Release ID
270
+             * @param integer memory ID
271
+             */
272 272
     public function deleteMemoryIncompatibleForRelease($game_release_id, $memory_id) {
273 273
         $stmt = \AL\Db\execute_query(
274 274
             "MemoryDAO: deleteMemoryIncompatibleForRelease",
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
         $stmt->close();
282 282
     }
283 283
 
284
-     /**
285
-     * add a memory amount to the database
286
-     *
287
-     * @param varchar memory
288
-     */
284
+        /**
285
+         * add a memory amount to the database
286
+         *
287
+         * @param varchar memory
288
+         */
289 289
     public function addMemory($memory) {
290 290
         $stmt = \AL\Db\execute_query(
291 291
             "MemoryDAO: addMemory",
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
     }
315 315
 
316 316
         /**
317
-     * update a memory amount
318
-     *
319
-     * @param int memory_id
320
-     * @param varchar memory_memory
321
-     */
317
+         * update a memory amount
318
+         *
319
+         * @param int memory_id
320
+         * @param varchar memory_memory
321
+         */
322 322
     public function updateMemory($memory_id, $memory) {
323 323
         $stmt = \AL\Db\execute_query(
324 324
             "MemoryDAO: updateMemory",
Please login to merge, or discard this patch.
public/php/common/DAO/MediaDAO.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
         return $media;
52 52
     }
53 53
 
54
-     /**
55
-     * Add a media to a release
56
-     *
57
-     * @param int release_id
58
-     * @param int media_type_id
59
-     */
54
+        /**
55
+         * Add a media to a release
56
+         *
57
+         * @param int release_id
58
+         * @param int media_type_id
59
+         */
60 60
     public function addMediaToRelease($release_id, $type_id, $label) {
61 61
         $stmt = \AL\Db\execute_query(
62 62
             "MediaDAO: AddMediaToRelease",
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
         $stmt->close();
69 69
     }
70 70
 
71
-     /**
72
-     * delete a media from a release
73
-     *
74
-     * @param int media_id
75
-     */
71
+        /**
72
+         * delete a media from a release
73
+         *
74
+         * @param int media_id
75
+         */
76 76
     public function deleteMediaFromRelease($media_id) {
77 77
         $stmt = \AL\Db\execute_query(
78 78
             "MediaDAO: deleteMediaToRelease",
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
         $stmt->close();
85 85
     }
86 86
 
87
-     /**
88
-     * update a media label
89
-     *
90
-     * @param int media_id
91
-     * @param varchar label
92
-     */
87
+        /**
88
+         * update a media label
89
+         *
90
+         * @param int media_id
91
+         * @param varchar label
92
+         */
93 93
     public function updateMedia($media_id, $label, $media_type_id) {
94 94
         $stmt = \AL\Db\execute_query(
95 95
             "MediaDAO: setLabelFromMedia",
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/Dump/Media.php" ;
6
-require_once __DIR__."/../Model/Dump/MediaType.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/Media.php";
6
+require_once __DIR__."/../Model/Dump/MediaType.php";
7 7
 
8 8
 /**
9 9
  * DAO for Media
Please login to merge, or discard this patch.
public/php/common/DAO/EmulatorDAO.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
     }
127 127
 
128 128
 
129
-     /**
130
-     * Get all emulator IDs incompatible with a release
131
-     *
132
-     * @param integer Release ID
133
-     * @return integer[] List of incompatible emulator IDs
134
-     */
129
+        /**
130
+         * Get all emulator IDs incompatible with a release
131
+         *
132
+         * @param integer Release ID
133
+         * @return integer[] List of incompatible emulator IDs
134
+         */
135 135
     public function getIncompatibleEmulatorsWithNameForRelease($release_id) {
136 136
         $stmt = \AL\Db\execute_query(
137 137
             "EmulatorDAO: getIncompatibleEmulatorIdsForRelease",
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
     }
187 187
 
188 188
         /**
189
-     * add a emulator to the database
190
-     *
191
-     * @param varchar emulator
192
-     */
189
+         * add a emulator to the database
190
+         *
191
+         * @param varchar emulator
192
+         */
193 193
     public function addEmulator($emulator) {
194 194
         $stmt = \AL\Db\execute_query(
195 195
             "EmulatorDAO: addEmulator",
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
     }
219 219
 
220 220
         /**
221
-     * update a emulator
222
-     *
223
-     * @param int emulator_id
224
-     * @param varchar emulator_name
225
-     */
221
+         * update a emulator
222
+         *
223
+         * @param int emulator_id
224
+         * @param varchar emulator_name
225
+         */
226 226
     public function updateEmulator($emulator_id, $emulator_name) {
227 227
         $stmt = \AL\Db\execute_query(
228 228
             "EmulatorDAO: updateEmulator",
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/Emulator.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/Emulator.php";
6 6
 
7 7
 /**
8 8
  * DAO for Emulators
Please login to merge, or discard this patch.
public/php/common/DAO/SystemDAO.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
     }
219 219
 
220 220
         /**
221
-     * Set the list of system enhancements for a release
222
-     *
223
-     * @param integer Release ID
224
-     * @param integer[] system ID
225
-     * @param integer[] enhancement IDs
226
-     */
221
+         * Set the list of system enhancements for a release
222
+         *
223
+         * @param integer Release ID
224
+         * @param integer[] system ID
225
+         * @param integer[] enhancement IDs
226
+         */
227 227
     public function addEnhancedSystemForRelease($release_id, $system_id, $enhancement_id) {
228 228
 
229 229
         $stmt = \AL\Db\execute_query(
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
 
239 239
 
240 240
         /**
241
-     * update system enhancements for a release
242
-     *
243
-     * @param integer Release ID
244
-     * @param integer[] system ID
245
-     * @param integer[] enhancement IDs
246
-     */
241
+         * update system enhancements for a release
242
+         *
243
+         * @param integer Release ID
244
+         * @param integer[] system ID
245
+         * @param integer[] enhancement IDs
246
+         */
247 247
     public function updateEnhancedSystemForRelease($release_id, $system_id, $enhancement_id) {
248 248
 
249 249
         $stmt = \AL\Db\execute_query(
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
     }
261 261
 
262 262
         /**
263
-     * delete system enhancements for a release
264
-     *
265
-     * @param integer Release ID
266
-     * @param integer[] system ID
267
-     */
263
+         * delete system enhancements for a release
264
+         *
265
+         * @param integer Release ID
266
+         * @param integer[] system ID
267
+         */
268 268
     public function deleteEnhancedSystemForRelease($release_id, $system_id) {
269 269
 
270 270
         $stmt = \AL\Db\execute_query(
@@ -277,10 +277,10 @@  discard block
 block discarded – undo
277 277
     }
278 278
 
279 279
         /**
280
-     * add a system to the database
281
-     *
282
-     * @param varchar system
283
-     */
280
+         * add a system to the database
281
+         *
282
+         * @param varchar system
283
+         */
284 284
     public function addSystem($system) {
285 285
         $stmt = \AL\Db\execute_query(
286 286
             "SystemDAO: addSystem",
@@ -309,11 +309,11 @@  discard block
 block discarded – undo
309 309
     }
310 310
 
311 311
         /**
312
-     * update a system
313
-     *
314
-     * @param int system_id
315
-     * @param varchar system_name
316
-     */
312
+         * update a system
313
+         *
314
+         * @param int system_id
315
+         * @param varchar system_name
316
+         */
317 317
     public function updateSystem($system_id, $system_name) {
318 318
         $stmt = \AL\Db\execute_query(
319 319
             "SystemDAO: updateSystem",
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/System.php" ;
6
-require_once __DIR__."/../Model/Game/Enhancement.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Game/System.php";
6
+require_once __DIR__."/../Model/Game/Enhancement.php";
7 7
 
8 8
 /**
9 9
  * DAO for systems
Please login to merge, or discard this patch.
public/php/common/DAO/MediaTypeDAO.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
         return $media_types;
46 46
     }
47 47
 
48
-     /**
49
-     * add a media type to the database
50
-     *
51
-     * @param varchar media_type
52
-     */
48
+        /**
49
+         * add a media type to the database
50
+         *
51
+         * @param varchar media_type
52
+         */
53 53
     public function addMediaType($media_type) {
54 54
         $stmt = \AL\Db\execute_query(
55 55
             "MediaTypeDAO: addMediaType",
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     }
79 79
     
80 80
         /**
81
-     * update a media_type
82
-     *
83
-     * @param int media_type_id
84
-     * @param varchar media_type
85
-     */
81
+         * update a media_type
82
+         *
83
+         * @param int media_type_id
84
+         * @param varchar media_type
85
+         */
86 86
     public function updateMediaType($media_type_id, $media_type_name) {
87 87
         $stmt = \AL\Db\execute_query(
88 88
             "MediaTypeDAO: updateMediaType",
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/Dump/MediaType.php" ;
4
+require_once __DIR__."/../../lib/Db.php";
5
+require_once __DIR__."/../Model/Dump/MediaType.php";
6 6
 
7 7
 /**
8 8
  * DAO for Media Type
Please login to merge, or discard this patch.