Skip to content

Commit

Permalink
Repair vetting type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Apr 17, 2024
1 parent 4fd7771 commit f48e25b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
9 changes: 9 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ services:
resource: '../src/Surfnet/StepupRa/RaBundle/Controller/*'
tags: [ 'controller.service_arguments' ]

Surfnet\StepupRa\RaBundle\Controller\VettingTypeHintController:
arguments:
- '@logger'
- '@ra.service.institution_listing'
- '@ra.service.profile'
- '@Surfnet\StepupRa\RaBundle\Service\VettingTypeHintService'
- '%locales%'
tags: ['controller.service_arguments']

logger:
alias: 'monolog.logger'
public: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class SearchRecoveryTokensCommand

public ?string $type = null;

public string $status = '';
public ?string $status = '';

public ?string $email = null;

Expand Down
14 changes: 4 additions & 10 deletions src/Surfnet/StepupRa/RaBundle/Command/VettingTypeHintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,19 @@
class VettingTypeHintCommand
{

/**
* @var string
*/
public $identityId;
public string $identityId;

Check failure on line 40 in src/Surfnet/StepupRa/RaBundle/Command/VettingTypeHintCommand.php

View workflow job for this annotation

GitHub Actions / run-qa-tests

Class Surfnet\StepupRa\RaBundle\Command\VettingTypeHintCommand has an uninitialized property $identityId. Give it default value or assign it in the constructor.

/**
* @var string
*/
public $institution;
public string $institution;

Check failure on line 42 in src/Surfnet/StepupRa/RaBundle/Command/VettingTypeHintCommand.php

View workflow job for this annotation

GitHub Actions / run-qa-tests

Class Surfnet\StepupRa\RaBundle\Command\VettingTypeHintCommand has an uninitialized property $institution. Give it default value or assign it in the constructor.

/**
* @var string[]
*/
public $locales;
public array $locales;

Check failure on line 47 in src/Surfnet/StepupRa/RaBundle/Command/VettingTypeHintCommand.php

View workflow job for this annotation

GitHub Actions / run-qa-tests

Class Surfnet\StepupRa\RaBundle\Command\VettingTypeHintCommand has an uninitialized property $locales. Give it default value or assign it in the constructor.

/**
* @var string[]
*/
public $hints = [];
public array $hints = [];

/**
* The translatable hints are set, using the PHP magic setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
private readonly InstitutionListingService $institutionListingService,
private readonly ProfileService $profileService,
private readonly VettingTypeHintService $vettingTypeHintService,
private readonly array $locales,
private readonly array $locales = [],
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ services:
arguments:
- '@Surfnet\StepupRa\RaBundle\Service\RecoveryTokenService'
- '@Knp\Component\Pager\PaginatorInterface'
- '@security.token_storage'
- "@logger"
tags: ['controller.service_arguments']

Expand Down

0 comments on commit f48e25b

Please sign in to comment.