@@ -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 LHTranslation 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 = "http://lhtranslation.com/{$title_url}/feed/"; |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | $data = $content['body']; |
| 25 | 25 | $xml = simplexml_load_string($data) or die("Error: Cannot create object"); |
| 26 | - if(((string) $xml->{'channel'}->title) !== 'Comments on: '){ |
|
| 26 | + if(((string) $xml->{'channel'}->title) !== 'Comments on: ') { |
|
| 27 | 27 | if(isset($xml->{'channel'}->item[0])) { |
| 28 | 28 | $titleData['title'] = trim(substr((string) $xml->{'channel'}->title, 0, -33)); |
| 29 | 29 | |
| 30 | 30 | $titleData['latest_chapter'] = str_replace('-', '.', preg_replace('/^.*?-(?:.*?)chapter-(.*?)\/$/', '$1', (string) $xml->{'channel'}->item[0]->link)); |
| 31 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
| 31 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
| 32 | 32 | } |
| 33 | 33 | } else { |
| 34 | 34 | log_message('error', "Series missing? (LHTranslation): {$title_url}"); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | $data = $content['body']; |
| 25 | 25 | $xml = simplexml_load_string($data) or die("Error: Cannot create object"); |
| 26 | - if(((string) $xml->{'channel'}->title) !== 'Comments on: '){ |
|
| 26 | + if(((string) $xml->{'channel'}->title) !== 'Comments on: ') { |
|
| 27 | 27 | if(isset($xml->{'channel'}->item[0])) { |
| 28 | 28 | $titleData['title'] = trim(substr((string) $xml->{'channel'}->title, 0, -33)); |
| 29 | 29 | |