Completed
Push — master ( 8966a0...8044f9 )
by Angus
05:49
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 = substr((string) $xml->{'channel'}->title, 0, -33)) {
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 = substr((string) $xml->{'channel'}->title, 0, -33)) {
32 32
 					$titleData['title'] = trim($title);
Please login to merge, or discard this patch.
application/models/Tracker/Sites/HatigarmScans.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 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 HatigarmScans extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'http://hatigarmscans.eu/hs';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 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 HatigarmScans extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'http://hatigarmscans.eu/hs';
Please login to merge, or discard this patch.
application/models/Tracker/Sites/CatScans.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 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 CatScans extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://reader.thecatscans.com';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 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 CatScans extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://reader.thecatscans.com';
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_List_Model.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,11 +114,15 @@
 block discarded – undo
114 114
 
115 115
 							if($sortOrder == 'asc') {
116 116
 								$unreadSort = ($a_text <=> $b_text);
117
-								if($unreadSort) return $unreadSort;
117
+								if($unreadSort) {
118
+									return $unreadSort;
119
+								}
118 120
 								return $a_text2 <=> $b_text2;
119 121
 							} else {
120 122
 								$unreadSort = ($a_text <=> $b_text);
121
-								if($unreadSort) return $unreadSort;
123
+								if($unreadSort) {
124
+									return $unreadSort;
125
+								}
122 126
 								return $b_text2 <=> $a_text2;
123 127
 							}
124 128
 						});
Please login to merge, or discard this patch.
_scripts/generate_foolslide.php 1 patch
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		//Replace class names
60 60
 		$baseFile = str_replace('class HelveticaScans', "class {$this->className}", $baseFile);
61
-		$baseFile = str_replace('coversDefaultClass HelveticaScans', "coversDefaultClass {$this->className}", $baseFile);
61
+		$baseFile = str_replace('coversDefaultClass HelveticaScans', "coversdefaultclass {$this->className}", $baseFile);
62 62
 
63 63
 		//Replace tests
64 64
 		$titleList  = $this->getTitles();
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		$baseFile = file_get_contents('./public/userscripts/manga-tracker.user.js');
83 83
 
84 84
 		$parse = parse_url($this->baseURL);
85
-		if(strpos($baseFile, $parse['host']) !== false) die("Domain already exists in userscript?");
85
+		if(strpos($baseFile, $parse['host']) !== FALSE) die("Domain already exists in userscript?");
86 86
 
87 87
 		preg_match('/\@updated      ([0-9\-]+)\r.*?\@version      ([0-9\.]+)/s', $baseFile, $matches);
88 88
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	}),
114 114
 
115 115
 	//Tracking site
116
-EOT;
116
+eot;
117 117
 		$baseFile = str_replace('	//Tracking site', $siteData, $baseFile);
118 118
 
119 119
 		file_put_contents('./public/userscripts/manga-tracker.user.js', $baseFile);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 ## [{$date}]
147 147
 ### Added
148 148
 - Support for {$this->className}.
149
-EOT;
149
+eot;
150 150
 			$changelogFile = str_replace('All notable changes to this project will be documented in this file.', "All notable changes to this project will be documented in this file.\r\n\r\n{$log}", $changelogFile);
151 151
 		}
152 152
 
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 
159 159
 		$ch = curl_init("{$this->baseURL}/api/reader/chapters/orderby/desc_created/format/json");
160 160
 
161
-		curl_setopt($ch, CURLOPT_NOBODY, true);
162
-		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
161
+		curl_setopt($ch, CURLOPT_NOBODY, TRUE);
162
+		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
163 163
 		curl_exec($ch);
164 164
 		$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
165 165
 		curl_close($ch);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		if($content = file_get_contents($jsonURL)) {
174 174
 			$json = json_decode($content, TRUE);
175 175
 			shuffle($json['comics']);
176
-			$comics = array_slice($json['comics'], 0, 5, true);
176
+			$comics = array_slice($json['comics'], 0, 5, TRUE);
177 177
 
178 178
 			foreach($comics as $comic) {
179 179
 				$titleArr[$comic['stub']] = $comic['name'];
Please login to merge, or discard this patch.