Completed
Push — master ( 02cb70...789965 )
by Angus
04:35
created
application/models/Tracker/Sites/LHTranslation.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  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_\-.]+$/';
5 5
 	public $chapterFormat = '/^[0-9\.]+$/';
6 6
 
7 7
 	public function getFullTitleURL(string $title_url) : string {
8
-		$title_url = str_replace('.','', $title_url);
8
+		$title_url = str_replace('.', '', $title_url);
9 9
 		return "http://lhtranslation.com/{$title_url}";
10 10
 	}
11 11
 
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 		];
18 18
 	}
19 19
 
20
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
20
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
21 21
 		$titleData = [];
22 22
 
23
-		$title_url = str_replace('.','', $title_url);
23
+		$title_url = str_replace('.', '', $title_url);
24 24
 		$fullURL = "http://lhtranslation.com/{$title_url}/feed/";
25 25
 		$content = $this->get_content($fullURL);
26 26
 
27 27
 		$data = $content['body'];
28 28
 		$xml = simplexml_load_string($data) or die("Error: Cannot create object");
29
-		if(((string) $xml->{'channel'}->title) !== 'Comments on: '){
29
+		if(((string) $xml->{'channel'}->title) !== 'Comments on: ') {
30 30
 			if(isset($xml->{'channel'}->item[0])) {
31 31
 				if($title = (string) $xml->{'channel'}->item[0]->category) {
32 32
 					$titleData['title'] = trim($title);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 		$data = $content['body'];
28 28
 		$xml = simplexml_load_string($data) or die("Error: Cannot create object");
29
-		if(((string) $xml->{'channel'}->title) !== 'Comments on: '){
29
+		if(((string) $xml->{'channel'}->title) !== 'Comments on: ') {
30 30
 			if(isset($xml->{'channel'}->item[0])) {
31 31
 				if($title = (string) $xml->{'channel'}->item[0]->category) {
32 32
 					$titleData['title'] = trim($title);
Please login to merge, or discard this patch.