Passed
Branch dev (a25f63)
by Darko
15:17
created
nntmux/Sharing.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function __construct(array $options = [])
80 80
 	{
81
-		$defaults= [
81
+		$defaults = [
82 82
 			'Settings' => null,
83 83
 			'NNTP'     => null,
84 84
 		];
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 		if (!isset($body['USER']) || !isset($body['SID']) || !isset($body['RID']) || !isset($body['TIME']) | !isset($body['BODY'])) {
549 549
 			return false;
550 550
 		}
551
-		$cid = md5($body['SID'].$body['USER'].$body['TIME'].$siteID);
551
+		$cid = md5($body['SID'] . $body['USER'] . $body['TIME'] . $siteID);
552 552
 
553 553
 		// Insert the comment.
554 554
 		if ($this->pdo->queryExec(
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  *
10 10
  * Class Sharing
11 11
  */
12
-Class Sharing
12
+class Sharing
13 13
 {
14 14
 	/**
15 15
 	 *      --------------------------------------------
Please login to merge, or discard this patch.
nntmux/RequestIDWeb.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	protected function _getReleases()
42 42
 	{
43 43
 		$this->_releases = $this->pdo->queryDirect(
44
-			sprintf ('
44
+			sprintf('
45 45
 				SELECT r.id, r.name, r.searchname, r.fromname, g.name AS groupname, r.groups_id, r.categories_id
46 46
 				FROM releases r
47 47
 				LEFT JOIN groups g ON r.groups_id = g.id
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
 		if ($this->_releases instanceof \Traversable) {
113 113
 			// Loop all the results.
114
-			foreach($this->_releases as $release) {
114
+			foreach ($this->_releases as $release) {
115 115
 
116 116
 				$this->_release['name'] = $release['name'];
117 117
 				// Try to find a request id for the release.
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 				$returnedIdentifiers = [];
170 170
 
171 171
 				$groupIDArray = [];
172
-				foreach($returnXml->request as $result) {
172
+				foreach ($returnXml->request as $result) {
173 173
 					if (isset($result['name']) && isset($result['ident']) && (int)$result['ident'] > 0) {
174 174
 						$this->_newTitle['title'] = (string)$result['name'];
175 175
 						$this->_requestID = (int)$result['reqid'];
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
 					$status = self::REQID_NONE;
225 225
 					if ($addDate !== false && !empty($addDate['adddate'])) {
226
-						if ((bool) (intval((time() - (int)$addDate['adddate']) / 3600) > $this->_request_hours)) {
226
+						if ((bool)(intval((time() - (int)$addDate['adddate']) / 3600) > $this->_request_hours)) {
227 227
 							$status = self::REQID_OLD;
228 228
 						}
229 229
 					} else {
Please login to merge, or discard this patch.
nntmux/http/Capabilities.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 				'search'       => ['available' => 'yes', 'supportedParams' => 'q'],
152 152
 				'tv-search'    => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'],
153 153
 				'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid'],
154
-				'audio-search' => ['available' => 'no',  'supportedParams' => '']
154
+				'audio-search' => ['available' => 'no', 'supportedParams' => '']
155 155
 			],
156 156
 			'categories' =>
157 157
 				($this->type === 'caps'
Please login to merge, or discard this patch.
nntmux/http/RSS.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  *
13 13
  * @package nntmux
14 14
  */
15
-Class RSS extends Capabilities
15
+class RSS extends Capabilities
16 16
 {
17 17
 	/** Releases class
18 18
 	 * @var Releases
Please login to merge, or discard this patch.
nntmux/http/API.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
  *
31 31
  * @package nntmux
32 32
  */
33
-class API extends Capabilities {
33
+class API extends Capabilities
34
+{
34 35
 
35 36
 	/** DB class
36 37
 	 * @var \nntmux\db\Settings
Please login to merge, or discard this patch.
nntmux/Videos.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 			$tsql .= sprintf("AND v.title LIKE %s", $this->pdo->escapeString("%" . $showname . "%"));
131 131
 		}
132 132
 
133
-		$qry = 	sprintf("
133
+		$qry = sprintf("
134 134
 			SELECT v.* FROM
135 135
 				(SELECT v.*,
136 136
 					tve.firstaired AS prevdate, tve.title AS previnfo,
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
 	/**
15 15
 	 * @param array $options
16 16
 	 */
17
-	public function __construct(array $options = []) {
17
+	public function __construct(array $options = [])
18
+	{
18 19
 		$defaults = [
19 20
 			'Echo'         => false,
20 21
 			'Logger'       => null,
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  *
10 10
  * @package nntmux
11 11
  */
12
-Class Videos
12
+class Videos
13 13
 {
14 14
 	/**
15 15
 	 * @param array $options
Please login to merge, or discard this patch.
nntmux/NNTP.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -902,7 +902,7 @@
 block discarded – undo
902 902
 		// Try re-selecting the group.
903 903
 		$data = $nntp->selectGroup($group);
904 904
 		if ($this->isError($data)) {
905
-			$message = "Code {$data->code}: {$data->message}\nSkipping group: {$group}";
905
+			$message = "code {$data->code}: {$data->message}\nSkipping group: {$group}";
906 906
 			if ($this->_debugBool) {
907 907
 				$this->_debugging->log(get_class(), __FUNCTION__, $message, Logger::LOG_NOTICE);
908 908
 			}
Please login to merge, or discard this patch.
nntmux/RequestID.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 	const REQID_NONE   = -3; // The Request id was not found locally or via web lookup.
14 14
 	const REQID_ZERO   = -2; // The Request id was 0.
15 15
 	const REQID_NOLL   = -1; // Request id was not found via local lookup.
16
-	const REQID_UPROC  =  0; // Release has not been processed.
17
-	const REQID_FOUND  =  1; // Request id found and release was updated.
16
+	const REQID_UPROC  = 0; // Release has not been processed.
17
+	const REQID_FOUND  = 1; // Request id found and release was updated.
18 18
 
19 19
 	const IS_REQID_TRUE = 1; // releases.isrequestid is 1
20 20
 	const IS_REQID_FALSE = 0; // releases.isrequestid is 0
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 			case preg_match('/\[\s*(\d+)\s*\]/', $this->_release['name'], $requestID):
145 145
 			case preg_match('/^REQ\s*(\d{4,6})/i', $this->_release['name'], $requestID):
146 146
 			case preg_match('/^(\d{4,6})-\d{1}\[/', $this->_release['name'], $requestID):
147
-			case preg_match('/(\d{4,6}) -/',$this->_release['name'], $requestID):
148
-				if ((int) $requestID[1] > 0) {
149
-					return (int) $requestID[1];
147
+			case preg_match('/(\d{4,6}) -/', $this->_release['name'], $requestID):
148
+				if ((int)$requestID[1] > 0) {
149
+					return (int)$requestID[1];
150 150
 				}
151 151
 		}
152 152
 		return self::REQID_ZERO;
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,14 +95,18 @@  discard block
 block discarded – undo
95 95
 	/**
96 96
 	 * Fetch releases with requestid's from MySQL.
97 97
 	 */
98
-	protected function _getReleases() { }
98
+	protected function _getReleases()
99
+	{
100
+}
99 101
 
100 102
 	/**
101 103
 	 * Process releases for requestid's.
102 104
 	 *
103 105
 	 * @return int How many did we rename?
104 106
 	 */
105
-	protected function _processReleases() { }
107
+	protected function _processReleases()
108
+	{
109
+}
106 110
 
107 111
 	/**
108 112
 	 * No request id was found, update the release.
@@ -129,7 +133,9 @@  discard block
 block discarded – undo
129 133
 	 *
130 134
 	 * @return array|bool
131 135
 	 */
132
-	protected function _getNewTitle() { }
136
+	protected function _getNewTitle()
137
+	{
138
+}
133 139
 
134 140
 	/**
135 141
 	 * Find a RequestID in a usenet subject.
Please login to merge, or discard this patch.
nntmux/ADM.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
 			$category = explode(":", $li->plaintext);
191 191
 			if (trim($category[0]) == "Category") {
192 192
 				$g = explode(",", $category[1]);
193
-				foreach($g as $genre) {
193
+				foreach ($g as $genre) {
194 194
 					$genres[] = trim($genre);
195 195
 				}
196 196
 				$this->_res['genres'] = & $genres;
Please login to merge, or discard this patch.