@@ -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 PureMashiroScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://puremashiro.moe/reader'; |
@@ -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 | //Ravens Scans is a bit of an irregular in that it uses a combination of a FoolSlide fork (https://github.com/dvaJi/FoOlSlide) and a standalone front-end (https://github.com/dvaJi/ReaderFront). |
4 | 4 | class RavensScans extends Base_FoolSlide_Site_Model { |
@@ -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 WebToons extends Base_Site_Model { |
4 | 4 | /* Webtoons.com has a very weird and pointless URL format. |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ]; |
35 | 35 | } |
36 | 36 | |
37 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
37 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
38 | 38 | $titleData = []; |
39 | 39 | |
40 | 40 | //FIXME: We don't use parseTitleDOM here due to using rss. Should probably have an alternate method for XML parsing. |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | $titleData['title'] = trim((string) $xml->{'channel'}->title); |
53 | 53 | |
54 | 54 | $chapterURLSegments = explode('/', ((string) $xml->{'channel'}->item[0]->link)); |
55 | - $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]) . ':--:' . $chapterURLSegments[6]; |
|
56 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
55 | + $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]).':--:'.$chapterURLSegments[6]; |
|
56 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
57 | 57 | |
58 | 58 | if($firstGet) { |
59 | 59 | $titleData = array_merge($titleData, $this->doCustomFollow($content['body'], ['id' => $title_parts[0]])); |
@@ -78,7 +78,7 @@ |
||
78 | 78 | //TEMP |
79 | 79 | $route['user/dashboard_beta'] = 'User/DashboardBeta'; |
80 | 80 | |
81 | -$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
81 | +$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
82 | 82 | $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1'; |
83 | 83 | |
84 | 84 | $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited |
@@ -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 HatigarmScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://hatigarmscans.eu/hs'; |
@@ -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 CatScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://reader.thecatscans.com'; |
@@ -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 Mangazuki extends Base_myMangaReaderCMS_Site_Model { |
4 | 4 | public $baseURL = 'https://mangazuki.co'; |
@@ -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 FallenAngelsScans extends Base_myMangaReaderCMS_Site_Model { |
4 | 4 | public $baseURL = 'https://manga.fascans.com'; |
@@ -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() { |
@@ -33,7 +33,7 @@ discard block |
||
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 = [ |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | $sortOrder = $this->User_Options->get('list_sort_order', $userID); |
90 | 90 | switch($this->User_Options->get('list_sort_type', $userID)) { |
91 | 91 | case 'unread': |
92 | - foreach (array_keys($arr['series']) as $category) { |
|
93 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
92 | + foreach(array_keys($arr['series']) as $category) { |
|
93 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
94 | 94 | $a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}"); |
95 | 95 | $b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}"); |
96 | 96 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | break; |
105 | 105 | |
106 | 106 | case 'unread_latest': |
107 | - foreach (array_keys($arr['series']) as $category) { |
|
108 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
107 | + foreach(array_keys($arr['series']) as $category) { |
|
108 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
109 | 109 | $a_text = $a['new_chapter_exists']; |
110 | 110 | $b_text = $b['new_chapter_exists']; |
111 | 111 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | break; |
127 | 127 | |
128 | 128 | case 'alphabetical': |
129 | - foreach (array_keys($arr['series']) as $category) { |
|
129 | + foreach(array_keys($arr['series']) as $category) { |
|
130 | 130 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
131 | 131 | $a_text = strtolower("{$a['title_data']['title']}"); |
132 | 132 | $b_text = strtolower("{$b['title_data']['title']}"); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | break; |
142 | 142 | |
143 | 143 | case 'my_status': |
144 | - foreach (array_keys($arr['series']) as $category) { |
|
144 | + foreach(array_keys($arr['series']) as $category) { |
|
145 | 145 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
146 | 146 | $a_text = strtolower("{$a['generated_current_data']['number']}"); |
147 | 147 | $b_text = strtolower("{$b['generated_current_data']['number']}"); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | break; |
157 | 157 | |
158 | 158 | case 'latest': |
159 | - foreach (array_keys($arr['series']) as $category) { |
|
159 | + foreach(array_keys($arr['series']) as $category) { |
|
160 | 160 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
161 | 161 | $a_text = new DateTime("{$a['title_data']['last_updated']}"); |
162 | 162 | $b_text = new DateTime("{$b['title_data']['last_updated']}"); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | return $status; |
289 | 289 | } |
290 | 290 | |
291 | - public function getMalID(int $userID, int $titleID) : ?array{ |
|
291 | + public function getMalID(int $userID, int $titleID) : ? array{ |
|
292 | 292 | $malIDArr = NULL; |
293 | 293 | |
294 | 294 | //NEW METHOD |