Passed
Branch dev (a25f63)
by Darko
15:17
created
app/extensions/command/Version.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * Fetch git tag for latest version.
80 80
 	 *
81
-	 * @param null $path Optional path to the versions XML file.
82 81
 	 */
83 82
 	protected function git()
84 83
 	{
@@ -93,7 +92,6 @@  discard block
 block discarded – undo
93 92
 	/**
94 93
 	 * Fetch SQL latest patch version.
95 94
 	 *
96
-	 * @param null $path Optional path to the versions XML file.
97 95
 	 */
98 96
 	protected function sql()
99 97
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 	{
151 151
 		parent::_init();
152 152
 
153
-		$this->request->params['args'] += ['sqlcheck' => 'all'];    // Default to all versions/
153
+		$this->request->params['args'] += ['sqlcheck' => 'all']; // Default to all versions/
154 154
 		$this->versions = new Versions();
155 155
 	}
156 156
 }
Please login to merge, or discard this patch.
app/extensions/util/Versions.php 3 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -268,6 +268,9 @@  discard block
 block discarded – undo
268 268
 		}
269 269
 	}
270 270
 
271
+	/**
272
+	 * @param integer $property
273
+	 */
271 274
 	protected function isChanged($property)
272 275
 	{
273 276
 		return (($this->changes & $property) == $property);
@@ -309,6 +312,10 @@  discard block
 block discarded – undo
309 312
 		}
310 313
 	}
311 314
 
315
+	/**
316
+	 * @param string $methodOld
317
+	 * @param string $methodUse
318
+	 */
312 319
 	private function deprecated($methodOld, $methodUse)
313 320
 	{
314 321
 		trigger_error("This method ($methodOld) is deprecated. Please use '$methodUse' instead.",
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	/**
27 27
 	 * These constants are bitwise for checking what has changed.
28 28
 	 */
29
-	const UPDATED_GIT_TAG		= 1;
30
-	const UPDATED_SQL_DB_PATCH	= 2;
31
-	const UPDATED_SQL_FILE_LAST	= 4;
29
+	const UPDATED_GIT_TAG = 1;
30
+	const UPDATED_SQL_DB_PATCH = 2;
31
+	const UPDATED_SQL_FILE_LAST = 4;
32 32
 
33 33
 	/**
34 34
 	 * @var integer Bitwise mask of elements that have been changed.
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 		parent::_init();
306 306
 
307 307
 		if ($this->_config['git'] instanceof \app\extensions\util\Git) {
308
-			$this->git =& $this->_config['git'];
308
+			$this->git = & $this->_config['git'];
309 309
 		}
310 310
 	}
311 311
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,10 +110,12 @@
 block discarded – undo
110 110
 				$this->changes |= self::UPDATED_GIT_TAG;
111 111
 
112 112
 				return $this->versions->git->tag;
113
-			} else { // They're NOT the same but we were told not to update.
113
+			} else {
114
+// They're NOT the same but we were told not to update.
114 115
 				return false;
115 116
 			}
116
-		} else { // They're the same so return true
117
+		} else {
118
+// They're the same so return true
117 119
 			return true;
118 120
 		}
119 121
 	}
Please login to merge, or discard this patch.
misc/update/nix/tmux/run.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -87,6 +87,9 @@  discard block
 block discarded – undo
87 87
 }
88 88
 sleep(2);
89 89
 
90
+/**
91
+ * @param string $pane
92
+ */
90 93
 function writelog($pane)
91 94
 {
92 95
 	$path = dirname(__FILE__) . "/bin/logs";
@@ -100,6 +103,9 @@  discard block
 block discarded – undo
100 103
 	}
101 104
 }
102 105
 
106
+/**
107
+ * @param string $cmd
108
+ */
103 109
 function command_exist($cmd)
104 110
 {
105 111
 	$returnVal = exec("which $cmd 2>/dev/null");
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 }
274 274
 
275 275
 if ($seq == 1) {
276
-	exec("cd ${DIR}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;\"Monitor\"\033\"'");
276
+	exec("cd ${dir}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;\"Monitor\"\033\"'");
277 277
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -h -p 67 'printf \"\033]2;update_releases\033\"'");
278 278
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -v -p 25 'printf \"\033]2;nzb-import\033\"'");
279 279
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	start_apps($tmux_session);
291 291
 	attach($DIR, $tmux_session);
292 292
 } else if ($seq == 2) {
293
-	exec("cd ${DIR}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;\"Monitor\"\033\"'");
293
+	exec("cd ${dir}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;\"Monitor\"\033\"'");
294 294
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -h -p 67 'printf \"\033]2;sequential\033\"'");
295 295
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -v -p 25 'printf \"\033]2;nzb-import\033\"'");
296 296
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	start_apps($tmux_session);
308 308
 	attach($DIR, $tmux_session);
309 309
 } else {
310
-	exec("cd ${DIR}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;Monitor\033\"'");
310
+	exec("cd ${dir}; tmux -f $tmuxconfig new-session -d -s $tmux_session -n Monitor 'printf \"\033]2;Monitor\033\"'");
311 311
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -h -p 67 'printf \"\033]2;update_binaries\033\"'");
312 312
 	exec("tmux selectp -t $tmux_session:0.0; tmux splitw -t $tmux_session:0 -v -p 25 'printf \"\033]2;nzb-import\033\"'");
313 313
 	exec("tmux selectp -t $tmux_session:0.2; tmux splitw -t $tmux_session:0 -v -p 67 'printf \"\033]2;backfill\033\"'");
Please login to merge, or discard this patch.
nntmux/Books.php 4 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -101,6 +101,10 @@  discard block
 block discarded – undo
101 101
 		return $this->pdo->queryOneRow(sprintf('SELECT bookinfo.* FROM bookinfo WHERE bookinfo.id = %d', $id));
102 102
 	}
103 103
 
104
+	/**
105
+	 * @param string $author
106
+	 * @param string|null $title
107
+	 */
104 108
 	public function getBookInfoByName($author, $title)
105 109
 	{
106 110
 		$pdo = $this->pdo;
@@ -332,6 +336,9 @@  discard block
 block discarded – undo
332 336
 		return $browseby;
333 337
 	}
334 338
 
339
+	/**
340
+	 * @param string $title
341
+	 */
335 342
 	public function fetchAmazonProperties($title)
336 343
 	{
337 344
 		$conf = new GenericConfiguration();
@@ -472,6 +479,9 @@  discard block
 block discarded – undo
472 479
 		}
473 480
 	}
