@@ -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,14 +147,14 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | -if (! function_exists('color')) { |
|
| 150 | +if (!function_exists('color')) { |
|
| 151 | 151 | function color(string $string = ''): Color |
| 152 | 152 | { |
| 153 | 153 | return new Color($string); |
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | -if (! function_exists('human_filesize')) { |
|
| 157 | +if (!function_exists('human_filesize')) { |
|
| 158 | 158 | /** |
| 159 | 159 | * @param int $decimals |
| 160 | 160 | */ |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | -if (! function_exists('bcdechex')) { |
|
| 170 | +if (!function_exists('bcdechex')) { |
|
| 171 | 171 | /** |
| 172 | 172 | * @return string |
| 173 | 173 | */ |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | -if (! function_exists('runCmd')) { |
|
| 187 | +if (!function_exists('runCmd')) { |
|
| 188 | 188 | /** |
| 189 | 189 | * Run CLI command. |
| 190 | 190 | * |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | -if (! function_exists('escapeString')) { |
|
| 215 | +if (!function_exists('escapeString')) { |
|
| 216 | 216 | /** |
| 217 | 217 | * @return string |
| 218 | 218 | */ |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | -if (! function_exists('realDuration')) { |
|
| 225 | +if (!function_exists('realDuration')) { |
|
| 226 | 226 | /** |
| 227 | 227 | * @return string |
| 228 | 228 | */ |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | -if (! function_exists('is_it_json')) { |
|
| 237 | +if (!function_exists('is_it_json')) { |
|
| 238 | 238 | /** |
| 239 | 239 | * @param array|string $isIt |
| 240 | 240 | * @return bool |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | return $zipped; |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | -if (! function_exists('release_flag')) { |
|
| 280 | +if (!function_exists('release_flag')) { |
|
| 281 | 281 | // Function inspired by c0r3@newznabforums adds country flags on the browse page. |
| 282 | 282 | /** |
| 283 | 283 | * @param string $text Text to match against. |
@@ -413,10 +413,10 @@ discard block |
||
| 413 | 413 | |
| 414 | 414 | return ''; |
| 415 | 415 | } |
| 416 | - if (! function_exists('sanitize')) { |
|
| 416 | + if (!function_exists('sanitize')) { |
|
| 417 | 417 | function sanitize(array|string $phrases, array $doNotSanitize = []): string |
| 418 | 418 | { |
| 419 | - if (! is_array($phrases)) { |
|
| 419 | + if (!is_array($phrases)) { |
|
| 420 | 420 | $wordArray = explode(' ', str_replace('.', ' ', $phrases)); |
| 421 | 421 | } else { |
| 422 | 422 | $wordArray = $phrases; |
@@ -427,9 +427,9 @@ discard block |
||
| 427 | 427 | foreach ($wordArray as $words) { |
| 428 | 428 | $words = preg_split('/\s+/', $words); |
| 429 | 429 | foreach ($words as $st) { |
| 430 | - if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 430 | + if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 431 | 431 | $str = $st; |
| 432 | - } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 432 | + } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) { |
|
| 433 | 433 | $str = $st; |
| 434 | 434 | } else { |
| 435 | 435 | $str = Sanitizer::escape($st, $doNotSanitize); |