@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | use Symfony\Component\Process\Process; |
| 17 | 17 | use Zip as ZipStream; |
| 18 | 18 | |
| 19 | -if (! function_exists('getRawHtml')) { |
|
| 19 | +if (!function_exists('getRawHtml')) { |
|
| 20 | 20 | /** |
| 21 | 21 | * @param bool $cookie |
| 22 | 22 | * @return bool|mixed|string |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -if (! function_exists('makeFieldLinks')) { |
|
| 54 | +if (!function_exists('makeFieldLinks')) { |
|
| 55 | 55 | /** |
| 56 | 56 | * @return string |
| 57 | 57 | * |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | -if (! function_exists('getUserBrowseOrder')) { |
|
| 84 | +if (!function_exists('getUserBrowseOrder')) { |
|
| 85 | 85 | /** |
| 86 | 86 | * @param string $orderBy |
| 87 | 87 | */ |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | -if (! function_exists('getUserBrowseOrdering')) { |
|
| 110 | +if (!function_exists('getUserBrowseOrdering')) { |
|
| 111 | 111 | function getUserBrowseOrdering(): array |
| 112 | 112 | { |
| 113 | 113 | return [ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | -if (! function_exists('getSimilarName')) { |
|
| 140 | +if (!function_exists('getSimilarName')) { |
|
| 141 | 141 | /** |
| 142 | 142 | * @param string $name |
| 143 | 143 | */ |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | -if (! function_exists('color')) { |
|
| 150 | +if (!function_exists('color')) { |
|
| 151 | 151 | /** |
| 152 | 152 | * @param string $string |
| 153 | 153 | */ |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | -if (! function_exists('human_filesize')) { |
|
| 160 | +if (!function_exists('human_filesize')) { |
|
| 161 | 161 | /** |
| 162 | 162 | * @param int $decimals |
| 163 | 163 | */ |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | -if (! function_exists('bcdechex')) { |
|
| 173 | +if (!function_exists('bcdechex')) { |
|
| 174 | 174 | /** |
| 175 | 175 | * @return string |
| 176 | 176 | */ |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | -if (! function_exists('runCmd')) { |
|
| 190 | +if (!function_exists('runCmd')) { |
|
| 191 | 191 | /** |
| 192 | 192 | * Run CLI command. |
| 193 | 193 | * |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | -if (! function_exists('escapeString')) { |
|
| 218 | +if (!function_exists('escapeString')) { |
|
| 219 | 219 | /** |
| 220 | 220 | * @return string |
| 221 | 221 | */ |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | -if (! function_exists('realDuration')) { |
|
| 228 | +if (!function_exists('realDuration')) { |
|
| 229 | 229 | /** |
| 230 | 230 | * @return string |
| 231 | 231 | */ |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | -if (! function_exists('is_it_json')) { |
|
| 240 | +if (!function_exists('is_it_json')) { |
|
| 241 | 241 | /** |
| 242 | 242 | * @param array|string $isIt |
| 243 | 243 | * @return bool |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | return $zipped; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | -if (! function_exists('release_flag')) { |
|
| 283 | +if (!function_exists('release_flag')) { |
|
| 284 | 284 | // Function inspired by c0r3@newznabforums adds country flags on the browse page. |
| 285 | 285 | /** |
| 286 | 286 | * @param string $text Text to match against. |
@@ -416,10 +416,10 @@ discard block |
||
| 416 | 416 | |
| 417 | 417 | return ''; |
| 418 | 418 | } |
| 419 | - if (! function_exists('sanitize')) { |
|
| 419 | + if (!function_exists('sanitize')) { |
|
| 420 | 420 | function sanitize(array|string $phrases, array $doNotSanitize = []): string |
| 421 | 421 | { |
| 422 | - if (! is_array($phrases)) { |
|
| 422 | + if (!is_array($phrases)) { |
|
| 423 | 423 | $wordArray = explode(' ', str_replace('.', ' ', $phrases)); |
| 424 | 424 | } else { |
| 425 | 425 | $wordArray = $phrases; |
@@ -430,9 +430,9 @@ discard block |
||
| 430 | 430 | foreach ($wordArray as $words) { |
| 431 | 431 | $words = preg_split('/\s+/', $words); |
| 432 | 432 | foreach ($words as $st) { |
| 433 | - if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 433 | + if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 434 | 434 | $str = $st; |
| 435 | - } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 435 | + } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 436 | 436 | $str = $st; |
| 437 | 437 | } else { |
| 438 | 438 | $str = Sanitizer::escape($st, $doNotSanitize); |