@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); |
|
2 | 2 | /** |
3 | 3 | * Name: Auth Lang - English |
4 | 4 | * |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $lang['forgot_password_username_identity_label'] = 'Username'; |
135 | 135 | $lang['forgot_password_email_identity_label'] = 'Email'; |
136 | 136 | $lang['forgot_password_email_not_found'] = 'No record of that email address.'; |
137 | -$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
137 | +$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
138 | 138 | |
139 | 139 | // Reset Password |
140 | 140 | $lang['reset_password_heading'] = 'Change Password'; |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Name: Auth Lang - English |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); |
|
2 | 2 | /** |
3 | 3 | * Name: Auth Lang - English |
4 | 4 | * |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $lang['forgot_password_username_identity_label'] = 'Username'; |
135 | 135 | $lang['forgot_password_email_identity_label'] = 'Email'; |
136 | 136 | $lang['forgot_password_email_not_found'] = 'No record of that email address.'; |
137 | -$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
137 | +$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
138 | 138 | |
139 | 139 | // Reset Password |
140 | 140 | $lang['reset_password_heading'] = 'Change Password'; |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Name: Auth Lang - English |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); |
|
2 | 2 | /** |
3 | 3 | * Name: Auth Lang - English |
4 | 4 | * |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $lang['forgot_password_username_identity_label'] = 'Username'; |
135 | 135 | $lang['forgot_password_email_identity_label'] = 'Email'; |
136 | 136 | $lang['forgot_password_email_not_found'] = 'No record of that email address.'; |
137 | -$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
137 | +$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
138 | 138 | |
139 | 139 | // Reset Password |
140 | 140 | $lang['reset_password_heading'] = 'Change Password'; |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Name: Auth Lang - English |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); |
|
2 | 2 | /** |
3 | 3 | * Name: Auth Lang - English |
4 | 4 | * |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $lang['forgot_password_username_identity_label'] = 'Username'; |
135 | 135 | $lang['forgot_password_email_identity_label'] = 'Email'; |
136 | 136 | $lang['forgot_password_email_not_found'] = 'No record of that email address.'; |
137 | -$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
137 | +$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
138 | 138 | |
139 | 139 | // Reset Password |
140 | 140 | $lang['reset_password_heading'] = 'Change Password'; |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Name: Auth Lang - English |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); |
|
2 | 2 | /** |
3 | 3 | * Name: Auth Lang - English |
4 | 4 | * |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $lang['forgot_password_username_identity_label'] = 'Username'; |
135 | 135 | $lang['forgot_password_email_identity_label'] = 'Email'; |
136 | 136 | $lang['forgot_password_email_not_found'] = 'No record of that email address.'; |
137 | -$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
137 | +$lang['forgot_password_identity_not_found'] = 'No record of that username address.'; |
|
138 | 138 | |
139 | 139 | // Reset Password |
140 | 140 | $lang['reset_password_heading'] = 'Change Password'; |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Name: Auth Lang - English |
4 | 6 | * |
@@ -1,4 +1,4 @@ |
||
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 ChampionScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://reader.championscans.com'; |
@@ -1,4 +1,4 @@ |
||
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 ChampionScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://reader.championscans.com'; |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
4 | 4 | |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | private $className; |
10 | 10 | |
11 | 11 | public function __construct() { |
12 | - if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){ |
|
12 | + if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) { |
|
13 | 13 | $this->baseURL = rtrim($_SERVER['argv'][1], '/'); |
14 | 14 | $this->className = $_SERVER['argv'][2]; |
15 | 15 | |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | |
93 | 93 | //Update @updated |
94 | 94 | $currentDate = date("Y-m-d", time()); |
95 | - $baseFile = str_replace("@updated {$matches[1]}","@updated {$currentDate}", $baseFile); |
|
95 | + $baseFile = str_replace("@updated {$matches[1]}", "@updated {$currentDate}", $baseFile); |
|
96 | 96 | |
97 | 97 | //Update @version |
98 | 98 | $currentVersion = explode('.', $matches[2]); |
99 | - $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1); |
|
100 | - $baseFile = str_replace("@version {$matches[2]}","@version {$newVersion}", $baseFile); |
|
99 | + $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1); |
|
100 | + $baseFile = str_replace("@version {$matches[2]}", "@version {$newVersion}", $baseFile); |
|
101 | 101 | |
102 | 102 | //Add site |
103 | 103 | $siteData = <<<EOT |
@@ -1,6 +1,8 @@ discard block |
||
1 | 1 | <?php declare(strict_types=1); |
2 | 2 | |
3 | -if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
|
3 | +if(!extension_loaded('gd')) { |
|
4 | + die('GD ext is required to run this!'); |
|
5 | +} |
|
4 | 6 | |
5 | 7 | chdir(dirname(__FILE__).'/../'); //Just to make things easier, change dir to project root. |
6 | 8 | |
@@ -9,7 +11,7 @@ discard block |
||
9 | 11 | private $className; |
10 | 12 | |
11 | 13 | public function __construct() { |
12 | - if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){ |
|
14 | + if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) { |
|
13 | 15 | $this->baseURL = rtrim($_SERVER['argv'][1], '/'); |
14 | 16 | $this->className = $_SERVER['argv'][2]; |
15 | 17 | |
@@ -82,7 +84,9 @@ discard block |
||
82 | 84 | $baseFile = file_get_contents('./public/userscripts/manga-tracker.user.js'); |
83 | 85 | |
84 | 86 | $parse = parse_url($this->baseURL); |
85 | - if(strpos($baseFile, $parse['host']) !== false) die("Domain already exists in userscript?"); |
|
87 | + if(strpos($baseFile, $parse['host']) !== false) { |
|
88 | + die("Domain already exists in userscript?"); |
|
89 | + } |
|
86 | 90 | |
87 | 91 | preg_match('/\@updated ([0-9\-]+)\r.*?\@version ([0-9\.]+)/s', $baseFile, $matches); |
88 | 92 | |
@@ -179,7 +183,9 @@ discard block |
||
179 | 183 | } |
180 | 184 | } |
181 | 185 | |
182 | - if(empty($titleArr)) die("API isn't returning any titles?"); |
|
186 | + if(empty($titleArr)) { |
|
187 | + die("API isn't returning any titles?"); |
|
188 | + } |
|
183 | 189 | return $titleArr; |
184 | 190 | } |
185 | 191 | } |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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,7 +158,7 @@ discard block |
||
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); |
|
161 | + curl_setopt($ch, CURLOPT_NOBODY, TRUE); |
|
162 | 162 | curl_exec($ch); |
163 | 163 | $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
164 | 164 | curl_close($ch); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if($content = file_get_contents($jsonURL)) { |
173 | 173 | $json = json_decode($content, TRUE); |
174 | 174 | shuffle($json['comics']); |
175 | - $comics = array_slice($json['comics'], 0, 5, true); |
|
175 | + $comics = array_slice($json['comics'], 0, 5, TRUE); |
|
176 | 176 | |
177 | 177 | foreach($comics as $comic) { |
178 | 178 | $titleArr[$comic['stub']] = $comic['name']; |
@@ -1,4 +1,4 @@ |
||
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 PureMashiroScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://puremashiro.moe/reader'; |
@@ -1,4 +1,4 @@ |
||
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 PureMashiroScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://puremashiro.moe/reader'; |
@@ -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 | /** |
4 | 4 | * Class Tracker_Sites_Model |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * @param bool $firstGet |
101 | 101 | * @return array|null [title,latest_chapter,last_updated,followed?] |
102 | 102 | */ |
103 | - abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array; |
|
103 | + abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array; |
|
104 | 104 | |
105 | 105 | /** |
106 | 106 | * Validates given $title_url against titleFormat. |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | final protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = "", bool $follow_redirect = FALSE, bool $isPost = FALSE, array $postFields = []) { |
146 | 146 | $ch = curl_init(); |
147 | 147 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
148 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
148 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
149 | 149 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
150 | 150 | curl_setopt($ch, CURLOPT_HEADER, 1); |
151 | 151 | |
@@ -163,8 +163,8 @@ discard block |
||
163 | 163 | curl_setopt($ch, CURLOPT_URL, $url); |
164 | 164 | |
165 | 165 | if($isPost) { |
166 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
167 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
166 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
167 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | $response = curl_exec($ch); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | $dom = new DOMDocument(); |
230 | 230 | libxml_use_internal_errors(TRUE); |
231 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
231 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
232 | 232 | libxml_use_internal_errors(FALSE); |
233 | 233 | |
234 | 234 | $xpath = new DOMXPath($dom); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $nodes_row = $xpath->query($node_row_string); |
237 | 237 | if($nodes_title->length === 1 && $nodes_row->length === 1) { |
238 | 238 | $firstRow = $nodes_row->item(0); |
239 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
239 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
240 | 240 | |
241 | 241 | if($node_chapter_string !== '') { |
242 | 242 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -424,11 +424,11 @@ discard block |
||
424 | 424 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
425 | 425 | return [ |
426 | 426 | 'url' => "{$this->baseURL}/read/{$title_url}/{$chapter}/", |
427 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
427 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
428 | 428 | ]; |
429 | 429 | } |
430 | 430 | |
431 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
431 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
432 | 432 | $titleData = []; |
433 | 433 | |
434 | 434 | $jsonURL = "{$this->baseURL}/api/reader/comic/stub/{$title_url}/format/json"; |
@@ -112,7 +112,9 @@ discard block |
||
112 | 112 | */ |
113 | 113 | final public function isValidTitleURL(string $title_url) : bool { |
114 | 114 | $success = (bool) preg_match($this->titleFormat, $title_url); |
115 | - if(!$success) log_message('error', "Invalid Title URL ({$this->site}): {$title_url}"); |
|
115 | + if(!$success) { |
|
116 | + log_message('error', "Invalid Title URL ({$this->site}): {$title_url}"); |
|
117 | + } |
|
116 | 118 | return $success; |
117 | 119 | } |
118 | 120 | |
@@ -126,7 +128,9 @@ discard block |
||
126 | 128 | */ |
127 | 129 | final public function isValidChapter(string $chapter) : bool { |
128 | 130 | $success = (bool) preg_match($this->chapterFormat, $chapter); |
129 | - if(!$success) log_message('error', "Invalid Chapter ({$this->site}): {$chapter}"); |
|
131 | + if(!$success) { |
|
132 | + log_message('error', "Invalid Chapter ({$this->site}): {$chapter}"); |
|
133 | + } |
|
130 | 134 | return $success; |
131 | 135 | } |
132 | 136 | |
@@ -149,10 +153,16 @@ discard block |
||
149 | 153 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
150 | 154 | curl_setopt($ch, CURLOPT_HEADER, 1); |
151 | 155 | |
152 | - if($follow_redirect) curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); |
|
156 | + if($follow_redirect) { |
|
157 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); |
|
158 | + } |
|
153 | 159 | |
154 | - if(!empty($cookie_string)) curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
155 | - if(!empty($cookiejar_path)) curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
160 | + if(!empty($cookie_string)) { |
|
161 | + curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
162 | + } |
|
163 | + if(!empty($cookiejar_path)) { |
|
164 | + curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
165 | + } |
|
156 | 166 | |
157 | 167 | //Some sites check the useragent for stuff, use a pre-defined user-agent to avoid stuff. |
158 | 168 | curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2824.0 Safari/537.36'); |
@@ -362,8 +372,12 @@ discard block |
||
362 | 372 | $status = FALSE; |
363 | 373 | |
364 | 374 | //Make sure we have a volume element |
365 | - if(count($oldChapterSegments) === 1) array_unshift($oldChapterSegments, 'v0'); |
|
366 | - if(count($newChapterSegments) === 1) array_unshift($newChapterSegments, 'v0'); |
|
375 | + if(count($oldChapterSegments) === 1) { |
|
376 | + array_unshift($oldChapterSegments, 'v0'); |
|
377 | + } |
|
378 | + if(count($newChapterSegments) === 1) { |
|
379 | + array_unshift($newChapterSegments, 'v0'); |
|
380 | + } |
|
367 | 381 | |
368 | 382 | $oldCount = count($oldChapterSegments); |
369 | 383 | $newCount = count($newChapterSegments); |
@@ -376,8 +390,12 @@ discard block |
||
376 | 390 | $newVolume = substr(array_shift($newChapterSegments), 1); |
377 | 391 | |
378 | 392 | //Forcing volume to 0 as TBD might not be the latest (although it can be, but that is covered by other checks) |
379 | - if(in_array($oldVolume, ['TBD', 'TBA', 'NA', 'LMT'])) $oldVolume = 0; |
|
380 | - if(in_array($newVolume, ['TBD', 'TBA', 'NA', 'LMT'])) $newVolume = 0; |
|
393 | + if(in_array($oldVolume, ['TBD', 'TBA', 'NA', 'LMT'])) { |
|
394 | + $oldVolume = 0; |
|
395 | + } |
|
396 | + if(in_array($newVolume, ['TBD', 'TBA', 'NA', 'LMT'])) { |
|
397 | + $newVolume = 0; |
|
398 | + } |
|
381 | 399 | |
382 | 400 | $oldVolume = floatval($oldVolume); |
383 | 401 | $newVolume = floatval($newVolume); |
@@ -1,4 +1,4 @@ |
||
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 | /** |
4 | 4 | * Class Tracker_Sites_Model |