Skip to content

Commit

Permalink
Update OauthMiddleware.php
Browse files Browse the repository at this point in the history
  • Loading branch information
salkhwlani authored Jul 22, 2024
1 parent 4ec78d5 commit 6eb73e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/OauthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function handle($request, Closure $next, string $scope = null)
}

if(!is_null($scope) && !collect(explode(' ', $this->user->getScope()))->contains($scope)){

Check notice on line 47 in src/Http/OauthMiddleware.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Http/OauthMiddleware.php#L47

Expected "if (...) {\n"; found "if(...){\n"

Check notice on line 47 in src/Http/OauthMiddleware.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Http/OauthMiddleware.php#L47

Expected 1 space after IF keyword; 0 found

Check notice on line 47 in src/Http/OauthMiddleware.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Http/OauthMiddleware.php#L47

Operator ! prohibited; use === FALSE instead

Check warning on line 47 in src/Http/OauthMiddleware.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Http/OauthMiddleware.php#L47

The use of function is_null() is discouraged; use strict comparison "=== null" instead.

Check notice on line 47 in src/Http/OauthMiddleware.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Http/OauthMiddleware.php#L47

There must be a single space between the closing parenthesis and the opening brace of a multi-line IF statement; found 0 spaces
abort(401, 'Scope not allowed');
abort(401, 'Unauthorized Access (The scope not allowed)');
}

$exception_at = now()->diffInSeconds($this->user->getExpiredAt());
Expand Down

0 comments on commit 6eb73e6

Please sign in to comment.