Completed
Push — master ( 592cc9...b664a6 )
by Angus
02:30
created
application/models/Tracker/Sites/DokiFansubs.php 1 patch
Spacing   +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 DokiFansubs extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://kobato.hologfx.com/reader';
Please login to merge, or discard this patch.
application/models/Tracker/Sites/JaiminisBox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 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 JaiminisBox extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://jaiminisbox.com/reader';
5 5
 
6 6
 	//NOTE: Jaimini's Box appears to have disabled API support for some reason. Fallback to using the old method.
7
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
7
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
8 8
 		$fullURL = $this->getFullTitleURL($title_url);
9 9
 		$titleData = [];
10 10
 		if($content = $this->get_content($fullURL, "", "", FALSE, TRUE, ['adult' => 'true'])) {
Please login to merge, or discard this patch.
application/controllers/User/Auth/Forgot_Password.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 		$this->header_data['page']  = "forgot_password";
17 17
 
18 18
 		//TODO (RESEARCH): Should we allow username here too?
19
-		$this->form_validation->set_rules('email', 'Email',  'required|valid_email', array(
19
+		$this->form_validation->set_rules('email', 'Email', 'required|valid_email', array(
20 20
 			'required'    => 'Please enter your email.',
21 21
 			'valid_email' => 'The email your entered is invalid.'
22 22
 		));
23 23
 
24
-		if ($this->form_validation->run() === TRUE) {
24
+		if($this->form_validation->run() === TRUE) {
25 25
 			//form is valid
26 26
 
27 27
 			$identity = $this->ion_auth->where('email', $this->input->post('email'))->users()->row();
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
 		$this->header_data['page'] = "reset-password";
72 72
 
73 73
 		$user = $this->ion_auth->forgotten_password_check($code);
74
-		if ($user) {
74
+		if($user) {
75 75
 			//code is valid, show reset form or process reset
76 76
 			$min_password_length = $this->config->item('min_password_length', 'ion_auth');
77 77
 			$max_password_length = $this->config->item('max_password_length', 'ion_auth');
78
-			$this->form_validation->set_rules('new_password',         "Password",         'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']');
78
+			$this->form_validation->set_rules('new_password', "Password", 'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']');
79 79
 			$this->form_validation->set_rules('new_password_confirm', "Password Confirm", 'required|matches[new_password]');
80 80
 
81
-			if ($this->form_validation->run() === TRUE) {
81
+			if($this->form_validation->run() === TRUE) {
82 82
 				//form is valid, process the password reset request
83 83
 				//TODO (Research): The original ion_auth auth.php sent the userid to the form, then matched it on return, is there any point to this?
84 84
 
85 85
 				$identity = $user->{'email'};
86 86
 				$change   = $this->ion_auth->reset_password($identity, $this->input->post('new_password'));
87 87
 
88
-				if ($change) {
88
+				if($change) {
89 89
 					//password changed successfully, redirect to login
90 90
 					$this->session->set_flashdata('notices', $this->ion_auth->messages());
91 91
 					redirect("user/login", 'refresh');
Please login to merge, or discard this patch.
application/models/Tracker/Sites/WorldThree.php 1 patch
Spacing   +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 WorldThree extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'http://www.slide.world-three.org';
Please login to merge, or discard this patch.
application/models/Tracker/Sites/WhiteCloudPavillion.php 1 patch
Spacing   +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 WhiteCloudPavillion extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://archangelscans.com/free';
Please login to merge, or discard this patch.
application/models/History_Model.php 1 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/User_Options_Model.php 1 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 User_Options_Model extends CI_Model {
4 4
 	public $options = array(
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 			$query = $this->db->select('value_str, value_int')
201 201
 			                  ->from('user_options')
202 202
 			                  ->where('user_id', $userID)
203
-			                  ->where('name',    $option)
203
+			                  ->where('name', $option)
204 204
 			                  ->limit(1);
205 205
 			$data = $query->get()->row_array();
206 206
 		} else {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 				$query = $this->db->select('value_str, value_int')
209 209
 				                  ->from('user_options')
210 210
 				                  ->where('user_id', $userID)
211
-				                  ->where('name',    $option)
211
+				                  ->where('name', $option)
212 212
 				                  ->limit(1);
213 213
 				$data = $query->get()->row_array();
214 214
 				$this->session->set_tempdata("option_{$option}", $data, 3600);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			);
262 262
 			//FIXME: Get a better solution than str_replace for removing special characters
263 263
 			$elements = array();
264
-			foreach (array_values($this->options[$option]['valid_options']) as $valid_option) {
264
+			foreach(array_values($this->options[$option]['valid_options']) as $valid_option) {
265 265
 				$elements[$option.'_'.str_replace(',', '_', $valid_option)] = array_merge($base_attributes, array(
266 266
 					'value' => $valid_option
267 267
 				));
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_List_Model.php 1 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() {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			];
30 30
 		}
31 31
 		if($query->num_rows() > 0) {
32
-			foreach ($query->result() as $row) {
32
+			foreach($query->result() as $row) {
33 33
 				$is_unread = intval(($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0');
34 34
 				$arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread);
35 35
 				$data = [
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 			$sortOrder = $this->User_Options->get('list_sort_order', $userID);
85 85
 			switch($this->User_Options->get('list_sort_type', $userID)) {
86 86
 				case 'unread':
87
-					foreach (array_keys($arr['series']) as $category) {
88
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
87
+					foreach(array_keys($arr['series']) as $category) {
88
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
89 89
 							$a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}");
90 90
 							$b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}");
91 91
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 					break;
100 100
 
101 101
 				case 'unread_latest':
102
-					foreach (array_keys($arr['series']) as $category) {
103
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
102
+					foreach(array_keys($arr['series']) as $category) {
103
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
104 104
 							$a_text = $a['new_chapter_exists'];
105 105
 							$b_text = $b['new_chapter_exists'];
106 106
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 					break;
122 122
 
123 123
 				case 'alphabetical':
124
-					foreach (array_keys($arr['series']) as $category) {
124
+					foreach(array_keys($arr['series']) as $category) {
125 125
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
126 126
 							$a_text = strtolower("{$a['title_data']['title']}");
127 127
 							$b_text = strtolower("{$b['title_data']['title']}");
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 					break;
137 137
 
138 138
 				case 'my_status':
139
-					foreach (array_keys($arr['series']) as $category) {
139
+					foreach(array_keys($arr['series']) as $category) {
140 140
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
141 141
 							$a_text = strtolower("{$a['generated_current_data']['number']}");
142 142
 							$b_text = strtolower("{$b['generated_current_data']['number']}");
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 					break;
152 152
 
153 153
 				case 'latest':
154
-					foreach (array_keys($arr['series']) as $category) {
154
+					foreach(array_keys($arr['series']) as $category) {
155 155
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
156 156
 							$a_text = new DateTime("{$a['title_data']['last_updated']}");
157 157
 							$b_text = new DateTime("{$b['title_data']['last_updated']}");
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		return $status;
284 284
 	}
285 285
 
286
-	public function getMalID(int $userID, int $titleID) : ?array{
286
+	public function getMalID(int $userID, int $titleID) : ? array{
287 287
 		$malIDArr = NULL;
288 288
 
289 289
 		//NEW METHOD
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 			                  ->get('tracker_chapters');
322 322
 
323 323
 			if($queryC2->num_rows() > 0 && ($tag_string = $queryC2->row()->tags) && !is_null($tag_string)) {
324
-				$arr   = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
324
+				$arr = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
325 325
 				if(!empty($arr)) {
326 326
 					$malIDArr = [
327 327
 						'id'   => explode(':', $arr[0])[1],
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Base_Model.php 1 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.