Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon authored and github-actions[bot] committed Apr 22, 2024
1 parent ae0af54 commit c5e1f86
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/EventSubscriber/ApiExceptionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
*/
final class ApiExceptionSubscriber implements EventSubscriberInterface
{

public static function getSubscribedEvents(): array
{
return [
'kernel.exception' => 'onKernelException'
'kernel.exception' => 'onKernelException',
];
}

Expand All @@ -40,7 +39,6 @@ public function onKernelException(ExceptionEvent $event): void
$exception = $event->getThrowable();
$request = $event->getRequest();


if(!$exception instanceof ApiExceptionInterface && !$this->isStudioApiCall($request->getPathInfo())) {
return;
}
Expand All @@ -59,4 +57,4 @@ private function isStudioApiCall(string $path): bool
{
return str_starts_with($path, AbstractApiController::API_PATH);
}
}
}
2 changes: 1 addition & 1 deletion src/Exception/ApiExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ interface ApiExceptionInterface
public function getStatusCode(): int;

public function getMessage(): string;
}
}
1 change: 0 additions & 1 deletion src/Exception/InvalidFilterTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Pimcore\Bundle\StudioApiBundle\Exception;


use Symfony\Component\HttpKernel\Exception\HttpException;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Exception/InvalidQueryTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Pimcore\Bundle\StudioApiBundle\Exception;

use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Exception/InvalidSearchException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Pimcore\Bundle\StudioApiBundle\Exception;

use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;

final class InvalidSearchException extends HttpException implements ApiExceptionInterface
Expand Down
1 change: 1 addition & 0 deletions src/Service/SecurityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
final readonly class SecurityService implements SecurityServiceInterface
{
private const STATUS_CODE = 401;

private const MESSAGE = 'Bad credentials';

public function __construct(
Expand Down

0 comments on commit c5e1f86

Please sign in to comment.