@@ -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 @@ |
||
| 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 | /** |
| 4 | 4 | * Class Tracker_Sites_Model |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param bool $firstGet |
| 101 | 101 | * @return array|null [title,latest_chapter,last_updated,followed?] |
| 102 | 102 | */ |
| 103 | - abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array; |
|
| 103 | + abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array; |
|
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | 106 | * Validates given $title_url against titleFormat. |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | final protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = "", bool $follow_redirect = FALSE, bool $isPost = FALSE, array $postFields = []) { |
| 146 | 146 | $ch = curl_init(); |
| 147 | 147 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 148 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
| 148 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
| 149 | 149 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
| 150 | 150 | curl_setopt($ch, CURLOPT_HEADER, 1); |
| 151 | 151 | |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | curl_setopt($ch, CURLOPT_URL, $url); |
| 164 | 164 | |
| 165 | 165 | if($isPost) { |
| 166 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
| 167 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 166 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
| 167 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | $response = curl_exec($ch); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | $dom = new DOMDocument(); |
| 230 | 230 | libxml_use_internal_errors(TRUE); |
| 231 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
| 231 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
| 232 | 232 | libxml_use_internal_errors(FALSE); |
| 233 | 233 | |
| 234 | 234 | $xpath = new DOMXPath($dom); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | $nodes_row = $xpath->query($node_row_string); |
| 237 | 237 | if($nodes_title->length === 1 && $nodes_row->length === 1) { |
| 238 | 238 | $firstRow = $nodes_row->item(0); |
| 239 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 239 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 240 | 240 | |
| 241 | 241 | if($node_chapter_string !== '') { |
| 242 | 242 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -424,14 +424,14 @@ discard block |
||
| 424 | 424 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
| 425 | 425 | return [ |
| 426 | 426 | 'url' => $this->getChapterURL($title_url, $chapter), |
| 427 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 427 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 428 | 428 | ]; |
| 429 | 429 | } |
| 430 | 430 | public function getChapterURL(string $title_url, string $chapter) : string { |
| 431 | 431 | return "{$this->baseURL}/read/{$title_url}/{$chapter}/"; |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
| 434 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
| 435 | 435 | $titleData = []; |
| 436 | 436 | |
| 437 | 437 | $jsonURL = $this->getJSONTitleURL($title_url); |