Completed
Push — master ( 5ae889...256588 )
by Angus
08:21
created
application/controllers/Stats.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Stats extends MY_Controller {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
application/controllers/Import_AMR.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Import_AMR extends User_Controller {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
application/controllers/TitleHistory.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class TitleHistory extends Auth_Controller {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 			$this->body_data['totalPages']  = $historyData['totalPages'];
24 24
 			$this->body_data['titleID']     = (int) $titleID;
25 25
 
26
-			if($page > $this->body_data['totalPages'] && $page > 1) redirect("/history/{$titleID}/1");
26
+			if($page > $this->body_data['totalPages'] && $page > 1) {
27
+				redirect("/history/{$titleID}/1");
28
+			}
27 29
 
28 30
 			$this->_render_page("TitleHistory");
29 31
 
Please login to merge, or discard this patch.
application/models/History_Model.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class History_Model extends CI_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class History_Model extends CI_Model {
4 4
 	public function __construct() {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			foreach($result as $row) {
50 50
 				$arrRow = [];
51 51
 
52
-				$arrRow['updated_at']  = $row->updated_at;
52
+				$arrRow['updated_at'] = $row->updated_at;
53 53
 
54 54
 				$newChapterData = $this->Tracker->sites->{$row->site_class}->getChapterData($row->title_url, $row->new_chapter);
55 55
 				$arrRow['new_chapter']      = "<a href=\"{$newChapterData['url']}\">{$newChapterData['number']}</a>";
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Stats_Model.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Stats_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Stats_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				], FALSE)
29 29
 				->from('tracker_chapters')
30 30
 				->join('tracker_titles', 'tracker_titles.id = tracker_chapters.title_id', 'left')
31
-				->join('tracker_sites','tracker_titles.site_id = tracker_sites.id', 'left')
31
+				->join('tracker_sites', 'tracker_titles.site_id = tracker_sites.id', 'left')
32 32
 				->where('tracker_sites.status', 'enabled')
33 33
 				->group_by('tracker_chapters.title_id')
34 34
 				->having('count > 1')
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Portation_Model.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 //http://english.stackexchange.com/a/141735
4 4
 class Tracker_Portation_Model extends Tracker_Base_Model {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 //http://english.stackexchange.com/a/141735
4 4
 class Tracker_Portation_Model extends Tracker_Base_Model {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 		$arr = [];
63 63
 		if($query->num_rows() > 0) {
64
-			foreach ($query->result() as $row) {
64
+			foreach($query->result() as $row) {
65 65
 				$arr[$row->category][] = [
66 66
 					'site'            => $row->site,
67 67
 					'title_url'       => $row->title_url,
@@ -94,15 +94,15 @@  discard block
 block discarded – undo
94 94
 		$enclosure_esc = preg_quote($enclosure, '/');
95 95
 
96 96
 		$output = array();
97
-		foreach ($fields as $field) {
98
-			if ($field === NULL && $nullToMysqlNull) {
97
+		foreach($fields as $field) {
98
+			if($field === NULL && $nullToMysqlNull) {
99 99
 				$output[] = 'NULL';
100 100
 				continue;
101 101
 			}
102 102
 
103 103
 			// Enclose fields containing $delimiter, $enclosure or whitespace
104
-			if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) {
105
-				$output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure;
104
+			if($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) {
105
+				$output[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $field).$enclosure;
106 106
 			} else {
107 107
 				$output[] = $field;
108 108
 			}
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 			$csvArr[] = $headers;
117 117
 		}
118 118
 
119
-		foreach ($fields as $field) {
120
-			$csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure,$encloseAll,$nullToMysqlNull);
119
+		foreach($fields as $field) {
120
+			$csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure, $encloseAll, $nullToMysqlNull);
121 121
 		}
122 122
 
123
-		return implode(PHP_EOL,$csvArr);
123
+		return implode(PHP_EOL, $csvArr);
124 124
 	}
125 125
 }
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Favourites_Model.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Favourites_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,32 +71,32 @@
 block discarded – undo
71 71
 
72 72
 			////We need the series to be tracked
73 73
 			$idCQuery = $this->db->select('id')
74
-			                     ->where('user_id', $userID)
75
-			                     ->where('title_id', $titleID)
76
-			                     ->get('tracker_chapters');
74
+								 ->where('user_id', $userID)
75
+								 ->where('title_id', $titleID)
76
+								 ->get('tracker_chapters');
77 77
 			if(!($idCQuery->num_rows() > 0)) {
78 78
 				//NOTE: This pretty much repeats a lot of what we already did above. Is there a better way to do this?
79 79
 				$this->Tracker->list->update($userID, $site, $title, $chapter, FALSE);
80 80
 
81 81
 				$idCQuery = $this->db->select('id')
82
-				                     ->where('user_id', $userID)
83
-				                     ->where('title_id', $titleID)
84
-				                     ->get('tracker_chapters');
82
+									 ->where('user_id', $userID)
83
+									 ->where('title_id', $titleID)
84
+									 ->get('tracker_chapters');
85 85
 			}
86 86
 			if($idCQuery->num_rows() > 0) {
87 87
 				$idCQueryRow = $idCQuery->row();
88 88
 
89 89
 				//Check if it is already favourited
90 90
 				$idFQuery = $this->db->select('id')
91
-				                     ->where('chapter_id', $idCQueryRow->id)
92
-				                     ->where('chapter', $chapter)
93
-				                     ->get('tracker_favourites');
91
+									 ->where('chapter_id', $idCQueryRow->id)
92
+									 ->where('chapter', $chapter)
93
+									 ->get('tracker_favourites');
94 94
 				if($idFQuery->num_rows() > 0) {
95 95
 					//Chapter is already favourited, so remove it from DB
96 96
 					$idFQueryRow = $idFQuery->row();
97 97
 
98 98
 					$isSuccess = (bool) $this->db->where('id', $idFQueryRow->id)
99
-					                             ->delete('tracker_favourites');
99
+												 ->delete('tracker_favourites');
100 100
 
101 101
 					if($isSuccess) {
102 102
 						$success = array(
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Favourites_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 			          tf.chapter, tf.updated_at', FALSE)
15 15
 			->from('tracker_favourites AS tf')
16 16
 			->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left')
17
-			->join('tracker_titles AS tt',   'tc.title_id = tt.id',   'left')
18
-			->join('tracker_sites AS ts',    'tt.site_id = ts.id',    'left')
17
+			->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left')
18
+			->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left')
19 19
 			->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites?
20 20
 			->order_by('tf.id DESC')
21 21
 			->limit($rowsPerPage, ($rowsPerPage * ($page - 1)))
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 			          tf.chapter, tf.updated_at', FALSE)
51 51
 			->from('tracker_favourites AS tf')
52 52
 			->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left')
53
-			->join('tracker_titles AS tt',   'tc.title_id = tt.id',   'left')
54
-			->join('tracker_sites AS ts',    'tt.site_id = ts.id',    'left')
53
+			->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left')
54
+			->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left')
55 55
 			->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites?
56 56
 			->order_by('tf.id DESC')
57 57
 			->get();
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Base_Model.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Base_Model extends CI_Model {
4 4
 	public $sites;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Base_Model extends CI_Model {
4 4
 	public $sites;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			$this->enabledCategories['custom3'] = $this->User_Options->get('category_custom_3_text');
27 27
 		}
28 28
 
29
-		foreach (glob(APPPATH.'models/Tracker/Sites/*.php') as $filename) {
29
+		foreach(glob(APPPATH.'models/Tracker/Sites/*.php') as $filename) {
30 30
 			/** @noinspection PhpIncludeInspection */
31 31
 			include_once $filename;
32 32
 		}
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Admin_Model.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Admin_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Admin_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		// @formatter:on
76 76
 
77 77
 		if($query->num_rows() > 0) {
78
-			foreach ($query->result() as $row) {
78
+			foreach($query->result() as $row) {
79 79
 				print "> {$row->title} <{$row->site_class} - {$row->title_url}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
80 80
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
81 81
 				if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		$query = $query->get();
154 154
 
155 155
 		if($query->num_rows() > 0) {
156
-			foreach ($query->result() as $row) {
156
+			foreach($query->result() as $row) {
157 157
 				print "> {$row->title} <{$row->site_class} - {$row->title_url}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
158 158
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
159 159
 				if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
 		                  ->get();
195 195
 
196 196
 		$sites = $query->result_array();
197
-		foreach ($sites as $site) {
197
+		foreach($sites as $site) {
198 198
 			$siteClass = $this->sites->{$site['site_class']};
199 199
 			if($titleDataList = $siteClass->doCustomUpdate()) {
200
-				foreach ($titleDataList as $titleURL => $titleData) {
200
+				foreach($titleDataList as $titleURL => $titleData) {
201 201
 					$titleURL = (string) $titleURL; //Number only keys get converted to int for some reason, so we need to fix that.
202 202
 					print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
203 203
 					if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 		$query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class')
241 241
 		                  ->from('tracker_titles')
242 242
 		                  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
243
-		                  ->where('tracker_titles.followed','N')
243
+		                  ->where('tracker_titles.followed', 'N')
244 244
 		                  ->where('tracker_titles !=', '255')
245 245
 		                  ->where('tracker_sites.status', 'enabled')
246 246
 		                  ->where('tracker_sites.use_custom', 'Y')
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 		// @formatter:on
299 299
 
300 300
 		if($query->num_rows() > 0) {
301
-			foreach ($query->result() as $row) {
301
+			foreach($query->result() as $row) {
302 302
 				print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
303 303
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
304 304
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 							//Make sure last_checked is always updated on successful run.
89 89
 							//CHECK: Is there a reason we aren't just doing this in updateByID?
90 90
 							$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
91
-							         ->where('id', $row->title_id)
92
-							         ->update('tracker_titles');
91
+									 ->where('id', $row->title_id)
92
+									 ->update('tracker_titles');
93 93
 
94 94
 							print " - ({$titleData['latest_chapter']})\n";
95 95
 						} else {
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
 							//Make sure last_checked is always updated on successful run.
104 104
 							//CHECK: Is there a reason we aren't just doing this in updateByID?
105 105
 							$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
106
-							         ->where('id', $row->title_id)
107
-							         ->update('tracker_titles');
106
+									 ->where('id', $row->title_id)
107
+									 ->update('tracker_titles');
108 108
 
109 109
 							print " - (No chapters found?)\n";
110 110
 						} else {
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 						//Make sure last_checked is always updated on successful run.
183 183
 						//CHECK: Is there a reason we aren't just doing this in updateByID?
184 184
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
185
-						         ->where('id', $row->title_id)
186
-						         ->update('tracker_titles');
185
+								 ->where('id', $row->title_id)
186
+								 ->update('tracker_titles');
187 187
 
188 188
 						print " - ({$titleData['latest_chapter']})\n";
189 189
 					} else {
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public function updateCustom() {
209 209
 		$query = $this->db->select('*')
210
-		                  ->from('tracker_sites')
211
-		                  ->where('status', 'enabled')
212
-		                  ->where('tracker_sites.use_custom', 'Y')
213
-		                  ->get();
210
+						  ->from('tracker_sites')
211
+						  ->where('status', 'enabled')
212
+						  ->where('tracker_sites.use_custom', 'Y')
213
+						  ->get();
214 214
 
215 215
 		$sites = $query->result_array();
216 216
 		foreach ($sites as $site) {
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
 									//Make sure last_checked is always updated on successful run.
228 228
 									//CHECK: Is there a reason we aren't just doing this in updateByID?
229 229
 									$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
230
-									         ->where('id', $titleID)
231
-									         ->update('tracker_titles');
230
+											 ->where('id', $titleID)
231
+											 ->update('tracker_titles');
232 232
 
233 233
 									print " - ({$titleData['latest_chapter']})\n";
234 234
 								} else {
@@ -257,13 +257,13 @@  discard block
 block discarded – undo
257 257
 
258 258
 	public function refollowCustom() {
259 259
 		$query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class')
260
-		                  ->from('tracker_titles')
261
-		                  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
262
-		                  ->where('tracker_titles.followed','N')
263
-		                  ->where('tracker_titles !=', '255')
264
-		                  ->where('tracker_sites.status', 'enabled')
265
-		                  ->where('tracker_sites.use_custom', 'Y')
266
-		                  ->get();
260
+						  ->from('tracker_titles')
261
+						  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
262
+						  ->where('tracker_titles.followed','N')
263
+						  ->where('tracker_titles !=', '255')
264
+						  ->where('tracker_sites.status', 'enabled')
265
+						  ->where('tracker_sites.use_custom', 'Y')
266
+						  ->get();
267 267
 
268 268
 		if($query->num_rows() > 0) {
269 269
 			foreach($query->result() as $row) {
@@ -274,8 +274,8 @@  discard block
 block discarded – undo
274 274
 
275 275
 					if(!empty($titleData)) {
276 276
 						$this->db->set($titleData)
277
-						         ->where('id', $row->id)
278
-						         ->update('tracker_titles');
277
+								 ->where('id', $row->id)
278
+								 ->update('tracker_titles');
279 279
 
280 280
 						print "> {$row->site_class}:{$row->id}:{$row->title_url} FOLLOWED\n";
281 281
 					} else {
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
324 324
 					if($titleData['title'] !== $row->title) {
325 325
 						$this->db->set('title', $titleData['title'])
326
-						         ->where('id', $row->id)
327
-						         ->update('tracker_titles');
326
+								 ->where('id', $row->id)
327
+								 ->update('tracker_titles');
328 328
 						//TODO: Add to history somehow?
329 329
 						print " - NEW TITLE ({$titleData['title']})\n";
330 330
 					} else {
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
 					//We might as well try to update as well.
335 335
 					if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) {
336 336
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
337
-						         ->where('id', $row->id)
338
-						         ->update('tracker_titles');
337
+								 ->where('id', $row->id)
338
+								 ->update('tracker_titles');
339 339
 					}
340 340
 				} else {
341 341
 					log_message('error', "{$row->title} failed to update title successfully");
@@ -351,14 +351,14 @@  discard block
 block discarded – undo
351 351
 		$date = $temp_now->format('Y-m-d');
352 352
 
353 353
 		$query = $this->db->select('1')
354
-		                  ->from('site_stats')
355
-		                  ->where('date', $date)
356
-		                  ->get();
354
+						  ->from('site_stats')
355
+						  ->where('date', $date)
356
+						  ->get();
357 357
 
358 358
 		if($query->num_rows() > 0) {
359 359
 			$this->db->set('total_requests', 'total_requests+1', FALSE)
360
-			         ->where('date', $date)
361
-			         ->update('site_stats');
360
+					 ->where('date', $date)
361
+					 ->update('site_stats');
362 362
 		} else {
363 363
 			$this->db->insert('site_stats', [
364 364
 				'date'           => $date,
Please login to merge, or discard this patch.