@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * Order types for xxx page. |
281 | 281 | * |
282 | - * @return array |
|
282 | + * @return string[] |
|
283 | 283 | */ |
284 | 284 | public function getXXXOrdering() |
285 | 285 | { |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | /** |
396 | 396 | * Fetch xxx info for the movie. |
397 | 397 | * |
398 | - * @param $xxxmovie |
|
398 | + * @param string $xxxmovie |
|
399 | 399 | * |
400 | 400 | * @return bool |
401 | 401 | */ |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | /** |
631 | 631 | * Checks xxxinfo to make sure releases exist |
632 | 632 | * |
633 | - * @param $releaseName |
|
633 | + * @param string $releaseName |
|
634 | 634 | * |
635 | 635 | * @return array|bool |
636 | 636 | */ |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $order[1] |
248 | 248 | ); |
249 | 249 | $return = $this->pdo->query($sql, true, NN_CACHE_EXPIRY_MEDIUM); |
250 | - if (!empty($return)){ |
|
250 | + if (!empty($return)) { |
|
251 | 251 | $return[0]['_totalcount'] = (isset($xxxmovies['total']) ? $xxxmovies['total'] : 0); |
252 | 252 | } |
253 | 253 | return $return; |
@@ -330,8 +330,8 @@ discard block |
||
330 | 330 | if (trim($ta) == '') { |
331 | 331 | continue; |
332 | 332 | } |
333 | - if ($field == "genre" ) { |
|
334 | - $ta = $this->getGenres(true,$ta); |
|
333 | + if ($field == "genre") { |
|
334 | + $ta = $this->getGenres(true, $ta); |
|
335 | 335 | $ta = $ta["title"]; |
336 | 336 | } |
337 | 337 | if ($i > 7) { |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | |
411 | 411 | if ($iafd->findme() !== false) { |
412 | 412 | |
413 | - switch($iafd->classUsed) { |
|
413 | + switch ($iafd->classUsed) { |
|
414 | 414 | case "ade": |
415 | 415 | $mov = new ADE(); |
416 | 416 | $mov->directLink = (string)$iafd->directUrl; |
@@ -503,22 +503,22 @@ discard block |
||
503 | 503 | $mov['directurl'] = html_entity_decode($res['directurl'], ENT_QUOTES, 'UTF-8'); |
504 | 504 | $mov['classused'] = $this->whichclass; |
505 | 505 | |
506 | - $check = $this->pdo->queryOneRow(sprintf('SELECT id FROM xxxinfo WHERE title = %s', $this->pdo->escapeString($mov['title']))); |
|
506 | + $check = $this->pdo->queryOneRow(sprintf('SELECT id FROM xxxinfo WHERE title = %s', $this->pdo->escapeString($mov['title']))); |
|
507 | 507 | $xxxID = 0; |
508 | - if(isset($check['id'])){ |
|
508 | + if (isset($check['id'])) { |
|
509 | 509 | $xxxID = $check['id']; |
510 | 510 | } |
511 | 511 | |
512 | - if($check === false || $xxxID > 0){ |
|
512 | + if ($check === false || $xxxID > 0) { |
|
513 | 513 | |
514 | 514 | // Update Current XXX Information - getXXXCovers.php |
515 | - if($xxxID > 0){ |
|
515 | + if ($xxxID > 0) { |
|
516 | 516 | $this->update($check['id'], $mov['title'], $mov['tagline'], $mov['plot'], $mov['genre'], $mov['director'], $mov['actors'], $mov['extras'], $mov['productinfo'], $mov['trailers'], $mov['directurl'], $mov['classused']); |
517 | 517 | $xxxID = $check['id']; |
518 | 518 | } |
519 | 519 | |
520 | 520 | // Insert New XXX Information |
521 | - if($check === false){ |
|
521 | + if ($check === false) { |
|
522 | 522 | $xxxID = $this->pdo->queryInsert( |
523 | 523 | sprintf(" |
524 | 524 | INSERT INTO xxxinfo |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | */ |
637 | 637 | protected function checkXXXInfoExists($releaseName) |
638 | 638 | { |
639 | - return $this->pdo->queryOneRow(sprintf("SELECT id, title FROM xxxinfo WHERE title LIKE %s", "'". $releaseName . "%'")); |
|
639 | + return $this->pdo->queryOneRow(sprintf("SELECT id, title FROM xxxinfo WHERE title LIKE %s", "'" . $releaseName . "%'")); |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | /** |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $name = trim(preg_replace('/(brazilian|chinese|croatian|danish|deutsch|dutch|estonian|flemish|finnish|french|german|greek|hebrew|icelandic|italian|latin|nordic|norwegian|polish|portuguese|japenese|japanese|russian|serbian|slovenian|spanish|spanisch|swedish|thai|turkish)$/i', '', $name)); |
671 | 671 | |
672 | 672 | // Check if the name is long enough and not just numbers and not file (d) of (d) and does not contain Episodes and any dated 00.00.00 which are site rips.. |
673 | - if (strlen($name) > 5 && !preg_match('/^\d+$/', $name) && !preg_match('/( File \d+ of \d+|\d+.\d+.\d+)/',$name) && !preg_match('/(E\d+)/',$name) && !preg_match('/\d\d\.\d\d.\d\d/', $name)) { |
|
673 | + if (strlen($name) > 5 && !preg_match('/^\d+$/', $name) && !preg_match('/( File \d+ of \d+|\d+.\d+.\d+)/', $name) && !preg_match('/(E\d+)/', $name) && !preg_match('/\d\d\.\d\d.\d\d/', $name)) { |
|
674 | 674 | $this->currentTitle = $name; |
675 | 675 | return true; |
676 | 676 | } else { |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | } |
757 | 757 | } |
758 | 758 | |
759 | - $ret = ltrim($ret,","); |
|
759 | + $ret = ltrim($ret, ","); |
|
760 | 760 | return ($ret); |
761 | 761 | } |
762 | 762 | |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | if ($whichclass === "ade") { |
791 | 791 | if (!empty($res)) { |
792 | 792 | $trailers = unserialize($res); |
793 | - $ret .="<object width='360' height='240' type='application/x-shockwave-flash' id='EmpireFlashPlayer' name='EmpireFlashPlayer' data='". $trailers['url'] . "'>"; |
|
793 | + $ret .= "<object width='360' height='240' type='application/x-shockwave-flash' id='EmpireFlashPlayer' name='EmpireFlashPlayer' data='" . $trailers['url'] . "'>"; |
|
794 | 794 | $ret .= "<param name='flashvars' value= 'streamID=" . $trailers['streamid'] . "&autoPlay=false&BaseStreamingUrl=" . $trailers['baseurl'] . "'>"; |
795 | 795 | $ret .= "</object>"; |
796 | 796 | |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | if (!empty($res)) { |
802 | 802 | $trailers = unserialize($res); |
803 | 803 | $ret .= "<embed id='trailer' width='480' height='360'"; |
804 | - $ret .= "flashvars='" . $trailers['flashvars'] . "' allowfullscreen='true' allowscriptaccess='always' quality='high' name='trailer' style='undefined'"; |
|
804 | + $ret .= "flashvars='" . $trailers['flashvars'] . "' allowfullscreen='true' allowscriptaccess='always' quality='high' name='trailer' style='undefined'"; |
|
805 | 805 | $ret .= "src='" . $trailers['baseurl'] . "' type='application/x-shockwave-flash'>"; |
806 | 806 | |
807 | 807 | return ($ret); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $order[1] |
248 | 248 | ); |
249 | 249 | $return = $this->pdo->query($sql, true, NN_CACHE_EXPIRY_MEDIUM); |
250 | - if (!empty($return)){ |
|
250 | + if (!empty($return)) { |
|
251 | 251 | $return[0]['_totalcount'] = (isset($xxxmovies['total']) ? $xxxmovies['total'] : 0); |
252 | 252 | } |
253 | 253 | return $return; |
@@ -364,8 +364,7 @@ discard block |
||
364 | 364 | public function update( |
365 | 365 | $id = '', $title = '', $tagLine = '', $plot = '', $genre = '', $director = '', |
366 | 366 | $actors = '', $extras = '', $productInfo = '', $trailers = '', $directUrl = '', $classUsed = '', $cover = '', $backdrop = '' |
367 | - ) |
|
368 | - { |
|
367 | + ) { |
|
369 | 368 | if (!empty($id)) { |
370 | 369 | |
371 | 370 | $this->pdo->queryExec( |
@@ -505,20 +504,20 @@ discard block |
||
505 | 504 | |
506 | 505 | $check = $this->pdo->queryOneRow(sprintf('SELECT id FROM xxxinfo WHERE title = %s', $this->pdo->escapeString($mov['title']))); |
507 | 506 | $xxxID = 0; |
508 | - if(isset($check['id'])){ |
|
507 | + if(isset($check['id'])) { |
|
509 | 508 | $xxxID = $check['id']; |
510 | 509 | } |
511 | 510 | |
512 | - if($check === false || $xxxID > 0){ |
|
511 | + if($check === false || $xxxID > 0) { |
|
513 | 512 | |
514 | 513 | // Update Current XXX Information - getXXXCovers.php |
515 | - if($xxxID > 0){ |
|
514 | + if($xxxID > 0) { |
|
516 | 515 | $this->update($check['id'], $mov['title'], $mov['tagline'], $mov['plot'], $mov['genre'], $mov['director'], $mov['actors'], $mov['extras'], $mov['productinfo'], $mov['trailers'], $mov['directurl'], $mov['classused']); |
517 | 516 | $xxxID = $check['id']; |
518 | 517 | } |
519 | 518 | |
520 | 519 | // Insert New XXX Information |
521 | - if($check === false){ |
|
520 | + if($check === false) { |
|
522 | 521 | $xxxID = $this->pdo->queryInsert( |
523 | 522 | sprintf(" |
524 | 523 | INSERT INTO xxxinfo |
@@ -194,7 +194,7 @@ |
||
194 | 194 | $xxxIDs = $releaseIDs = false; |
195 | 195 | |
196 | 196 | if (is_array($xxxmovies['result'])) { |
197 | - foreach ($xxxmovies['result'] AS $xxx => $id) { |
|
197 | + foreach ($xxxmovies['result'] as $xxx => $id) { |
|
198 | 198 | $xxxIDs[] = $id['id']; |
199 | 199 | $releaseIDs[] = $id['grp_release_id']; |
200 | 200 | } |
@@ -61,6 +61,9 @@ |
||
61 | 61 | return $self; |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param string $name |
|
66 | + */ |
|
64 | 67 | public function getOption($name = null) |
65 | 68 | { |
66 | 69 | if ($name === null) { |
@@ -110,8 +110,7 @@ |
||
110 | 110 | { |
111 | 111 | $status = opcache_get_status(); |
112 | 112 | $config = opcache_get_configuration(); |
113 | - $memsize = function($size, $precision = 3, $space = false) |
|
114 | - { |
|
113 | + $memsize = function($size, $precision = 3, $space = false) { |
|
115 | 114 | $i = 0; |
116 | 115 | $val = array(' bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
117 | 116 | while (($size / 1024) > 1) { |
@@ -167,6 +167,10 @@ |
||
167 | 167 | } |
168 | 168 | return $_html_result; |
169 | 169 | } |
170 | +/** |
|
171 | + * @param string|null $id |
|
172 | + * @param integer $idx |
|
173 | + */ |
|
170 | 174 | function smarty_function_html_options_multiple_optgroup($key, $values, $selected, $id, $class, &$idx) |
171 | 175 | { |
172 | 176 | $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n"; |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | case 'name': |
54 | 54 | case 'class': |
55 | 55 | case 'id': |
56 | - $$_key = (string) $_val; |
|
56 | + $$_key = (string)$_val; |
|
57 | 57 | break; |
58 | 58 | case 'options': |
59 | - $options = (array) $_val; |
|
59 | + $options = (array)$_val; |
|
60 | 60 | break; |
61 | 61 | case 'values': |
62 | 62 | case 'output': |
63 | - $$_key = array_values((array) $_val); |
|
63 | + $$_key = array_values((array)$_val); |
|
64 | 64 | break; |
65 | 65 | case 'selected': |
66 | 66 | if (is_array($_val)) { |
@@ -68,24 +68,24 @@ discard block |
||
68 | 68 | foreach ($_val as $_sel) { |
69 | 69 | if (is_object($_sel)) { |
70 | 70 | if (method_exists($_sel, "__toString")) { |
71 | - $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); |
|
71 | + $_sel = smarty_function_escape_special_chars((string)$_sel->__toString()); |
|
72 | 72 | } else { |
73 | - trigger_error("html_options_multiple: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE); |
|
73 | + trigger_error("html_options_multiple: selected attribute contains an object of class '" . get_class($_sel) . "' without __toString() method", E_USER_NOTICE); |
|
74 | 74 | continue; |
75 | 75 | } |
76 | 76 | } else { |
77 | - $_sel = smarty_function_escape_special_chars((string) $_sel); |
|
77 | + $_sel = smarty_function_escape_special_chars((string)$_sel); |
|
78 | 78 | } |
79 | 79 | $selected[$_sel] = true; |
80 | 80 | } |
81 | 81 | } elseif (is_object($_val)) { |
82 | 82 | if (method_exists($_val, "__toString")) { |
83 | - $selected = smarty_function_escape_special_chars((string) $_val->__toString()); |
|
83 | + $selected = smarty_function_escape_special_chars((string)$_val->__toString()); |
|
84 | 84 | } else { |
85 | - trigger_error("html_options_multiple: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE); |
|
85 | + trigger_error("html_options_multiple: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE); |
|
86 | 86 | } |
87 | 87 | } else { |
88 | - $selected = smarty_function_escape_special_chars((string) $_val); |
|
88 | + $selected = smarty_function_escape_special_chars((string)$_val); |
|
89 | 89 | } |
90 | 90 | break; |
91 | 91 | case 'strict': break; |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | } |
128 | 128 | } |
129 | 129 | if (!empty($name)) { |
130 | - $_html_class = !empty($class) ? ' class="'.$class.'"' : ''; |
|
131 | - $_html_id = !empty($id) ? ' id="'.$id.'"' : ''; |
|
130 | + $_html_class = !empty($class) ? ' class="' . $class . '"' : ''; |
|
131 | + $_html_id = !empty($id) ? ' id="' . $id . '"' : ''; |
|
132 | 132 | // the name needs to have [] added (this is html text [] not PHP, so that the return for the multiselect is an array |
133 | 133 | $_html_result = '<select multiple="multiple" name="' . $name . '[]"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result . '</select>' . "\n"; |
134 | 134 | } |
@@ -146,23 +146,23 @@ discard block |
||
146 | 146 | } elseif ($_key === $selected) { |
147 | 147 | $_html_result .= ' selected="selected"'; |
148 | 148 | } |
149 | - $_html_class = !empty($class) ? ' class="'.$class.' option"' : ''; |
|
150 | - $_html_id = !empty($id) ? ' id="'.$id.'-'.$idx.'"' : ''; |
|
149 | + $_html_class = !empty($class) ? ' class="' . $class . ' option"' : ''; |
|
150 | + $_html_id = !empty($id) ? ' id="' . $id . '-' . $idx . '"' : ''; |
|
151 | 151 | if (is_object($value)) { |
152 | 152 | if (method_exists($value, "__toString")) { |
153 | - $value = smarty_function_escape_special_chars((string) $value->__toString()); |
|
153 | + $value = smarty_function_escape_special_chars((string)$value->__toString()); |
|
154 | 154 | } else { |
155 | - trigger_error("html_options_multiple: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE); |
|
155 | + trigger_error("html_options_multiple: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE); |
|
156 | 156 | return ''; |
157 | 157 | } |
158 | 158 | } else { |
159 | - $value = smarty_function_escape_special_chars((string) $value); |
|
159 | + $value = smarty_function_escape_special_chars((string)$value); |
|
160 | 160 | } |
161 | 161 | $_html_result .= $_html_class . $_html_id . '>' . $value . '</option>' . "\n"; |
162 | 162 | $idx++; |
163 | 163 | } else { |
164 | 164 | $_idx = 0; |
165 | - $_html_result = smarty_function_html_options_multiple_optgroup($key, $value, $selected, !empty($id) ? ($id.'-'.$idx) : null, $class, $_idx); |
|
165 | + $_html_result = smarty_function_html_options_multiple_optgroup($key, $value, $selected, !empty($id) ? ($id . '-' . $idx) : null, $class, $_idx); |
|
166 | 166 | $idx++; |
167 | 167 | } |
168 | 168 | return $_html_result; |
@@ -1026,8 +1026,8 @@ |
||
1026 | 1026 | |
1027 | 1027 | public function isXxxClipSD() |
1028 | 1028 | { |
1029 | - switch(true) { |
|
1030 | - case $this->checkPoster( '/oz@lot[.]com/i', $this->poster, Category::XXX_CLIPSD): |
|
1029 | + switch (true) { |
|
1030 | + case $this->checkPoster('/oz@lot[.]com/i', $this->poster, Category::XXX_CLIPSD): |
|
1031 | 1031 | return true; |
1032 | 1032 | case preg_match('/SDPORN/i', $this->releaseName): |
1033 | 1033 | $this->tmpCat = Category::XXX_CLIPSD; |
@@ -106,8 +106,8 @@ |
||
106 | 106 | public function __construct(array $options = []) |
107 | 107 | { |
108 | 108 | $defaults = [ |
109 | - 'Browser' => false, // Was this started from the browser? |
|
110 | - 'Echo' => true, // Echo to CLI? |
|
109 | + 'Browser' => false, // Was this started from the browser? |
|
110 | + 'Echo' => true, // Echo to CLI? |
|
111 | 111 | 'Binaries' => null, |
112 | 112 | 'Categorize' => null, |
113 | 113 | 'NZB' => null, |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Settings key literals |
62 | 62 | */ |
63 | - const RECAPTCHA_SETTING_SITEKEY = 'recaptchapublickey'; |
|
64 | - const RECAPTCHA_SETTING_SECRETKEY = 'recaptchaprivatekey'; |
|
63 | + const RECAPTCHA_SETTING_SITEKEY = 'recaptchapublickey'; |
|
64 | + const RECAPTCHA_SETTING_SECRETKEY = 'recaptchaprivatekey'; |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Construct and decide whether to show the captcha or not. |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $rc_error = 'ReCaptcha Failed: '; |
151 | 151 | |
152 | 152 | foreach ($codes as $c) { |
153 | - switch($c) { |
|
153 | + switch ($c) { |
|
154 | 154 | case self::RECAPTCHA_ERROR_MISSING_SECRET: |
155 | 155 | $rc_error .= 'Missing Secret Key'; |
156 | 156 | break; |
@@ -3,7 +3,8 @@ discard block |
||
3 | 3 | |
4 | 4 | use ReCaptcha\ReCaptcha; |
5 | 5 | |
6 | -class Captcha { |
|
6 | +class Captcha |
|
7 | +{ |
|
7 | 8 | /** |
8 | 9 | * Smarty $page |
9 | 10 | * |
@@ -69,7 +70,8 @@ discard block |
||
69 | 70 | * @note Passing $page by reference to setup smarty vars easily. |
70 | 71 | * @param \Page $page |
71 | 72 | */ |
72 | - public function __construct(&$page) { |
|
73 | + public function __construct(&$page) |
|
74 | + { |
|
73 | 75 | if (!$page instanceof \Page) { |
74 | 76 | throw new \InvalidArgumentException('Invalid Page variable provided'); |
75 | 77 | } |
@@ -99,7 +101,8 @@ discard block |
||
99 | 101 | * |
100 | 102 | * @return bool |
101 | 103 | */ |
102 | - public function shouldDisplay() { |
|
104 | + public function shouldDisplay() |
|
105 | + { |
|
103 | 106 | if ($this->_bootstrapCaptcha()) { |
104 | 107 | return true; |
105 | 108 | } |
@@ -112,7 +115,8 @@ discard block |
||
112 | 115 | * |
113 | 116 | * @return string |
114 | 117 | */ |
115 | - public function getError() { |
|
118 | + public function getError() |
|
119 | + { |
|
116 | 120 | return $this->error; |
117 | 121 | } |
118 | 122 | |
@@ -123,7 +127,8 @@ discard block |
||
123 | 127 | * @param string $ip |
124 | 128 | * @return bool |
125 | 129 | */ |
126 | - public function processCaptcha($response, $ip) { |
|
130 | + public function processCaptcha($response, $ip) |
|
131 | + { |
|
127 | 132 | if (isset($response[self::RECAPTCHA_POSTKEY])) { |
128 | 133 | $post_response = $response[self::RECAPTCHA_POSTKEY]; |
129 | 134 | } else { |
@@ -146,7 +151,8 @@ discard block |
||
146 | 151 | * |
147 | 152 | * @param array $codes |
148 | 153 | */ |
149 | - private function _handleErrors($codes) { |
|
154 | + private function _handleErrors($codes) |
|
155 | + { |
|
150 | 156 | $rc_error = 'ReCaptcha Failed: '; |
151 | 157 | |
152 | 158 | foreach ($codes as $c) { |
@@ -177,7 +183,8 @@ discard block |
||
177 | 183 | * |
178 | 184 | * @return bool |
179 | 185 | */ |
180 | - private function _bootstrapCaptcha() { |
|
186 | + private function _bootstrapCaptcha() |
|
187 | + { |
|
181 | 188 | if ($this->recaptcha instanceof ReCaptcha) { |
182 | 189 | return true; |
183 | 190 | } |
@@ -1213,7 +1213,7 @@ |
||
1213 | 1213 | $aMin = $data['first']; |
1214 | 1214 | $reallyOldArticle = $oldArticle = $articleTime = null; |
1215 | 1215 | |
1216 | - while(true) { |
|
1216 | + while (true) { |
|
1217 | 1217 | // Article exists outside of available range, this shouldn't happen |
1218 | 1218 | if ($wantedArticle <= $data['first'] || $wantedArticle >= $data['last']) { |
1219 | 1219 | break; |
@@ -562,7 +562,7 @@ |
||
562 | 562 | if ($this->_nntp->isError($headers)) { |
563 | 563 | $message = ($headers->code == 0 ? 'Unknown error' : $headers->message); |
564 | 564 | $this->log( |
565 | - "Code {$headers->code}: $message\nSkipping group: {$groupMySQL['name']}", |
|
565 | + "code {$headers->code}: $message\nSkipping group: {$groupMySQL['name']}", |
|
566 | 566 | __FUNCTION__, |
567 | 567 | Logger::LOG_WARNING, |
568 | 568 | 'error' |
@@ -693,7 +693,7 @@ |
||
693 | 693 | && !preg_match('/(\bavi\b|x\.?264|divx|mvk|xvid|install(?!ation)|Setup\.exe|unzip|unrar)/i', $nfo) |
694 | 694 | ) { |
695 | 695 | $artist = preg_split('/(?:a\s?r\s?t\s?i\s?s\s?t\s?s?\b[^ \.\:]*|a\s?u\s?t\s?h\s?o\s?r\s?s?\b[^ \.\:]*) *?(?!(?:[^\s\.\:\}\]\*\x{2500}-\x{3000}\?] ?){2,}?\b)(?:[\*\?\-\=\|\;\:\.\[\}\]\(\s\x{2500}-\x{3000}\?]+?)[\s\.\>\:\(\)\x{2500}-\x{3000}\?]((?!\:) ?\w.+)(?:\n|$|\s{3}|\.{3})/Uuim', $nfo, 0, PREG_SPLIT_DELIM_CAPTURE); |
696 | - if(isset($artist[1])) { |
|
696 | + if (isset($artist[1])) { |
|
697 | 697 | $title = preg_split('/(?:t+\s?i+\s?t+\s?l+\s?e+\b|a\s?l\s?b\s?u\s?m\b|r\s?e\s?l\s?e\s?a\s?s\s?e\b) *?(?!(?:[^\s\.\:\}\]\*\x{2500}-\x{3000}\?] ?){2,}?\b)(?:[\*\?\-\=\|\;\:\.\[\}\]\(\s\x{2500}-\x{3000}\?]+?)[\s\.\>\:\(\)\x{2500}-\x{3000}\?]((?!\:) ?\w.+)(?:\n|$|\s{3}|\.{3})/Uuim', $nfo, 0, PREG_SPLIT_DELIM_CAPTURE); |
698 | 698 | } |
699 | 699 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $totaldetails = count($textarr) - 1; |
137 | 137 | for ($i = 0; $i <= $totaldetails;) { |
138 | 138 | if ($textarr[$i] == "Release Date") { |
139 | - $pregmatchdate = $textarr[$i+1]; |
|
139 | + $pregmatchdate = $textarr[$i + 1]; |
|
140 | 140 | if (preg_match_all('#(?P<day>[0-3]?\d)[^\d]|(?P<month>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)|(?P<year>(19|20)\d{2})#i', |
141 | 141 | $pregmatchdate, |
142 | 142 | $matches)) { |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
154 | - $this->_res['gamedetails'][$textarr[$i]] = $textarr[$i+1]; |
|
155 | - $i = $i+2; |
|
154 | + $this->_res['gamedetails'][$textarr[$i]] = $textarr[$i + 1]; |
|
155 | + $i = $i + 2; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | } |
218 | 218 | if ($this->_ret = $this->_html->find("div.screenshot_holder", 0)) { |
219 | 219 | if ($this->_ret = $this->_ret->find("a", 0)) { |
220 | - if(preg_match('/\?url\=(?<imgurl>.*)/', $this->_ret->href, $matches)){ |
|
220 | + if (preg_match('/\?url\=(?<imgurl>.*)/', $this->_ret->href, $matches)) { |
|
221 | 221 | $this->_res['backdrop'] = trim($matches['imgurl']); |
222 | - }else{ |
|
222 | + } else { |
|
223 | 223 | $this->_res['backdrop'] = trim($this->_ret->href); |
224 | 224 | } |
225 | 225 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | { |
331 | 331 | if (isset($this->cookie)) { |
332 | 332 | $this->extractCookies(file_get_contents($this->cookie)); |
333 | - if($this->_ageCheckSet === false) { |
|
333 | + if ($this->_ageCheckSet === false) { |
|
334 | 334 | $this->_postParams = array( |
335 | 335 | "snr" => "1_agecheck_agecheck__age-gate", |
336 | 336 | "ageDay" => "1", |
@@ -217,9 +217,9 @@ |
||
217 | 217 | } |
218 | 218 | if ($this->_ret = $this->_html->find("div.screenshot_holder", 0)) { |
219 | 219 | if ($this->_ret = $this->_ret->find("a", 0)) { |
220 | - if(preg_match('/\?url\=(?<imgurl>.*)/', $this->_ret->href, $matches)){ |
|
220 | + if(preg_match('/\?url\=(?<imgurl>.*)/', $this->_ret->href, $matches)) { |
|
221 | 221 | $this->_res['backdrop'] = trim($matches['imgurl']); |
222 | - }else{ |
|
222 | + } else { |
|
223 | 223 | $this->_res['backdrop'] = trim($this->_ret->href); |
224 | 224 | } |
225 | 225 |