@@ -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 MerakiScans extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'http://www.merakiscans.com/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 | class MerakiScans extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'http://www.merakiscans.com/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 | class WhiteoutScans extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'https://reader.whiteoutscans.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 WhiteoutScans extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'https://reader.whiteoutscans.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 DokiFansubs extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'https://kobato.hologfx.com/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 | class DokiFansubs extends Base_FoolSlide_Site_Model { |
| 4 | 4 | public $baseURL = 'https://kobato.hologfx.com/reader'; |
@@ -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_Sites_Model extends CI_Model { |
| 4 | 4 | public function __construct() { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | abstract public function getChapterData(string $title_url, string $chapter) : array; |
| 41 | 41 | |
| 42 | - abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array; |
|
| 42 | + abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array; |
|
| 43 | 43 | |
| 44 | 44 | final public function isValidTitleURL(string $title_url) : bool { |
| 45 | 45 | $success = (bool) preg_match($this->titleFormat, $title_url); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | final protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = "", bool $follow_redirect = FALSE, bool $isPost = FALSE, array $postFields = []) { |
| 56 | 56 | $ch = curl_init(); |
| 57 | 57 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 58 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
| 58 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
| 59 | 59 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
| 60 | 60 | curl_setopt($ch, CURLOPT_HEADER, 1); |
| 61 | 61 | |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | curl_setopt($ch, CURLOPT_URL, $url); |
| 74 | 74 | |
| 75 | 75 | if($isPost) { |
| 76 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
| 77 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 76 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
| 77 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $response = curl_exec($ch); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | $dom = new DOMDocument(); |
| 132 | 132 | libxml_use_internal_errors(TRUE); |
| 133 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
| 133 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
| 134 | 134 | libxml_use_internal_errors(FALSE); |
| 135 | 135 | |
| 136 | 136 | $xpath = new DOMXPath($dom); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $nodes_row = $xpath->query($node_row_string); |
| 139 | 139 | if($nodes_title->length === 1 && $nodes_row->length === 1) { |
| 140 | 140 | $firstRow = $nodes_row->item(0); |
| 141 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 141 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 142 | 142 | |
| 143 | 143 | if($node_chapter_string !== '') { |
| 144 | 144 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -266,11 +266,11 @@ discard block |
||
| 266 | 266 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
| 267 | 267 | return [ |
| 268 | 268 | 'url' => "{$this->baseURL}/read/{$title_url}/{$chapter}/", |
| 269 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 269 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 270 | 270 | ]; |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
| 273 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
| 274 | 274 | $titleData = []; |
| 275 | 275 | |
| 276 | 276 | $jsonURL = "{$this->baseURL}/api/reader/comic/stub/{$title_url}/format/json"; |