Skip to content

Commit

Permalink
Upgrade code quality a notch
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Jun 24, 2024
1 parent e18f80a commit 873f4b0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/Saml/ResponseContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
final class ResponseContext implements ResponseContextInterface
{
public function __construct(
private IdentityProvider $hostedIdentityProvider,
private ServiceProviderRepository $serviceProviderRepository,
private StateHandlerInterface $stateHandler
private readonly IdentityProvider $hostedIdentityProvider,
private readonly ServiceProviderRepository $serviceProviderRepository,
private readonly StateHandlerInterface $stateHandler
) {
}

Expand Down
7 changes: 4 additions & 3 deletions src/Service/DateTime/StaticDateTimeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
final class StaticDateTimeService extends AbstractDateTimeService
{

public function __construct(private readonly DateTimeImmutable $dateTime)
{
public function __construct(
private readonly DateTimeImmutable $dateTime
) {
}

public function getCurrent(): \DateTimeImmutable
public function getCurrent(): DateTimeImmutable
{
return $this->dateTime;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Service/ResponseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
final class ResponseService implements ResponseServiceInterface
{
public function __construct(
private IdentityProvider $hostedIdentityProvider,
private ResponseContextInterface $responseContext,
private AssertionSigningServiceInterface $assertionSigningService,
private DateTimeService $dateTimeService
private readonly IdentityProvider $hostedIdentityProvider,
private readonly ResponseContextInterface $responseContext,
private readonly AssertionSigningServiceInterface $assertionSigningService,
private readonly DateTimeService $dateTimeService
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Service/StateBasedAuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
final class StateBasedAuthenticationService implements AuthenticationService
{
public function __construct(
private StateHandlerInterface $stateHandler,
private RouterInterface $router,
private LoggerInterface $logger
private readonly StateHandlerInterface $stateHandler,
private readonly RouterInterface $router,
private readonly LoggerInterface $logger
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Service/StateBasedRegistrationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
final class StateBasedRegistrationService implements RegistrationService
{
public function __construct(
private StateHandlerInterface $stateHandler,
private RouterInterface $router,
private LoggerInterface $logger
private readonly StateHandlerInterface $stateHandler,
private readonly RouterInterface $router,
private readonly LoggerInterface $logger
) {
}

Expand Down
2 changes: 0 additions & 2 deletions src/Service/StateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
use Surfnet\SamlBundle\SAML2\Extensions\GsspUserAttributesChunk;
use Surfnet\SamlBundle\SAML2\ReceivedAuthnRequest;
use TypeError;
use function is_string;
use function sprintf;

/**
* Knows and preserves the integrity of the GSSP application state.
Expand Down

0 comments on commit 873f4b0

Please sign in to comment.