Completed
Push — master ( 551eca...962f7f )
by Angus
02:37
created
application/models/Tracker/Sites/WebToons.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 WebToons extends Base_Site_Model {
4 4
 	/* Webtoons.com has a very weird and pointless URL format.
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		];
35 35
 	}
36 36
 
37
-	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array {
37
+	public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array {
38 38
 		$titleData = [];
39 39
 
40 40
 		//FIXME: We don't use parseTitleDOM here due to using rss. Should probably have an alternate method for XML parsing.
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 					$titleData['title'] = trim((string) $xml->{'channel'}->title);
53 53
 
54 54
 					$chapterURLSegments = explode('/', ((string) $xml->{'channel'}->item[0]->link));
55
-					$titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]) . ':--:' . $chapterURLSegments[6];
56
-					$titleData['last_updated'] =  date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate));
55
+					$titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]).':--:'.$chapterURLSegments[6];
56
+					$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate));
57 57
 
58 58
 					if($firstGet) {
59 59
 						$titleData = array_merge($titleData, $this->doCustomFollow($content['body'], ['id' => $title_parts[0]]));
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@
 block discarded – undo
45 45
 
46 46
 		$content = $this->get_content($fullURL);
47 47
 		$data = $content['body'];
48
-		if($data !== 'Can\'t find the manga series.') { //FIXME: We should check for he proper error here.
48
+		if($data !== 'Can\'t find the manga series.') {
49
+//FIXME: We should check for he proper error here.
49 50
 			$xml = simplexml_load_string($data);
50 51
 			if($xml) {
51 52
 				if(isset($xml->{'channel'}->item[0])) {
Please login to merge, or discard this patch.
application/config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 //TEMP
79 79
 $route['user/dashboard_beta'] = 'User/DashboardBeta';
80 80
 
81
-$route['api/internal/get_list']                                                  = 'API/Internal/GetList';
81
+$route['api/internal/get_list'] = 'API/Internal/GetList';
82 82
 $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1';
83 83
 
84 84
 $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited
Please login to merge, or discard this patch.