Completed
Push — master ( d8893c...f7f53b )
by Angus
02:30
created
application/models/Tracker/Sites/LHTranslation.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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}");
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.