474 481
 
482
+	/**
483
+	 * @param string $releasetype
484
+	 */
475 485
 	public function parseTitle($release_name, $releaseID, $releasetype)
476 486
 	{
477 487
 		$a = preg_replace('/\d{1,2} \d{1,2} \d{2,4}|(19|20)\d\d|anybody got .+?[a-z]\? |[-._ ](Novel|TIA)([-._ ]|$)|( |\.)HQ(-|\.| )|[\(\)\.\-_ ](AVI|AZW3?|DOC|EPUB|LIT|MOBI|NFO|RETAIL|(si)?PDF|RTF|TXT)[\)\]\.\-_ ](?![a-z0-9])|compleet|DAGSTiDNiNGEN|DiRFiX|\+ extra|r?e ?Books?([\.\-_ ]English|ers)?|azw3?|ePu(b|p)s?|html|mobi|^NEW[\.\-_ ]|PDF([\.\-_ ]English)?|Please post more|Post description|Proper|Repack(fix)?|[\.\-_ ](Chinese|English|French|German|Italian|Retail|Scan|Swedish)|^R4 |Repost|Skytwohigh|TIA!+|TruePDF|V413HAV|(would someone )?please (re)?post.+? "|with the authors name right/i', '', $release_name);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 * @param array $options Class instances / Echo to cli.
72 72
 	 */
73
-	public function __construct(array $options =[])
73
+	public function __construct(array $options = [])
74 74
 	{
75 75
 		$defaults = [
76 76
 			'Echo'     => false,
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	 */
377 377
 	public function processBookReleases()
378 378
 	{
379
-		$bookids =[];
379
+		$bookids = [];
380 380
 		if (preg_match('/^\d+$/', $this->bookreqids)) {
381 381
 			$bookids[] = $this->bookreqids;
382 382
 		} else {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 	{
524 524
 		$ri = new ReleaseImage($this->pdo);
525 525
 
526
-		$book =[];
526
+		$book = [];
527 527
 
528 528
 		$amaz = false;
529 529
 		if ($bookInfo != '') {
Please login to merge, or discard this patch.
Braces   +6 added lines, -11 removed lines patch added patch discarded remove patch
@@ -354,18 +354,12 @@  discard block
 block discarded – undo
354 354
 		$apaiIo = new ApaiIO($conf);
355 355
 
356 356
 		$response = $apaiIo->runOperation($search);
357
-		if ($response === false)
358
-		{
357
+		if ($response === false) {
359 358
 			throw new \Exception("Could not connect to Amazon");
360
-		}
361
-		else
362
-		{
363
-			if (isset($response->Items->Item->ItemAttributes->Title))
364
-			{
359
+		} else {
360
+			if (isset($response->Items->Item->ItemAttributes->Title)) {
365 361
 				return $response;
366
-			}
367
-			else
368
-			{
362
+			} else {
369 363
 				return false;
370 364
 			}
371 365
 		}
@@ -455,7 +449,8 @@  discard block
 block discarded – undo
455 449
 
456 450
 					// Update release.
457 451
 					$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfo_id = %d WHERE id = %d', $bookId, $arr['id']));
458
-				} else { // Could not parse release title.
452
+				} else {
453
+// Could not parse release title.
459 454
 					$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfo_id = %d WHERE id = %d', -2, $arr['id']));
460 455
 					if ($this->echooutput) {
461 456
 						echo '.';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
 		$bookIDs = $releaseIDs = false;
211 211
 
212 212
 		if (is_array($books['result'])) {
213
-			foreach ($books['result'] AS $book => $id) {
213
+			foreach ($books['result'] as $book => $id) {
214 214
 				$bookIDs[] = $id['id'];
215 215
 				$releaseIDs[] = $id['grp_release_id'];
216 216
 			}
Please login to merge, or discard this patch.
nntmux/Category.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
 			]);
178 178
 	}
179 179
 
180
+	/**
181
+	 * @param string $category
182
+	 */
180 183
 	public static function getCategoryValue($category)
181 184
 	{
182 185
 		return constant('self::' . $category);
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -271,8 +271,9 @@  discard block
 block discarded – undo
271 271
 				" from categories c left outer join categories cp on cp.id = c.parentid where c.id = %d", $id
272 272
 			)
273 273
 		);
274
-		if (!$res)
275
-			return null;
274
+		if (!$res) {
275
+					return null;
276
+		}
276 277
 
277 278
 		$min = intval($res['minsizetoformrelease']);
278 279
 		$max = intval($res['maxsizetoformrelease']);
@@ -427,8 +428,9 @@  discard block
 block discarded – undo
427 428
 			$temp_array[-1] = "--Please Select--";
428 429
 		}
429 430
 
430
-		foreach ($categories as $category)
431
-			$temp_array[$category["id"]] = $category["title"];
431
+		foreach ($categories as $category) {
432
+					$temp_array[$category["id"]] = $category["title"];
433
+		}
432 434
 
433 435
 		return $temp_array;
434 436
 	}
Please login to merge, or discard this patch.
nntmux/ColorCLI.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -174,6 +174,9 @@  discard block
 block discarded – undo
174 174
 		return $colored_string;
175 175
 	}
176 176
 
177
+	/**
178
+	 * @param string $fg
179
+	 */
177 180
 	public static function set256($fg, $opt = "None", $bg = "None")
178 181
 	{
179 182
 		$colored_string = "\033[38;5;" . self::$colors256[$fg];
@@ -199,6 +202,9 @@  discard block
 block discarded – undo
199 202
 		return $infostring;
200 203
 	}
201 204
 
205
+	/**
206
+	 * @param string $str
207
+	 */
202 208
 	public static function notice($str)
203 209
 	{
204 210
 		$noticstring = "\033[38;5;" . self::$colors256['Blue'] . "mNotice: $str\033[0m\n";
@@ -229,12 +235,18 @@  discard block
 block discarded – undo
229 235
 		return $str;
230 236
 	}
231 237
 
238
+	/**
239
+	 * @param string $str
240
+	 */
232 241
 	public static function alternate($str)
233 242
 	{
234 243
 		$str = "\033[38;5;" . self::$colors256['DeepPink1'] . "m$str\033[0m\n";
235 244
 		return $str;
236 245
 	}
237 246
 
247
+	/**
248
+	 * @param string $str
249
+	 */
238 250
 	public static function tmuxOrange($str)
239 251
 	{
240 252
 		$str = "\033[38;5;" . self::$colors256['Orange'] . "m$str\033[0m\n";
@@ -253,12 +265,18 @@  discard block
 block discarded – undo
253 265
 		return $str;
254 266
 	}
255 267
 
268
+	/**
269
+	 * @param string $str
270
+	 */
256 271
 	public static function alternateOver($str)
257 272
 	{
258 273
 		$str = "\033[38;5;" . self::$colors256['DeepPink1'] . "m$str\033[0m";
259 274
 		return $str;
260 275
 	}
261 276
 
277
+	/**
278
+	 * @param string $str
279
+	 */
262 280
 	public static function warningOver($str)
263 281
 	{
264 282
 		$str = "\033[38;5;" . self::$colors256['Red'] . "m";
Please login to merge, or discard this patch.
nntmux/Console.php 4 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -915,6 +915,9 @@  discard block
 block discarded – undo
915 915
 		return (isset($result['title']) && !empty($result['title']) && isset($result['platform'])) ? $result : false;
916 916
 	}
917 917
 
918
+	/**
919
+	 * @param string $platform
920
+	 */
918 921
 	function getBrowseNode($platform)
919 922
 	{
920 923
 		switch ($platform) {
@@ -982,6 +985,9 @@  discard block
 block discarded – undo
982 985
 		return $nodeId;
983 986
 	}
984 987
 
988
+	/**
989
+	 * @param string $nodeName
990
+	 */
985 991
 	public function matchBrowseNode($nodeName)
986 992
 	{
987 993
 		$str = '';
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	/**
76 76
 	 * @param array $options Class instances / Echo to cli.
77 77
 	 */
78
-	public function __construct(array $options =[])
78
+	public function __construct(array $options = [])
79 79
 	{
80 80
 		$defaults = [
81 81
 			'Echo'     => false,
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		//$this->cleanconsole = ($this->pdo->getSetting('lookupgames') == 2) ? 'AND isrenamed = 1' : '';
100 100
 		$this->catWhere = "AND categories_id BETWEEN " . Category::GAME_ROOT . " AND " . Category::GAME_OTHER;
101 101
 
102
-		$this->failCache =[];
102
+		$this->failCache = [];
103 103
 	}
104 104
 
105 105
 	public function getConsoleInfo($id)
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 	public function makeFieldLinks($data, $field)
322 322
 	{
323 323
 		$tmpArr = explode(', ', $data[$field]);
324
-		$newArr =[];
324
+		$newArr = [];
325 325
 		$i = 0;
326 326
 		foreach ($tmpArr as $ta) {
327 327
 			if (trim($ta) == '') {
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		return $consoleId;
415 415
 	}
416 416
 
417
-	protected function _matchConToGameInfo($gameInfo =[], $con =[])
417
+	protected function _matchConToGameInfo($gameInfo = [], $con = [])
418 418
 	{
419 419
 		$matched = false;
420 420
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 		similar_text(strtolower($gameInfo['platform']), strtolower($con['platform']), $platformpercent);
429 429
 
430 430
 		if (NN_DEBUG) {
431
-			echo(PHP_EOL ."Matched: Title Percentage 1: $titlepercent% between " . $gameInfo['title'] . " and " . $con['title'] . PHP_EOL);
431
+			echo(PHP_EOL . "Matched: Title Percentage 1: $titlepercent% between " . $gameInfo['title'] . " and " . $con['title'] . PHP_EOL);
432 432
 		}
433 433
 
434 434
 		// Since Wii Ware games and XBLA have inconsistent original platforms, as long as title is 50% its ok.
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
 	protected function _setConBeforeMatch($amaz, $gameInfo)
465 465
 	{
466
-		$con =[];
466
+		$con = [];
467 467
 		$con['platform'] = (string)$amaz->Items->Item->ItemAttributes->Platform;
468 468
 		if (empty($con['platform'])) {
469 469
 			$con['platform'] = $gameInfo['platform'];
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 
487 487
 	protected function _setConAfterMatch($amaz)
488 488
 	{
489
-		$con =[];
489
+		$con = [];
490 490
 		$con['asin'] = (string)$amaz->Items->Item->ASIN;
491 491
 
492 492
 		$con['url'] = (string)$amaz->Items->Item->DetailPageURL;
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 		$con['esrb'] = (string)$amaz->Items->Item->ItemAttributes->ESRBAgeRating;
502 502
 		$con['releasedate'] = (string)$amaz->Items->Item->ItemAttributes->ReleaseDate;
503 503
 
504
-		if(!isset($con['releasedate'])){
504
+		if (!isset($con['releasedate'])) {
505 505
 			$con['releasedate'] = "";
506 506
 		}
507 507
 
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 		$gen = new Genres(['Settings' => $this->pdo]);
588 588
 
589 589
 		$defaultGenres = $gen->getGenres(Genres::CONSOLE_TYPE);
590
-		$genreassoc =[];
590
+		$genreassoc = [];
591 591
 		foreach ($defaultGenres as $dg) {
592 592
 			$genreassoc[$dg['id']] = strtolower($dg['title']);
593 593
 		}
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 		return $platform;
664 664
 	}
665 665
 
666
-	protected function _updateConsoleTable($con =[])
666
+	protected function _updateConsoleTable($con = [])
667 667
 	{
668 668
 		$ri = new ReleaseImage($this->pdo);
669 669
 
@@ -694,19 +694,19 @@  discard block
 block discarded – undo
694 694
 					$con['cover']
695 695
 				)
696 696
 			);
697
-			if($con['cover'] === 1){
697
+			if ($con['cover'] === 1) {
698 698
 				$con['cover'] = $ri->saveImage($consoleId, $con['coverurl'], $this->imgSavePath, 250, 250);
699 699
 			}
700 700
 		} else {
701 701
 			$consoleId = $check['id'];
702 702
 
703
-			if($con['cover'] === 1){
703
+			if ($con['cover'] === 1) {
704 704
 				$con['cover'] = $ri->saveImage($consoleId, $con['coverurl'], $this->imgSavePath, 250, 250);
705 705
 			}
706 706
 
707 707
 			$this->update(
708 708
 				$consoleId, $con['title'], $con['asin'], $con['url'], $con['salesrank'],
709
-				$con['platform'], $con['publisher'], (isset($con['releasedate']) ? $con['releasedate']: null), $con['esrb'],
709
+				$con['platform'], $con['publisher'], (isset($con['releasedate']) ? $con['releasedate'] : null), $con['esrb'],
710 710
 				$con['cover'], $con['consolegenreid'], (isset($con['review']) ? $con['review'] : null)
711 711
 			);
712 712
 		}
@@ -852,14 +852,14 @@  discard block
 block discarded – undo
852 852
 	function parseTitle($releasename)
853 853
 	{
854 854
 		$releasename = preg_replace('/\sMulti\d?\s/i', '', $releasename);
855
-		$result =[];
855
+		$result = [];
856 856
 
857 857
 		// Get name of the game from name of release.
858 858
 		if (preg_match('/^(.+((abgx360EFNet|EFNet\sFULL|FULL\sabgxEFNet|abgx\sFULL|abgxbox360EFNet)\s|illuminatenboard\sorg|Place2(hom|us)e.net|united-forums? co uk|\(\d+\)))?(?P<title>.*?)[\.\-_ ](v\.?\d\.\d|PAL|NTSC|EUR|USA|JP|ASIA|JAP|JPN|AUS|MULTI(\.?\d{1,2})?|PATCHED|FULLDVD|DVD5|DVD9|DVDRIP|PROPER|REPACK|RETAIL|DEMO|DISTRIBUTION|REGIONFREE|[\. ]RF[\. ]?|READ\.?NFO|NFOFIX|PSX(2PSP)?|PS[2-4]|PSP|PSVITA|WIIU|WII|X\-?BOX|XBLA|X360|3DS|NDS|N64|NGC)/i', $releasename, $matches)) {
859 859
 			$title = $matches['title'];
860 860
 
861 861
 			// Replace dots, underscores, or brackets with spaces.
862
-			$result['title'] = str_replace(['.','_','%20', '[', ']'], ' ', $title);
862
+			$result['title'] = str_replace(['.', '_', '%20', '[', ']'], ' ', $title);
863 863
 			$result['title'] = str_replace([' RF ', '.RF.', '-RF-', '_RF_'], ' ', $result['title']);
864 864
 			//Remove format tags from release title for match
865 865
 			$result['title'] = trim(preg_replace('/PAL|MULTI(\d)?|NTSC-?J?|\(JAPAN\)/i', '', $result['title']));
Please login to merge, or discard this patch.
Braces   +7 added lines, -13 removed lines patch added patch discarded remove patch
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 		$con['esrb'] = (string)$amaz->Items->Item->ItemAttributes->ESRBAgeRating;
502 502
 		$con['releasedate'] = (string)$amaz->Items->Item->ItemAttributes->ReleaseDate;
503 503
 
504
-		if(!isset($con['releasedate'])){
504
+		if(!isset($con['releasedate'])) {
505 505
 			$con['releasedate'] = "";
506 506
 		}
507 507
 
@@ -694,13 +694,13 @@  discard block
 block discarded – undo
694 694
 					$con['cover']
695 695
 				)
696 696
 			);
697
-			if($con['cover'] === 1){
697
+			if($con['cover'] === 1) {
698 698
 				$con['cover'] = $ri->saveImage($consoleId, $con['coverurl'], $this->imgSavePath, 250, 250);
699 699
 			}
700 700
 		} else {
701 701
 			$consoleId = $check['id'];
702 702
 
703
-			if($con['cover'] === 1){
703
+			if($con['cover'] === 1) {
704 704
 				$con['cover'] = $ri->saveImage($consoleId, $con['coverurl'], $this->imgSavePath, 250, 250);
705 705
 			}
706 706
 
@@ -736,18 +736,12 @@  discard block
 block discarded – undo
736 736
 		$apaiIo = new ApaiIO($conf);
737 737
 
738 738
 		$response = $apaiIo->runOperation($search);
739
-		if ($response === false)
740
-		{
739
+		if ($response === false) {
741 740
 			throw new \Exception("Could not connect to Amazon");
742
-		}
743
-		else
744
-		{
745
-			if (isset($response->Items->Item->ItemAttributes->Title))
746
-			{
741
+		} else {
742
+			if (isset($response->Items->Item->ItemAttributes->Title)) {
747 743
 				return $response;
748
-			}
749
-			else
750
-			{
744
+			} else {
751 745
 				return false;
752 746
 			}
753 747
 		}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 		$consoleIDs = $releaseIDs = false;
208 208
 
209 209
 		if (is_array($consoles['result'])) {
210
-			foreach ($consoles['result'] AS $console => $id) {
210
+			foreach ($consoles['result'] as $console => $id) {
211 211
 				$consoleIDs[] = $id['id'];
212 212
 				$releaseIDs[] = $id['grp_release_id'];
213 213
 			}
Please login to merge, or discard this patch.
nntmux/Contents.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -128,6 +128,9 @@
 block discarded – undo
128 128
 		return $this->row2Object($row);
129 129
 	}
130 130
 
131
+	/**
132
+	 * @param Content $content
133
+	 */
131 134
 	public function validate($content)
132 135
 	{
133 136
 		if (substr($content->url, 0, 1) != '/') {
Please login to merge, or discard this patch.
nntmux/data/source/database/MySQL.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 	 *
270 270
 	 * @param $encoding
271 271
 	 *
272
-	 * @return mixed If setting the encoding; returns true on success, else false.
272
+	 * @return string|boolean If setting the encoding; returns true on success, else false.
273 273
 	 *         When getting, returns the encoding.
274 274
 	 */
275 275
 	public function encoding($encoding = null)
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 	 * @param string $context
338 338
 	 * @param array  $options
339 339
 	 *
340
-	 * @return void
340
+	 * @return string
341 341
 	 */
342 342
 	public function conditions($conditions, $context, array $options = [])
343 343
 	{
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@
 block discarded – undo
238 238
 				}
239 239
 				$name    = $self->invokeMethod('_entityName',
240 240
 											   [$entity, ['quoted' => true]]);
241
-				$columns = $self->read("DESCRIBE {$name}",
241
+				$columns = $self->read("describe {$name}",
242 242
 									   [
243 243
 										   'return' => 'array', 'schema' => [
244 244
 										   'field', 'type', 'null', 'key', 'default', 'extra'
Please login to merge, or discard this patch.