@@ -1,4 +1,4 @@ |
||
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'; |
@@ -1,4 +1,4 @@ |
||
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'; |
@@ -1,4 +1,4 @@ discard block |
||
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 |
||
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>"; |
@@ -1,4 +1,4 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | )); |
@@ -1,4 +1,4 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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], |
@@ -1,4 +1,4 @@ discard block |
||
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 |
||
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 | } |
@@ -1,4 +1,4 @@ |
||
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 HotChocolateScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://hotchocolatescans.com/fs'; |
@@ -63,12 +63,12 @@ |
||
63 | 63 | if($show_404) show_404(); |
64 | 64 | } |
65 | 65 | |
66 | - private function _walk_recursive_remove (array $array, callable $callback) : array { |
|
67 | - foreach ($array as $k => $v) { |
|
68 | - if (is_array($v)) { |
|
66 | + private function _walk_recursive_remove(array $array, callable $callback) : array { |
|
67 | + foreach($array as $k => $v) { |
|
68 | + if(is_array($v)) { |
|
69 | 69 | $array[$k] = $this->_walk_recursive_remove($v, $callback); |
70 | 70 | } else { |
71 | - if ($callback($v, $k)) { |
|
71 | + if($callback($v, $k)) { |
|
72 | 72 | unset($array[$k]); |
73 | 73 | } |
74 | 74 | } |
@@ -1,4 +1,4 @@ discard block |
||
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 Mangazuki extends Base_Site_Model { |
4 | 4 | public $titleFormat = '/^[a-zA-Z0-9-]+$/'; |
@@ -15,7 +15,7 @@ discard block |
||
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); |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | "" |
32 | 32 | ); |
33 | 33 | if($data) { |
34 | - $titleData['title'] = trim(preg_replace('/ Added on .*$/','', $data['nodes_title']->textContent)); |
|
34 | + $titleData['title'] = trim(preg_replace('/ Added on .*$/', '', $data['nodes_title']->textContent)); |
|
35 | 35 | |
36 | 36 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9\.]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
37 | 37 | |
38 | - $dateString = str_replace('Added ', '',$data['nodes_latest']->textContent); |
|
39 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
38 | + $dateString = str_replace('Added ', '', $data['nodes_latest']->textContent); |
|
39 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | return (!empty($titleData) ? $titleData : NULL); |