Passed
Push — dev ( 36ac9d...273395 )
by Darko
08:47
created
nntmux/NZBContents.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  *
11 11
  * Class NZBContents
12 12
  */
13
-Class NZBContents
13
+class NZBContents
14 14
 {
15 15
 	/**
16 16
 	 * @var \nntmux\db\Settings
Please login to merge, or discard this patch.
nntmux/Binaries.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -562,7 +562,7 @@
 block discarded – undo
562 562
 			if ($this->_nntp->isError($headers)) {
563 563
 				$message = ($headers->code == 0 ? 'Unknown error' : $headers->message);
564 564
 				$this->log(
565
-					"Code {$headers->code}: $message\nSkipping group: {$groupMySQL['name']}",
565
+					"code {$headers->code}: $message\nSkipping group: {$groupMySQL['name']}",
566 566
 					__FUNCTION__,
567 567
 					Logger::LOG_WARNING,
568 568
 					'error'
Please login to merge, or discard this patch.
nntmux/libraries/TraktAPI.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * Class TraktAPI
8 8
  * Retrive info from the Trakt API.
9 9
  */
10
-Class TraktAPI {
10
+class TraktAPI {
11 11
 
12 12
 	const API_URL = 'https://api-v2launch.trakt.tv/';
13 13
 
Please login to merge, or discard this patch.
nntmux/utility/Country.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
  *
28 28
  * @package nntmux\utility
29 29
  */
30
-Class Country
30
+class Country
31 31
 {
32 32
 	/**
33 33
 	 * Get a country code for a country name.
Please login to merge, or discard this patch.
nntmux/XXX.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
 		$xxxIDs = $releaseIDs = false;
195 195
 
196 196
 		if (is_array($xxxmovies['result'])) {
197
-			foreach ($xxxmovies['result'] AS $xxx => $id) {
197
+			foreach ($xxxmovies['result'] as $xxx => $id) {
198 198
 				$xxxIDs[] = $id['id'];
199 199
 				$releaseIDs[] = $id['grp_release_id'];
200 200
 			}
Please login to merge, or discard this patch.
nntmux/data/source/database/MySQL.php 1 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.
nntmux/data/source/Database.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 			if ($fields && is_array($fields) && is_int(key($fields))) {
863 863
 				$data = array_intersect_key($data, array_combine($fields, $fields));
864 864
 			}
865
-			$method = "_{$type}Fields";
865
+			$method = "_{$type}fields";
866 866
 			return $this->{$method}($data, $schema, $context);
867 867
 		}
868 868
 		return empty($fields) ? '*' : join(', ', $fields);
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 		if ($offset = $context->offset() ?: '') {
885 885
 			$offset = " OFFSET {$offset}";
886 886
 		}
887
-		return "LIMIT {$limit}{$offset}";
887
+		return "limit {$limit}{$offset}";
888 888
 	}
889 889
 
890 890
 	/**
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
 					$data[$name] = $this->name($value);
1420 1420
 					break;
1421 1421
 				case 'on':
1422
-					$data[$name] = "ON {$value}";
1422
+					$data[$name] = "on {$value}";
1423 1423
 					break;
1424 1424
 				case 'expr':
1425 1425
 					if (is_array($value)) {
Please login to merge, or discard this patch.
nntmux/Groups.php 1 patch
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 			WHERE mp.group_id = {$id}"
424 424
 		);
425 425
 
426
-		foreach ($this->cbpm AS $tablePrefix) {
426
+		foreach ($this->cbpm as $tablePrefix) {
427 427
 			$this->pdo->queryExec(
428 428
 				"DROP TABLE IF EXISTS {$tablePrefix}_{$id}"
429 429
 			);
@@ -445,15 +445,15 @@  discard block
 block discarded – undo
445 445
 	 */
446 446
 	public function resetall()
447 447
 	{
448
-		foreach ($this->cbpm AS $tablePrefix) {
448
+		foreach ($this->cbpm as $tablePrefix) {
449 449
 			$this->pdo->queryExec("TRUNCATE TABLE {$tablePrefix}");
450 450
 		}
451 451
 
452 452
 		$groups = $this->pdo->queryDirect("SELECT id FROM groups");
453 453
 
454 454
 		if ($groups instanceof \Traversable) {
455
-			foreach ($groups AS $group) {
456
-				foreach ($this->cbpm AS $tablePrefix) {
455
+			foreach ($groups as $group) {
456
+				foreach ($this->cbpm as $tablePrefix) {
457 457
 					$this->pdo->queryExec("DROP TABLE IF EXISTS {$tablePrefix}_{$group['id']}");
458 458
 				}
459 459
 			}
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 			$releases     = new Releases(['Settings' => $this->pdo, 'Groups' => $this]);
493 493
 			$nzb          = new NZB($this->pdo);
494 494
 			$releaseImage = new ReleaseImage($this->pdo);
495
-			foreach ($res AS $row) {
495
+			foreach ($res as $row) {
496 496
 				$releases->deleteSingle(
497 497
 					[
498 498
 						'g' => $row['guid'],
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 			WHERE id = {$id}"
577 577
 		);
578 578
 
579
-		return "Group {$id}: {$column} has been " . (($status == 0) ? 'deactivated' : 'activated') . '.';
579
+		return "group {$id}: {$column} has been " . (($status == 0) ? 'deactivated' : 'activated') . '.';
580 580
 	}
581 581
 
582 582
 	/**
Please login to merge, or discard this patch.
nntmux/Games.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
222 222
 		$gameIDs = $releaseIDs = false;
223 223
 
224 224
 		if (is_array($games['result'])) {
225
-			foreach ($games['result'] AS $game => $id) {
225
+			foreach ($games['result'] as $game => $id) {
226 226
 				$gameIDs[] = $id['id'];
227 227
 				$releaseIDs[] = $id['grp_release_id'];
228 228
 			}
Please login to merge, or discard this patch.