Passed
Push — dev ( 36ac9d...273395 )
by Darko
08:47
created
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/XML_Response.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	protected function addNode($element)
207 207
 	{
208 208
 		$this->xml->startElement($element['name']);
209
-		foreach($element['data'] AS $attr => $val) {
209
+		foreach ($element['data'] AS $attr => $val) {
210 210
 			$this->xml->writeAttribute($attr, $val);
211 211
 		}
212 212
 		$this->xml->endElement();
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	protected function addNodes($element)
220 220
 	{
221 221
 		$this->xml->startElement($element['name']);
222
-		foreach($element['data'] AS $elem => $value) {
222
+		foreach ($element['data'] AS $elem => $value) {
223 223
 			$subelement['name'] = $elem;
224 224
 			$subelement['data'] = $value;
225 225
 			$this->addNode($subelement);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 			if ($p['description'] != '') {
241 241
 				$this->xml->writeAttribute('description', html_entity_decode($p['description']));
242 242
 			}
243
-			foreach($p['subcatlist'] AS $c) {
243
+			foreach ($p['subcatlist'] AS $c) {
244 244
 				$this->xml->startElement('subcat');
245 245
 				$this->xml->writeAttribute('id', $c['id']);
246 246
 				$this->xml->writeAttribute('name', html_entity_decode($c['title']));
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 */
260 260
 	protected function includeRssAtom()
261 261
 	{
262
-		switch($this->namespace) {
262
+		switch ($this->namespace) {
263 263
 			case 'newznab':
264 264
 				$url = 'http://www.newznab.com/DTD/2010/feeds/attributes/';
265 265
 				break;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	{
301 301
 		$server = $this->server['server'];
302 302
 
303
-		switch($this->namespace) {
303
+		switch ($this->namespace) {
304 304
 			case 'newznab':
305 305
 				$path = 'apihelp/';
306 306
 				$tag = 'API';
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
 	public function includeTotalRows()
342 342
 	{
343
-		$this->xml->startElement($this->namespace.":response");
343
+		$this->xml->startElement($this->namespace . ":response");
344 344
 		$this->xml->writeAttribute('offset', $this->offset);
345 345
 		$this->xml->writeAttribute('total', isset($this->releases[0]['_totalrows']) ? $this->releases[0]['_totalrows'] : 0);
346 346
 		$this->xml->endElement();
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 	 */
352 352
 	public function includeReleases()
353 353
 	{
354
-		if(is_array($this->releases) && !empty($this->releases)) {
354
+		if (is_array($this->releases) && !empty($this->releases)) {
355 355
 			foreach ($this->releases AS $this->release) {
356 356
 				$this->xml->startElement('item');
357 357
 				$this->includeReleaseMain();
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 		} else {
386 386
 			$this->writeRssCdata();
387 387
 		}
388
-		if((isset($this->parameters['dl']) && $this->parameters['dl'] == 1) || !isset($this->parameters['dl'])) {
388
+		if ((isset($this->parameters['dl']) && $this->parameters['dl'] == 1) || !isset($this->parameters['dl'])) {
389 389
 			$this->xml->startElement('enclosure');
390 390
 			$this->xml->writeAttribute(
391 391
 				'url',
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 		if ($this->parameters['extended'] == 1) {
417 417
 			$this->writeZedAttr('files', $this->release['totalpart']);
418 418
 			$this->writeZedAttr('poster', $this->release['fromname']);
419
-			if(($this->release['videos_id'] > 0 || $this->release['tv_episodes_id'] > 0) && $this->namespace === 'newznab') {
419
+			if (($this->release['videos_id'] > 0 || $this->release['tv_episodes_id'] > 0) && $this->namespace === 'newznab') {
420 420
 				$this->setTvAttr();
421 421
 			}
422 422
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 	 */
453 453
 	protected function setTvAttr()
454 454
 	{
455
-		switch(true) {
455
+		switch (true) {
456 456
 			case !empty($this->release['title']):
457 457
 				$this->writeZedAttr('title', $this->release['title']);
458 458
 				break;
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 		$p = $this->parameters;
515 515
 
516 516
 		$this->cdata = "\n\t<div>\n";
517
-		switch(1) {
517
+		switch (1) {
518 518
 			case !empty($r['cover']):
519 519
 				$dir = 'movies';
520 520
 				$column = 'imdbid';
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 
619 619
 		$cData = $this->buildCdata($musicCol);
620 620
 
621
-		if ($r['mu_url'] !== '' ) {
621
+		if ($r['mu_url'] !== '') {
622 622
 			$cDataUrl = "<li>Amazon: <a href=\"{$r['mu_url']}\">{$r['mu_title']}</a></li>";
623 623
 		}
624 624
 
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 		$cData = '';
680 680
 
681 681
 		foreach ($columns AS $info) {
682
-			if (!empty($r[$info]))  {
682
+			if (!empty($r[$info])) {
683 683
 				if ($info == 'mu_releasedate') {
684 684
 					$ucInfo = 'Released';
685 685
 					$rDate = date('Y-m-d', strtotime($r[$info]));
Please login to merge, or discard this patch.
nntmux/Videos.php 1 patch
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.
nntmux/Console.php 1 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.
nntmux/RequestID.php 1 patch
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.
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.
nntmux/Hotmovies.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			$ch = curl_init($this->directLink);
113 113
 			$this->directLink = "";
114 114
 		}
115
-		if ($usepost === true){
115
+		if ($usepost === true) {
116 116
 			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
117 117
 			curl_setopt($ch, CURLOPT_POST, 1);
118 118
 			curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_postParams);
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
 			$results = array_merge($results, $this->covers());
190 190
 		}
191 191
 
192
-		if (empty($results) === true){
192
+		if (empty($results) === true) {
193 193
 			return false;
194
-		}else{
194
+		} else {
195 195
 			return $results;
196 196
 		}
197 197
 	}
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	public function sypnosis()
205 205
 	{
206 206
 		if ($this->_html->find('.desc_link', 0)) {
207
-			preg_match("/var descfullcontent = (?<content>.*)/", $this->_response,$matches);
207
+			preg_match("/var descfullcontent = (?<content>.*)/", $this->_response, $matches);
208 208
 			if (is_array($matches)) {
209 209
 				$this->_res['sypnosis'] = rawurldecode($matches['content']);
210 210
 			}
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		if ($this->_html->find('a[itemprop=actor]')) {
274 274
 			foreach ($this->_html->find('a[itemprop=actor]') as $e) {
275 275
 				$e = trim($e->title);
276
-				$e = preg_replace('/\((.*)\)/',"",$e);
276
+				$e = preg_replace('/\((.*)\)/', "", $e);
277 277
 				$cast[] = trim($e);
278 278
 			}
279 279
 			$this->_res['cast'] = & $cast;
@@ -291,10 +291,10 @@  discard block
 block discarded – undo
291 291
 	public function genres()
292 292
 	{
293 293
 		$genres = [];
294
-		if ($ret = $this->_html->find('div.categories',0)) {
294
+		if ($ret = $this->_html->find('div.categories', 0)) {
295 295
 			foreach ($ret->find('a') as $e) {
296 296
 				if (stristr($e->title, "->")) {
297
-					$e = explode("->",$e->plaintext);
297
+					$e = explode("->", $e->plaintext);
298 298
 					$genres[] = trim($e[1]);
299 299
 				}
300 300
 			}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		if ($ret = $this->_html->find('div#large_cover, img#cover', 1)) {
315 315
 			$this->_res['boxcover'] = trim($ret->src);
316 316
 			$this->_res['backcover'] = str_ireplace(".cover", ".back", trim($ret->src));
317
-		}else{
317
+		} else {
318 318
 			return false;
319 319
 		}
320 320
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 			return false;
336 336
 		} else {
337 337
 			if ($ret = $this->_html->find('h3[class=title]', 0)) {
338
-				if ($ret->find('a[title]',0)){
338
+				if ($ret->find('a[title]', 0)) {
339 339
 					$ret = $ret->find('a[title]', 0);
340 340
 					$title = trim($ret->title);
341 341
 					$title = preg_replace('/XXX/', '', $title);
Please login to merge, or discard this patch.
nntmux/db/DB.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		$this->pdo = null;
181 181
 	}
182 182
 
183
-	public function checkDbExists ($name = null)
183
+	public function checkDbExists($name = null)
184 184
 	{
185 185
 		if (empty($name)) {
186 186
 			$name = $this->opts['dbname'];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 		}
254 254
 	}
255 255
 
256
-	public function getTableList ()
256
+	public function getTableList()
257 257
 	{
258 258
 		$query  = ($this->opts['dbtype'] === 'mysql' ? 'SHOW DATABASES' : 'SELECT datname AS Database FROM pg_database');
259 259
 		$result = $this->pdo->query($query);
@@ -412,12 +412,12 @@  discard block
 block discarded – undo
412 412
 	 *
413 413
 	 * @return string
414 414
 	 */
415
-	public function likeString($str, $left=true, $right=true)
415
+	public function likeString($str, $left = true, $right = true)
416 416
 	{
417 417
 		return (
418 418
 			'LIKE ' .
419 419
 			$this->escapeString(
420
-				($left  ? '%' : '') .
420
+				($left ? '%' : '') .
421 421
 				$str .
422 422
 				($right ? '%' : '')
423 423
 			)
@@ -453,13 +453,13 @@  discard block
 block discarded – undo
453 453
 
454 454
 		$i = 2;
455 455
 		$error = '';
456
-		while($i < 11) {
456
+		while ($i < 11) {
457 457
 			$result = $this->queryExecHelper($query, true);
458 458
 			if (is_array($result) && isset($result['deadlock'])) {
459 459
 				$error = $result['message'];
460 460
 				if ($result['deadlock'] === true) {
461
-					$this->echoError("A Deadlock or lock wait timeout has occurred, sleeping.(" . ($i-1) . ")", 'queryInsert', 4);
462
-					$this->ct->showsleep($i * ($i/2));
461
+					$this->echoError("A Deadlock or lock wait timeout has occurred, sleeping.(" . ($i - 1) . ")", 'queryInsert', 4);
462
+					$this->ct->showsleep($i * ($i / 2));
463 463
 					$i++;
464 464
 				} else {
465 465
 					break;
@@ -498,13 +498,13 @@  discard block
 block discarded – undo
498 498
 
499 499
 		$i = 2;
500 500
 		$error = '';
501
-		while($i < 11) {
501
+		while ($i < 11) {
502 502
 			$result = $this->queryExecHelper($query);
503 503
 			if (is_array($result) && isset($result['deadlock'])) {
504 504
 				$error = $result['message'];
505 505
 				if ($result['deadlock'] === true) {
506
-					$this->echoError("A Deadlock or lock wait timeout has occurred, sleeping.(" . ($i-1) . ")", 'queryExec', 4);
507
-					$this->ct->showsleep($i * ($i/2));
506
+					$this->echoError("A Deadlock or lock wait timeout has occurred, sleeping.(" . ($i - 1) . ")", 'queryExec', 4);
507
+					$this->ct->showsleep($i * ($i / 2));
508 508
 					$i++;
509 509
 				} else {
510 510
 					break;
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 	protected function queryExecHelper($query, $insert = false)
535 535
 	{
536 536
 		try {
537
-			if ($insert === false ) {
537
+			if ($insert === false) {
538 538
 				$run = $this->pdo->prepare($query);
539 539
 				$run->execute();
540 540
 				return $run;
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 		// Remove LIMIT and OFFSET from query to allow queryCalc usage with browse
688 688
 		$query = preg_replace('#(\s+LIMIT\s+\d+)?\s+OFFSET\s+\d+\s*$#i', '', $query);
689 689
 
690
-		if ($cache === true && $this->cacheEnabled === true ) {
690
+		if ($cache === true && $this->cacheEnabled === true) {
691 691
 			try {
692 692
 				$count = $this->cacheServer->get($this->cacheServer->createKey($query . 'count'));
693 693
 				if ($count !== false) {
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
 	public function ping($restart = false)
1110 1110
 	{
1111 1111
 		try {
1112
-			return (bool) $this->pdo->query('SELECT 1+1');
1112
+			return (bool)$this->pdo->query('SELECT 1+1');
1113 1113
 		} catch (\PDOException $e) {
1114 1114
 			if ($restart == true) {
1115 1115
 				$this->initialiseDatabase();
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 	 *
1176 1176
 	 * @return string
1177 1177
 	 */
1178
-	public function getDbVersion ()
1178
+	public function getDbVersion()
1179 1179
 	{
1180 1180
 		return $this->dbVersion;
1181 1181
 	}
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 	 * @return bool|null       TRUE if Db version is greater than or eaqual to $requiredVersion,
1187 1187
 	 * false if not, and null if the version isn't available to check against.
1188 1188
 	 */
1189
-	public function isDbVersionAtLeast ($requiredVersion)
1189
+	public function isDbVersionAtLeast($requiredVersion)
1190 1190
 	{
1191 1191
 		if (empty($this->dbVersion)) {
1192 1192
 			return null;
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
 	/**
1198 1198
 	 * Performs the fetch from the Db server and stores the resulting Major.Minor.Version number.
1199 1199
 	 */
1200
-	private function fetchDbVersion ()
1200
+	private function fetchDbVersion()
1201 1201
 	{
1202 1202
 		$result = $this->queryOneRow("SELECT VERSION() AS version");
1203 1203
 		if (!empty($result)) {
Please login to merge, or discard this patch.
nntmux/db/PreDb.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			'enclosedby'	=> '',
83 83
 			'fields'		=> '\t',
84 84
 			'limit'			=> 0,
85
-			'lines'			=> '\r\n',    // use Windows style endings so that text can contain \n
85
+			'lines'			=> '\r\n', // use Windows style endings so that text can contain \n
86 86
 			'local'			=> false,
87 87
 			'path'			=> null,
88 88
 		];
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 		$enclosedby = empty($options['enclosedby']) ? '' : "ENCLOSED BY {$this->escapeString($options['enclosedby'])}";
100 100
 
101
-		$sql   = <<<SQL_EXPORT
101
+		$sql = <<<SQL_EXPORT
102 102
 SELECT title, nfo, size, files, filename, nuked, nukereason, category, predate, source, requestid, g.name
103 103
 	FROM {$this->tableMain} p LEFT OUTER JOIN groups g ON p.groups_id = g.id $limit
104 104
 	INTO OUTFILE '{$options['path']}'
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		$defaults = [
265 265
 			'enclosedby'	=> "'",
266 266
 			'fields'		=> '\t',
267
-			'lines'			=> '\r\n',    // Windows' style EOL to allow \n to be used in text.
267
+			'lines'			=> '\r\n', // Windows' style EOL to allow \n to be used in text.
268 268
 			'local'			=> false,
269 269
 			'optional'		=> true,
270 270
 		];
Please login to merge, or discard this patch.