Completed
Push — master ( 789965...c5eb3b )
by Angus
02:34
created
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.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 						//Make sure last_checked is always updated on successful run.
75 75
 						//CHECK: Is there a reason we aren't just doing this in updateByID?
76 76
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
77
-						         ->where('id', $row->title_id)
78
-						         ->update('tracker_titles');
77
+								 ->where('id', $row->title_id)
78
+								 ->update('tracker_titles');
79 79
 
80 80
 						print " - ({$titleData['latest_chapter']})\n";
81 81
 					} else {
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 						//Make sure last_checked is always updated on successful run.
153 153
 						//CHECK: Is there a reason we aren't just doing this in updateByID?
154 154
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
155
-						         ->where('id', $row->title_id)
156
-						         ->update('tracker_titles');
155
+								 ->where('id', $row->title_id)
156
+								 ->update('tracker_titles');
157 157
 
158 158
 						print " - ({$titleData['latest_chapter']})\n";
159 159
 					} else {
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	public function updateCustom() {
179 179
 		$query = $this->db->select('*')
180
-		                  ->from('tracker_sites')
181
-		                  ->where('status', 'enabled')
182
-		                  ->where('tracker_sites.use_custom', 'Y')
183
-		                  ->get();
180
+						  ->from('tracker_sites')
181
+						  ->where('status', 'enabled')
182
+						  ->where('tracker_sites.use_custom', 'Y')
183
+						  ->get();
184 184
 
185 185
 		$sites = $query->result_array();
186 186
 		foreach ($sites as $site) {
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 									//Make sure last_checked is always updated on successful run.
197 197
 									//CHECK: Is there a reason we aren't just doing this in updateByID?
198 198
 									$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
199
-									         ->where('id', $titleID)
200
-									         ->update('tracker_titles');
199
+											 ->where('id', $titleID)
200
+											 ->update('tracker_titles');
201 201
 
202 202
 									print " - ({$titleData['latest_chapter']})\n";
203 203
 								} else {
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
 
225 225
 	public function refollowCustom() {
226 226
 		$query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class')
227
-		                  ->from('tracker_titles')
228
-		                  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
229
-		                  ->where('tracker_titles.followed','N')
230
-		                  ->where('tracker_titles !=', '255')
231
-		                  ->where('tracker_sites.status', 'enabled')
232
-		                  ->where('tracker_sites.use_custom', 'Y')
233
-		                  ->get();
227
+						  ->from('tracker_titles')
228
+						  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
229
+						  ->where('tracker_titles.followed','N')
230
+						  ->where('tracker_titles !=', '255')
231
+						  ->where('tracker_sites.status', 'enabled')
232
+						  ->where('tracker_sites.use_custom', 'Y')
233
+						  ->get();
234 234
 
235 235
 		if($query->num_rows() > 0) {
236 236
 			foreach($query->result() as $row) {
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
 
242 242
 					if(!empty($titleData)) {
243 243
 						$this->db->set($titleData)
244
-						         ->where('id', $row->id)
245
-						         ->update('tracker_titles');
244
+								 ->where('id', $row->id)
245
+								 ->update('tracker_titles');
246 246
 
247 247
 						print "> {$row->site_class}:{$row->id}:{$row->title_url} FOLLOWED\n";
248 248
 					} else {
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
291 291
 					if($titleData['title'] !== $row->title) {
292 292
 						$this->db->set('title', $titleData['title'])
293
-						         ->where('id', $row->id)
294
-						         ->update('tracker_titles');
293
+								 ->where('id', $row->id)
294
+								 ->update('tracker_titles');
295 295
 						//TODO: Add to history somehow?
296 296
 						print " - NEW TITLE ({$titleData['title']})\n";
297 297
 					} else {
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
 					//We might as well try to update as well.
302 302
 					if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) {
303 303
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
304
-						         ->where('id', $row->id)
305
-						         ->update('tracker_titles');
304
+								 ->where('id', $row->id)
305
+								 ->update('tracker_titles');
306 306
 					}
307 307
 				} else {
308 308
 					log_message('error', "{$row->title} failed to update title successfully");
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() {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		// @formatter:on
65 65
 
66 66
 		if($query->num_rows() > 0) {
67
-			foreach ($query->result() as $row) {
67
+			foreach($query->result() as $row) {
68 68
 				print "> {$row->title} <{$row->site_class}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
69 69
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
70 70
 				if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		$query = $query->get();
143 143
 
144 144
 		if($query->num_rows() > 0) {
145
-			foreach ($query->result() as $row) {
145
+			foreach($query->result() as $row) {
146 146
 				print "> {$row->title} <{$row->site_class}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
147 147
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
148 148
 				if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
 		                  ->get();
184 184
 
185 185
 		$sites = $query->result_array();
186
-		foreach ($sites as $site) {
186
+		foreach($sites as $site) {
187 187
 			$siteClass = $this->sites->{$site['site_class']};
188 188
 			if($titleDataList = $siteClass->doCustomUpdate()) {
189
-				foreach ($titleDataList as $titleURL => $titleData) {
189
+				foreach($titleDataList as $titleURL => $titleData) {
190 190
 					print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
191 191
 					if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
192 192
 						if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		$query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class')
227 227
 		                  ->from('tracker_titles')
228 228
 		                  ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left')
229
-		                  ->where('tracker_titles.followed','N')
229
+		                  ->where('tracker_titles.followed', 'N')
230 230
 		                  ->where('tracker_titles !=', '255')
231 231
 		                  ->where('tracker_sites.status', 'enabled')
232 232
 		                  ->where('tracker_sites.use_custom', 'Y')
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 		// @formatter:on
285 285
 
286 286
 		if($query->num_rows() > 0) {
287
-			foreach ($query->result() as $row) {
287
+			foreach($query->result() as $row) {
288 288
 				print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
289 289
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
290 290
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_List_Model.php 4 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_List_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -171,14 +171,14 @@  discard block
 block discarded – undo
171 171
 			}
172 172
 
173 173
 			$idQuery = $this->db->select('id')
174
-			                    ->where('user_id', $userID)
175
-			                    ->where('title_id', $titleID)
176
-			                    ->get('tracker_chapters');
174
+								->where('user_id', $userID)
175
+								->where('title_id', $titleID)
176
+								->get('tracker_chapters');
177 177
 			if($idQuery->num_rows() > 0) {
178 178
 				$success = (bool) $this->db->set(['current_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL, 'ignore_chapter' => NULL])
179
-				                           ->where('user_id', $userID)
180
-				                           ->where('title_id', $titleID)
181
-				                           ->update('tracker_chapters');
179
+										   ->where('user_id', $userID)
180
+										   ->where('title_id', $titleID)
181
+										   ->update('tracker_chapters');
182 182
 
183 183
 				if($success) {
184 184
 					$idQueryRow = $idQuery->row();
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 	}
205 205
 	public function updateByID(int $userID, int $chapterID, string $chapter) : bool {
206 206
 		$success = (bool) $this->db->set(['current_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL])
207
-		                           ->where('user_id', $userID)
208
-		                           ->where('id', $chapterID)
209
-		                           ->update('tracker_chapters');
207
+								   ->where('user_id', $userID)
208
+								   ->where('id', $chapterID)
209
+								   ->update('tracker_chapters');
210 210
 
211 211
 		if($success) {
212 212
 			$this->History->userUpdateTitle($chapterID, $chapter);
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 
217 217
 	public function ignoreByID(int $userID, int $chapterID, string $chapter) : bool {
218 218
 		$success = (bool) $this->db->set(['ignore_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL])
219
-		                           ->where('user_id', $userID)
220
-		                           ->where('id', $chapterID)
221
-		                           ->update('tracker_chapters');
219
+								   ->where('user_id', $userID)
220
+								   ->where('id', $chapterID)
221
+								   ->update('tracker_chapters');
222 222
 
223 223
 		if($success) {
224 224
 			$this->History->userIgnoreTitle($chapterID, $chapter);
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 		//This is to allow user history to function properly.
232 232
 
233 233
 		$success = $this->db->set(['active' => 'N', 'last_updated' => NULL])
234
-		                    ->where('user_id', $userID)
235
-		                    ->where('id', $chapterID)
236
-		                    ->update('tracker_chapters');
234
+							->where('user_id', $userID)
235
+							->where('id', $chapterID)
236
+							->update('tracker_chapters');
237 237
 
238 238
 		return (bool) $success;
239 239
 	}
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 		//TODO: OPTION, USE BACKEND MAL ID DB WHERE POSSIBLE (DEFAULT TRUE)
264 264
 
265 265
 		$queryC = $this->db->select('mal_id')
266
-		                   ->where('user_id', $userID)
267
-		                   ->where('title_id', $titleID)
268
-		                   ->get('tracker_chapters');
266
+						   ->where('user_id', $userID)
267
+						   ->where('title_id', $titleID)
268
+						   ->get('tracker_chapters');
269 269
 
270 270
 		if($queryC->num_rows() > 0 && ($rowC = $queryC->row())) {
271 271
 			$malIDArr = [
@@ -274,8 +274,8 @@  discard block
 block discarded – undo
274 274
 			];
275 275
 		} else {
276 276
 			$queryT = $this->db->select('mal_id')
277
-			                   ->where('title_id', $titleID)
278
-			                   ->get('tracker_titles');
277
+							   ->where('title_id', $titleID)
278
+							   ->get('tracker_titles');
279 279
 
280 280
 			if($queryT->num_rows() > 0 && ($rowT = $queryT->row())) {
281 281
 				$malIDArr = [
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
 		//TODO: Remove after a few weeks!
290 290
 		if(is_null($malIDArr)) {
291 291
 			$queryC2 = $this->db->select('tags')
292
-			                  ->where('user_id', $userID)
293
-			                  ->where('title_id', $titleID)
294
-			                  ->get('tracker_chapters');
292
+							  ->where('user_id', $userID)
293
+							  ->where('title_id', $titleID)
294
+							  ->get('tracker_chapters');
295 295
 
296 296
 			if($queryC2->num_rows() > 0 && ($tag_string = $queryC2->row()->tags) && !is_null($tag_string)) {
297 297
 				$arr   = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 	public function setMalID(int $userID, int $chapterID, ?int $malID) : bool {
310 310
 		//TODO: Handle NULL?
311 311
 		$success = (bool) $this->db->set(['mal_id' => $malID, 'active' => 'Y', 'last_updated' => NULL])
312
-		                           ->where('user_id', $userID)
313
-		                           ->where('id', $chapterID)
314
-		                           ->update('tracker_chapters');
312
+								   ->where('user_id', $userID)
313
+								   ->where('id', $chapterID)
314
+								   ->update('tracker_chapters');
315 315
 
316 316
 		if($success) {
317 317
 			//MAL id update was successful, update history
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 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_List_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			];
34 34
 		}
35 35
 		if($result->num_rows() > 0) {
36
-			foreach ($result->result() as $row) {
36
+			foreach($result->result() as $row) {
37 37
 				$is_unread = intval(($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0');
38 38
 				$arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread);
39 39
 				$data = [
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 			$sortOrder = $this->User_Options->get('list_sort_order', $userID);
91 91
 			switch($this->User_Options->get('list_sort_type', $userID)) {
92 92
 				case 'unread':
93
-					foreach (array_keys($arr['series']) as $category) {
94
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
93
+					foreach(array_keys($arr['series']) as $category) {
94
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
95 95
 							$a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}");
96 96
 							$b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}");
97 97
 
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 					break;
106 106
 
107 107
 				case 'unread_latest':
108
-					foreach (array_keys($arr['series']) as $category) {
109
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
108
+					foreach(array_keys($arr['series']) as $category) {
109
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
110 110
 							$a_text = $a['new_chapter_exists'];
111 111
 							$b_text = $b['new_chapter_exists'];
112 112
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 					break;
128 128
 
129 129
 				case 'alphabetical':
130
-					foreach (array_keys($arr['series']) as $category) {
130
+					foreach(array_keys($arr['series']) as $category) {
131 131
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
132 132
 							$a_text = strtolower("{$a['title_data']['title']}");
133 133
 							$b_text = strtolower("{$b['title_data']['title']}");
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 					break;
143 143
 
144 144
 				case 'my_status':
145
-					foreach (array_keys($arr['series']) as $category) {
145
+					foreach(array_keys($arr['series']) as $category) {
146 146
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
147 147
 							$a_text = strtolower("{$a['generated_current_data']['number']}");
148 148
 							$b_text = strtolower("{$b['generated_current_data']['number']}");
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 					break;
158 158
 
159 159
 				case 'latest':
160
-					foreach (array_keys($arr['series']) as $category) {
160
+					foreach(array_keys($arr['series']) as $category) {
161 161
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
162 162
 							$a_text = new DateTime("{$a['title_data']['last_updated']}");
163 163
 							$b_text = new DateTime("{$b['title_data']['last_updated']}");
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		return $status;
290 290
 	}
291 291
 
292
-	public function getMalID(int $userID, int $titleID) : ?array{
292
+	public function getMalID(int $userID, int $titleID) : ? array{
293 293
 		$malIDArr = NULL;
294 294
 
295 295
 		//NEW METHOD
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 			                  ->get('tracker_chapters');
328 328
 
329 329
 			if($queryC2->num_rows() > 0 && ($tag_string = $queryC2->row()->tags) && !is_null($tag_string)) {
330
-				$arr   = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
330
+				$arr = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
331 331
 				if(!empty($arr)) {
332 332
 					$malIDArr = [
333 333
 						'id'   => explode(':', $arr[0])[1],
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,11 +114,15 @@
 block discarded – undo
114 114
 
115 115
 							if($sortOrder == 'asc') {
116 116
 								$unreadSort = ($a_text <=> $b_text);
117
-								if($unreadSort) return $unreadSort;
117
+								if($unreadSort) {
118
+									return $unreadSort;
119
+								}
118 120
 								return $a_text2 <=> $b_text2;
119 121
 							} else {
120 122
 								$unreadSort = ($a_text <=> $b_text);
121
-								if($unreadSort) return $unreadSort;
123
+								if($unreadSort) {
124
+									return $unreadSort;
125
+								}
122 126
 								return $b_text2 <=> $a_text2;
123 127
 							}
124 128
 						});
Please login to merge, or discard this patch.
application/config/development/database.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
 $active_group  = 'default';
4 4
 $query_builder = TRUE;
Please login to merge, or discard this patch.
application/config/constants.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 | always be used to set the mode correctly.
27 27
 |
28 28
 */
29
-defined('FILE_READ_MODE')  OR define('FILE_READ_MODE', 0644);
29
+defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
30 30
 defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
31
-defined('DIR_READ_MODE')   OR define('DIR_READ_MODE', 0755);
32
-defined('DIR_WRITE_MODE')  OR define('DIR_WRITE_MODE', 0755);
31
+defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
32
+defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
33 33
 
34 34
 /*
35 35
 |--------------------------------------------------------------------------
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 | These modes are used when working with fopen()/popen()
40 40
 |
41 41
 */
42
-defined('FOPEN_READ')                           OR define('FOPEN_READ', 'rb');
43
-defined('FOPEN_READ_WRITE')                     OR define('FOPEN_READ_WRITE', 'r+b');
44
-defined('FOPEN_WRITE_CREATE_DESTRUCTIVE')       OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
42
+defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
43
+defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
44
+defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
45 45
 defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
46
-defined('FOPEN_WRITE_CREATE')                   OR define('FOPEN_WRITE_CREATE', 'ab');
47
-defined('FOPEN_READ_WRITE_CREATE')              OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
48
-defined('FOPEN_WRITE_CREATE_STRICT')            OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
49
-defined('FOPEN_READ_WRITE_CREATE_STRICT')       OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
46
+defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
47
+defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
48
+defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
49
+defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
50 50
 
51 51
 /*
52 52
 |--------------------------------------------------------------------------
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 |       http://tldp.org/LDP/abs/html/exitcodes.html
74 74
 |
75 75
 */
76
-defined('EXIT_SUCCESS')        OR define('EXIT_SUCCESS', 0); // no errors
77
-defined('EXIT_ERROR')          OR define('EXIT_ERROR', 1); // generic error
78
-defined('EXIT_CONFIG')         OR define('EXIT_CONFIG', 3); // configuration error
79
-defined('EXIT_UNKNOWN_FILE')   OR define('EXIT_UNKNOWN_FILE', 4); // file not found
80
-defined('EXIT_UNKNOWN_CLASS')  OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
76
+defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
77
+defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
78
+defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
79
+defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
80
+defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
81 81
 defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
82
-defined('EXIT_USER_INPUT')     OR define('EXIT_USER_INPUT', 7); // invalid user input
83
-defined('EXIT_DATABASE')       OR define('EXIT_DATABASE', 8); // database error
84
-defined('EXIT__AUTO_MIN')      OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
85
-defined('EXIT__AUTO_MAX')      OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
82
+defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
83
+defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
84
+defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
85
+defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
86 86
 
87 87
 /***** TIMEAGO CONSTANTS *****/
88 88
 defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago
89
-defined('TIMEAGO_WEEK')  OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago
90
-defined('TIMEAGO_3DAY')  OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago
89
+defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago
90
+defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago
Please login to merge, or discard this patch.
Upper-Lower-Casing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-defined('BASEPATH') OR exit('No direct script access allowed');
2
+defined('BASEPATH') or exit('No direct script access allowed');
3 3
 
4 4
 /*
5 5
 |--------------------------------------------------------------------------
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 | of this setting
12 12
 |
13 13
 */
14
-defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
14
+defined('SHOW_DEBUG_BACKTRACE') or define('SHOW_DEBUG_BACKTRACE', TRUE);
15 15
 
16 16
 /*
17 17
 |--------------------------------------------------------------------------
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 | always be used to set the mode correctly.
27 27
 |
28 28
 */
29
-defined('FILE_READ_MODE')  OR define('FILE_READ_MODE', 0644);
30
-defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
31
-defined('DIR_READ_MODE')   OR define('DIR_READ_MODE', 0755);
32
-defined('DIR_WRITE_MODE')  OR define('DIR_WRITE_MODE', 0755);
29
+defined('FILE_READ_MODE')  or define('FILE_READ_MODE', 0644);
30
+defined('FILE_WRITE_MODE') or define('FILE_WRITE_MODE', 0666);
31
+defined('DIR_READ_MODE')   or define('DIR_READ_MODE', 0755);
32
+defined('DIR_WRITE_MODE')  or define('DIR_WRITE_MODE', 0755);
33 33
 
34 34
 /*
35 35
 |--------------------------------------------------------------------------
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 | These modes are used when working with fopen()/popen()
40 40
 |
41 41
 */
42
-defined('FOPEN_READ')                           OR define('FOPEN_READ', 'rb');
43
-defined('FOPEN_READ_WRITE')                     OR define('FOPEN_READ_WRITE', 'r+b');
44
-defined('FOPEN_WRITE_CREATE_DESTRUCTIVE')       OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
45
-defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
46
-defined('FOPEN_WRITE_CREATE')                   OR define('FOPEN_WRITE_CREATE', 'ab');
47
-defined('FOPEN_READ_WRITE_CREATE')              OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
48
-defined('FOPEN_WRITE_CREATE_STRICT')            OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
49
-defined('FOPEN_READ_WRITE_CREATE_STRICT')       OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
42
+defined('FOPEN_READ')                           or define('FOPEN_READ', 'rb');
43
+defined('FOPEN_READ_WRITE')                     or define('FOPEN_READ_WRITE', 'r+b');
44
+defined('FOPEN_WRITE_CREATE_DESTRUCTIVE')       or define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
45
+defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') or define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
46
+defined('FOPEN_WRITE_CREATE')                   or define('FOPEN_WRITE_CREATE', 'ab');
47
+defined('FOPEN_READ_WRITE_CREATE')              or define('FOPEN_READ_WRITE_CREATE', 'a+b');
48
+defined('FOPEN_WRITE_CREATE_STRICT')            or define('FOPEN_WRITE_CREATE_STRICT', 'xb');
49
+defined('FOPEN_READ_WRITE_CREATE_STRICT')       or define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
50 50
 
51 51
 /*
52 52
 |--------------------------------------------------------------------------
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 |       http://tldp.org/LDP/abs/html/exitcodes.html
74 74
 |
75 75
 */
76
-defined('EXIT_SUCCESS')        OR define('EXIT_SUCCESS', 0); // no errors
77
-defined('EXIT_ERROR')          OR define('EXIT_ERROR', 1); // generic error
78
-defined('EXIT_CONFIG')         OR define('EXIT_CONFIG', 3); // configuration error
79
-defined('EXIT_UNKNOWN_FILE')   OR define('EXIT_UNKNOWN_FILE', 4); // file not found
80
-defined('EXIT_UNKNOWN_CLASS')  OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
81
-defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
82
-defined('EXIT_USER_INPUT')     OR define('EXIT_USER_INPUT', 7); // invalid user input
83
-defined('EXIT_DATABASE')       OR define('EXIT_DATABASE', 8); // database error
84
-defined('EXIT__AUTO_MIN')      OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
85
-defined('EXIT__AUTO_MAX')      OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
76
+defined('EXIT_SUCCESS')        or define('EXIT_SUCCESS', 0); // no errors
77
+defined('EXIT_ERROR')          or define('EXIT_ERROR', 1); // generic error
78
+defined('EXIT_CONFIG')         or define('EXIT_CONFIG', 3); // configuration error
79
+defined('EXIT_UNKNOWN_FILE')   or define('EXIT_UNKNOWN_FILE', 4); // file not found
80
+defined('EXIT_UNKNOWN_CLASS')  or define('EXIT_UNKNOWN_CLASS', 5); // unknown class
81
+defined('EXIT_UNKNOWN_METHOD') or define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
82
+defined('EXIT_USER_INPUT')     or define('EXIT_USER_INPUT', 7); // invalid user input
83
+defined('EXIT_DATABASE')       or define('EXIT_DATABASE', 8); // database error
84
+defined('EXIT__AUTO_MIN')      or define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
85
+defined('EXIT__AUTO_MAX')      or define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
86 86
 
87 87
 /***** TIMEAGO CONSTANTS *****/
88
-defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago
89
-defined('TIMEAGO_WEEK')  OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago
90
-defined('TIMEAGO_3DAY')  OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago
88
+defined('TIMEAGO_MONTH') or define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago
89
+defined('TIMEAGO_WEEK')  or define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago
90
+defined('TIMEAGO_3DAY')  or define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago
Please login to merge, or discard this patch.
application/controllers/User/Options.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
 		$usedCategories   = $this->Tracker->category->getUsed($this->User->id);
17 17
 
18 18
 		//NOTE: The checkbox validation is handled in run()
19
-		$this->form_validation->set_rules('category_custom_1_text',  'Custom Category 1 Text',  'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
20
-		$this->form_validation->set_rules('category_custom_2_text',  'Custom Category 2 Text',  'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
21
-		$this->form_validation->set_rules('category_custom_3_text',  'Custom Category 3 Text',  'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
19
+		$this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
20
+		$this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
21
+		$this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
22 22
 		$this->form_validation->set_rules('default_series_category', 'Default Series Category', 'required|is_valid_option_value[default_series_category]');
23
-		$this->form_validation->set_rules('list_sort_type',          'List Sort Type',          'required|is_valid_option_value[list_sort_type]');
24
-		$this->form_validation->set_rules('list_sort_order',         'List Sort Order',         'required|is_valid_option_value[list_sort_order]');
25
-		$this->form_validation->set_rules('theme',                   'Theme',                   'required|is_valid_option_value[theme]');
26
-		$this->form_validation->set_rules('mal_sync',                'MAL Sync',                'required|is_valid_option_value[mal_sync]');
23
+		$this->form_validation->set_rules('list_sort_type', 'List Sort Type', 'required|is_valid_option_value[list_sort_type]');
24
+		$this->form_validation->set_rules('list_sort_order', 'List Sort Order', 'required|is_valid_option_value[list_sort_order]');
25
+		$this->form_validation->set_rules('theme', 'Theme', 'required|is_valid_option_value[theme]');
26
+		$this->form_validation->set_rules('mal_sync', 'MAL Sync', 'required|is_valid_option_value[mal_sync]');
27 27
 
28
-		if ($isValid = $this->form_validation->run() === TRUE) {
28
+		if($isValid = $this->form_validation->run() === TRUE) {
29 29
 			foreach($customCategories as $categoryK => $category) {
30 30
 				if(!in_array($categoryK, $usedCategories)) {
31 31
 					$this->User_Options->set($category, $this->input->post($category) ? 'enabled' : 'disabled');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 			$this->User_Options->set('enable_live_countdown_timer', $this->input->post('enable_live_countdown_timer'));
40 40
 
41
-			$this->User_Options->set('list_sort_type',  $this->input->post('list_sort_type'));
41
+			$this->User_Options->set('list_sort_type', $this->input->post('list_sort_type'));
42 42
 			$this->User_Options->set('list_sort_order', $this->input->post('list_sort_order'));
43 43
 			
44 44
 			$this->User_Options->set('theme', $this->input->post('theme'));
Please login to merge, or discard this patch.
application/models/Tracker/Sites/GameOfScanlation.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 GameOfScanlation extends Base_Site_Model {
4 4
 	public $titleFormat   = '/^[a-z0-9\.-]+$/';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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 GameOfScanlation extends Base_Site_Model {
4 4
 	public $titleFormat   = '/^[a-z0-9\.-]+$/';
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 		         The bad thing is these are interchangeable, despite them showing the exact same listing page.
10 10
 		         Thankfully the title_url of manga which use /forums/ seem to be appended with ".%ID%" which means we can easily check them. */
11 11
 
12
-		if (strpos($title_url, '.') !== FALSE) {
12
+		if(strpos($title_url, '.') !== FALSE) {
13 13
 			$format = "https://gameofscanlation.moe/forums/{$title_url}/";
14 14
 		} else {
15 15
 			$format = "https://gameofscanlation.moe/projects/{$title_url}/";
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		];
25 25
 	}
26 26
 
27
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
27
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
28 28
 		$titleData = [];
29 29
 
30 30
 		$fullURL = $this->getFullTitleURL($title_url);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 			$titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href'));
46 46
 
47
-			$titleData['last_updated'] =  date("Y-m-d H:i:s",(int) $data['nodes_latest']->getAttribute('title'));
47
+			$titleData['last_updated'] = date("Y-m-d H:i:s", (int) $data['nodes_latest']->getAttribute('title'));
48 48
 		}
49 49
 
50 50
 		return (!empty($titleData) ? $titleData : NULL);
Please login to merge, or discard this patch.
application/models/Tracker/Sites/EGScans.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 EGScans extends Base_Site_Model {
4 4
 	public $titleFormat   = '/^[A-Za-z0-9\-_\!,]+$/';
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 EGScans extends Base_Site_Model {
4 4
 	public $titleFormat   = '/^[A-Za-z0-9\-_\!,]+$/';
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		];
16 16
 	}
17 17
 
18
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
18
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
19 19
 		$titleData = [];
20 20
 
21 21
 		$fullURL = $this->getFullTitleURL($title_url);
Please login to merge, or discard this patch.
application/models/Tracker/Sites/MangaPanda.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 MangaPanda extends Base_Site_Model {
4 4
 	//NOTE: MangaPanda has manga pages under the root URL, so we need to filter out pages we know that aren't manga.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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 MangaPanda extends Base_Site_Model {
4 4
 	//NOTE: MangaPanda has manga pages under the root URL, so we need to filter out pages we know that aren't manga.
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 		];
17 17
 	}
18 18
 
19
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
19
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
20 20
 		$titleData = [];
21 21
 
22 22
 		$fullURL = $this->getFullTitleURL($title_url);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 			$titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href'));
37 37
 
38
-			$titleData['last_updated'] =  date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->nodeValue));
38
+			$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->nodeValue));
39 39
 		}
40 40
 
41 41
 		return (!empty($titleData) ? $titleData : NULL);
Please login to merge, or discard this patch.
application/models/Tracker/Sites/DynastyScans.php 2 patches
Upper-Lower-Casing   +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 DynastyScans extends Base_Site_Model {
4 4
 	//FIXME: This has some major issues. SEE: https://github.com/DakuTree/manga-tracker/issues/58
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 					}
79 79
 
80 80
 					$chapterURLSegments = explode('/', (string) $data['nodes_chapter']->getAttribute('href'));
81
-					if (strpos($chapterURLSegments[2], $title_parts[0]) !== false) {
81
+					if (strpos($chapterURLSegments[2], $title_parts[0]) !== FALSE) {
82 82
 						$titleData['latest_chapter'] = substr($chapterURLSegments[2], strlen($title_parts[0]) + 1);
83 83
 					} else {
84 84
 						$titleData['latest_chapter'] = $chapterURLSegments[2];
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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 DynastyScans extends Base_Site_Model {
4 4
 	//FIXME: This has some major issues. SEE: https://github.com/DakuTree/manga-tracker/issues/58
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 		*/
24 24
 
25 25
 		$chapterData = [
26
-			'url'    => 'https://dynasty-scans.com/chapters/' . $title_parts[0].'_'.$chapter,
26
+			'url'    => 'https://dynasty-scans.com/chapters/'.$title_parts[0].'_'.$chapter,
27 27
 			'number' => ''
28 28
 		];
29 29
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		return $chapterData;
52 52
 	}
53 53
 
54
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
54
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
55 55
 		$titleData = [];
56 56
 
57 57
 		$fullURL = $this->getFullTitleURL($title_url);
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
 					}
79 79
 
80 80
 					$chapterURLSegments = explode('/', (string) $data['nodes_chapter']->getAttribute('href'));
81
-					if (strpos($chapterURLSegments[2], $title_parts[0]) !== false) {
81
+					if(strpos($chapterURLSegments[2], $title_parts[0]) !== false) {
82 82
 						$titleData['latest_chapter'] = substr($chapterURLSegments[2], strlen($title_parts[0]) + 1);
83 83
 					} else {
84 84
 						$titleData['latest_chapter'] = $chapterURLSegments[2];
85 85
 					}
86 86
 
87
-					$titleData['last_updated'] =  date("Y-m-d H:i:s", strtotime(str_replace("'", '', substr((string) $data['nodes_latest']->textContent, 9))));
87
+					$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(str_replace("'", '', substr((string) $data['nodes_latest']->textContent, 9))));
88 88
 				}
89 89
 				break;
90 90
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 				preg_match('/<b>.*<\/b>/', $data, $matchesT);
96 96
 				preg_match('/\/doujins\/[^"]+">(.+)?(?=<\/a>)<\/a>/', $data, $matchesD);
97
-				$titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '') . substr($matchesT[0], 3, -4);
97
+				$titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '').substr($matchesT[0], 3, -4);
98 98
 
99 99
 				$titleData['latest_chapter'] = 'oneshot'; //This will never change
100 100
 
Please login to merge, or discard this patch.