@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | [ |
| 60 | 60 | 'users_id' => $userId, |
| 61 | 61 | 'videos_id' => $videoId, |
| 62 | - 'categories' => ! empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 62 | + 'categories' => !empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 63 | 63 | 'created_at' => now(), |
| 64 | 64 | 'updated_at' => now(), |
| 65 | 65 | ] |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public static function updateShow($users_id, $videos_id, array $catID = []): void |
| 129 | 129 | { |
| 130 | - self::query()->where(compact('users_id', 'videos_id'))->update(['categories' => ! empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 130 | + self::query()->where(compact('users_id', 'videos_id'))->update(['categories' => !empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | public static function delCartByGuid($guids, $userID) |
| 84 | 84 | { |
| 85 | - if (! \is_array($guids)) { |
|
| 85 | + if (!\is_array($guids)) { |
|
| 86 | 86 | return false; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -486,15 +486,15 @@ discard block |
||
| 486 | 486 | public static function getForMenu(array $excludedCats = []): array |
| 487 | 487 | { |
| 488 | 488 | $categoriesResult = []; |
| 489 | - $categoriesArray = RootCategory::query()->with(['categories' => function ($query) use ($excludedCats) { |
|
| 490 | - if (! empty($excludedCats)) { |
|
| 489 | + $categoriesArray = RootCategory::query()->with(['categories' => function($query) use ($excludedCats) { |
|
| 490 | + if (!empty($excludedCats)) { |
|
| 491 | 491 | $query->whereNotIn('id', $excludedCats); |
| 492 | 492 | } |
| 493 | 493 | $query->select(['id', 'title', 'root_categories_id', 'description']); |
| 494 | 494 | }])->select(['id', 'title'])->get()->toArray(); |
| 495 | 495 | |
| 496 | 496 | foreach ($categoriesArray as $category) { |
| 497 | - if (! empty($category['categories'])) { |
|
| 497 | + if (!empty($category['categories'])) { |
|
| 498 | 498 | $categoriesResult[] = $category; |
| 499 | 499 | } |
| 500 | 500 | } |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | $sql->where('status', '=', self::STATUS_ACTIVE); |
| 553 | 553 | } |
| 554 | 554 | |
| 555 | - if (! empty($excludedCats)) { |
|
| 555 | + if (!empty($excludedCats)) { |
|
| 556 | 556 | $sql->whereNotIn('id', $excludedCats); |
| 557 | 557 | } |
| 558 | 558 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'rate_limit' => $rateLimit, |
| 33 | 33 | ] |
| 34 | 34 | ); |
| 35 | - if (! empty(config('mail.from.address') && File::isFile(base_path().'/_install/install.lock'))) { |
|
| 35 | + if (!empty(config('mail.from.address') && File::isFile(base_path().'/_install/install.lock'))) { |
|
| 36 | 36 | SendNewRegisteredAccountMail::dispatch($user)->onQueue('newreg'); |
| 37 | 37 | SendWelcomeEmail::dispatch($user)->onQueue('welcomeemails'); |
| 38 | 38 | UserVerification::generate($user); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function register(): void |
| 32 | 32 | { |
| 33 | - $this->reportable(function (Throwable $e) { |
|
| 33 | + $this->reportable(function(Throwable $e) { |
|
| 34 | 34 | if (app()->bound('sentry')) { |
| 35 | 35 | app('sentry')->captureException($e); |
| 36 | 36 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $this->hideSensitiveRequestDetails(); |
| 20 | 20 | |
| 21 | - Telescope::filter(function (IncomingEntry $entry) { |
|
| 21 | + Telescope::filter(function(IncomingEntry $entry) { |
|
| 22 | 22 | if ($this->app->isLocal() || config('telescope.full_enabled_in_production') === true) { |
| 23 | 23 | return true; |
| 24 | 24 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | protected function gate(): void |
| 57 | 57 | { |
| 58 | - Gate::define('viewTelescope', function ($user) { |
|
| 58 | + Gate::define('viewTelescope', function($user) { |
|
| 59 | 59 | return in_array($user->email, [ |
| 60 | 60 | config('nntmux.admin_email'), |
| 61 | 61 | ], true); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | protected function gate(): void |
| 29 | 29 | { |
| 30 | - Gate::define('viewHorizon', function ($user) { |
|
| 30 | + Gate::define('viewHorizon', function($user) { |
|
| 31 | 31 | return in_array($user->email, [ |
| 32 | 32 | config('nntmux.admin_email'), |
| 33 | 33 | ], true); |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | for ($chr = 0; $chr < $encodedLength; $chr++) { |
| 59 | 59 | $decoded .= ( |
| 60 | 60 | $encoded[$chr] === '=' ? |
| 61 | - \chr((\ord($encoded[$chr]) - 42) % 256) : |
|
| 62 | - \chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256) |
|
| 61 | + \chr((\ord($encoded[$chr]) - 42) % 256) : \chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256) |
|
| 63 | 62 | ); |
| 64 | 63 | } |
| 65 | 64 | |
@@ -113,8 +112,7 @@ discard block |
||
| 113 | 112 | for ($chr = 0; $chr < $length; $chr++) { |
| 114 | 113 | $text .= ( |
| 115 | 114 | $input[$chr] === '=' ? |
| 116 | - \chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) : |
|
| 117 | - \chr((\ord($input[$chr]) - 42) % 256) |
|
| 115 | + \chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) : \chr((\ord($input[$chr]) - 42) % 256) |
|
| 118 | 116 | ); |
| 119 | 117 | } |
| 120 | 118 | } |
@@ -9,13 +9,13 @@ |
||
| 9 | 9 | { |
| 10 | 10 | protected function canPassWithoutCheckingOTP(): bool |
| 11 | 11 | { |
| 12 | - if (! $this->getUser()->passwordSecurity) { |
|
| 12 | + if (!$this->getUser()->passwordSecurity) { |
|
| 13 | 13 | return true; |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | return |
| 17 | - ! $this->getUser()->passwordSecurity->google2fa_enable || |
|
| 18 | - ! $this->isEnabled() || |
|
| 17 | + !$this->getUser()->passwordSecurity->google2fa_enable || |
|
| 18 | + !$this->isEnabled() || |
|
| 19 | 19 | $this->noUserIsAuthenticated() || |
| 20 | 20 | $this->twoFactorAuthStillValid(); |
| 21 | 21 | } |