Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Sep 13, 2024
1 parent 235d027 commit e583167
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Drivers/Constraints/ExpirationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class ExpirationValidator implements Constraint
*/
public function assert(Token $token): void
{
$diff = ( new DateTimeImmutable('UTC') )->diff($token->claims()->get('exp'));
$diff = (new DateTimeImmutable('UTC'))->diff($token->claims()->get('exp'));
if ('-' == $diff->format('%R')) {
throw new SphinxException(
'Token expired!',
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Drivers/JwtTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function encode(): void
);
self::assertEquals(
0,
( new DateTimeImmutable() )->diff($this->instance->getToken()->claims()->get('iat'))->s
(new DateTimeImmutable())->diff($this->instance->getToken()->claims()->get('iat'))->s
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/Services/SphinxServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,13 @@ public function isNotRefreshToken(): void
public function getCurrentSessionAndGuessSession(): void
{
$user = UserFactory::createNormalUser();
$access = ( new SphinxService() )->generateTokenFor($user)->getAccessToken();
$access = (new SphinxService())->generateTokenFor($user)->getAccessToken();

request()->headers->set('Authorization', "Bearer $access");

self::assertEquals(
$user->sessions()->first()->toArray(),
( new SphinxService() )->getCurrentSession()->toArray()
(new SphinxService())->getCurrentSession()->toArray()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*/
Expand Down

0 comments on commit e583167

Please sign in to comment.