Ga hier maar eens op kliken! {{ selfServiceUrl }} Bedankt voor het registreren van je token. Je token is bijna klaar voor gebruik. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\n
Neem aub het volgende mee:
\n
\n
Je token
\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
\n
De registratiecode uit deze e-mail
\n
\n\n
\n {{ registrationCode }}\n
\n\n
Service Desk medewerkers die je token kunnen activeren:
\n\n{% if ras is empty %}\n
Er zijn geen Service Desk medewerkers beschikbaar.
Ga hier maar eens op kliken! {{ selfServiceUrl }} Thank you for registering your token, you are almost ready now. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token up.
\n
Please bring the following:
\n
\n
Your token
\n
A valid identity document (passport, drivers license or national ID-card)
\n
The registration code from this e-mail
\n
\n\n
\n {{ registrationCode }}\n
\n\n
Service Desk employees authorized to activate your token:
Ga hier maar eens op kliken! {{ selfServiceUrl }} Bedankt voor het registreren van je token. Je token is bijna klaar voor gebruik. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\n
Neem aub het volgende mee:
\n
\n
Je token
\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
Ga hier maar eens op kliken! {{ selfServiceUrl }} Thank you for registering your token, you are almost ready now. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\n
Please bring the following:
\n
\n
Your token
\n
A valid identity document (passport, drivers license or national ID-card)
Ga hier maar eens op kliken! {{ selfServiceUrl }} Een week geleden heb je een token geregistreerd. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\n
Neem aub het volgende mee:
\n
\n
Je token
\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
\n
De registratiecode uit deze e-mail
\n
\n\n
\n {{ registrationCode }}\n
\n\n
Service Desk medewerkers die je token kunnen activeren:
\n\n{% if ras is empty %}\n
Er zijn geen Service Desk medewerkers beschikbaar.
Ga hier maar eens op kliken! {{ selfServiceUrl }} One week ago, you registered a token. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\n
Please bring the following:
\n
\n
Your token
\n
A valid identity document (passport, drivers license or national ID-card)
\n
The registration code from this e-mail
\n
\n\n
\n {{ registrationCode }}\n
\n\n
Service Desk employees authorized to activate your token:
Ga hier maar eens op kliken! {{ selfServiceUrl }} Een week geleden heb je een token geregistreerd. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\n
Neem aub het volgende mee:
\n
\n
Je token
\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
Ga hier maar eens op kliken! {{ selfServiceUrl }} One week ago, you registered a token. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\n
Please bring the following:
\n
\n
Your token
\n
A valid identity document (passport, drivers license or national ID-card)
Bedankt voor het activeren van je token. Je token is nu klaar voor gebruik. Ga hier maar eens op kliken! {{ selfServiceUrl }}
",
+ "en_GB": "
Dear {{ commonName }},
\n\n
Thank you for activating your token. Your token is now ready for use. Ga hier maar eens op kliken! {{ selfServiceUrl }}
"
+ },
+ "second_factor_revoked": {
+ "nl_NL": "
Beste {{ commonName }},
Ga hier maar eens op kliken! {{ selfServiceUrl }}{% if isRevokedByRa %}De registratie van je {{ tokenType }} token met ID {{ tokenIdentifier }} is verwijderd door een beheerder.{% else %}Je hebt de registratie voor je {{ tokenType }} token met ID {{ tokenIdentifier }} verwijderd. Neem direct contact op met de helpdesk van je instelling als je dit zelf niet gedaan hebt, omdat dit kan betekenen dat je account gecompromitteerd is.{% endif %}
Je kunt dit token niet meer gebruiken om in te loggen bij op SURFconext aangesloten services die een tweede inlogstap vereisen.
Wil je een nieuw token aanvragen? Ga dan naar {{ selfServiceUrl }} en doorloop het registratieproces opnieuw.
Ga hier maar eens op kliken! {{ selfServiceUrl }}{% if isRevokedByRa %}The registration of your {{ tokenType }} with ID {{ tokenIdentifier }} was deleted by an administrator.{% else %}You have deleted the registration of your {{ tokenType }} token with ID {{ tokenIdentifier }}. If you did not delete your token you must immediately contact the support desk of your institution, as this may indicate that your account has been compromised.{% endif %}
You can no longer use this token to access SURFconext services that require two-step authentication.
Do you want to replace your token? Please visit {{ selfServiceUrl }} and register a new token.
Bedankt voor het registreren van je [recovery token]. Je token is nu klaar voor gebruik. Je kunt dit token gebruiken wanneer je een second factor token dat je verloren bent opnieuw wilt activeren.
Met vriendelijke groet,
SURFnet
",
+ "en_GB": "
Dear {{ commonName }},
Thank you for registering your [recovery token]. Your token is ready to use. You can use this token to restore a second factor token that you lost.
Best regards,
SURFnet
"
+ },
+ "recovery_token_revoked": {
+ "nl_NL": "
Beste {{ commonName }},
{% if isRevokedByRa %}De registratie van je {{ tokenType }} recovery token met ID {{ tokenIdentifier }} is verwijderd door een beheerder.{% else %}Je hebt de registratie voor je {{ tokenType }} recovery token met ID {{ tokenIdentifier }} verwijderd. Neem direct contact op met de helpdesk van je instelling als je dit zelf niet gedaan hebt, omdat dit kan betekenen dat je account gecompromitteerd is.{% endif %}
Je kunt dit token niet meer gebruiken om second factor tokens te recoveren.
Met vriendelijke groet,
SURFnet
",
+ "en_GB": "
Dear {{ commonName }},
{% if isRevokedByRa %}The registration of your [recovery token] {{ tokenType }} with ID {{ tokenIdentifier }} was deleted by an administrator.{% else %}You have deleted the registration of your {{ tokenType }} token with ID {{ tokenIdentifier }}. If you did not delete your [recovery token] you must immediately contact the support desk of your institution, as this may indicate that your account has been compromised.{% endif %}
You can no longer use this [recovery token] to restore a lost second factor token.
Ga hier maar eens op kliken! {{ selfServiceUrl }} Bedankt voor het registreren van je token. Je token is bijna klaar voor gebruik. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\\n
Neem aub het volgende mee:
\\n
\\n
Je token
\\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
\\n
De registratiecode uit deze e-mail
\\n
\\n\\n
\\n {{ registrationCode }}\\n
\\n\\n
Service Desk medewerkers die je token kunnen activeren:
\\n\\n{% if ras is empty %}\\n
Er zijn geen Service Desk medewerkers beschikbaar.
Ga hier maar eens op kliken! {{ selfServiceUrl }} Thank you for registering your token, you are almost ready now. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token up.
\\n
Please bring the following:
\\n
\\n
Your token
\\n
A valid identity document (passport, drivers license or national ID-card)
\\n
The registration code from this e-mail
\\n
\\n\\n
\\n {{ registrationCode }}\\n
\\n\\n
Service Desk employees authorized to activate your token:
Ga hier maar eens op kliken! {{ selfServiceUrl }} Bedankt voor het registreren van je token. Je token is bijna klaar voor gebruik. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\\n
Neem aub het volgende mee:
\\n
\\n
Je token
\\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
Ga hier maar eens op kliken! {{ selfServiceUrl }} Thank you for registering your token, you are almost ready now. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\\n
Please bring the following:
\\n
\\n
Your token
\\n
A valid identity document (passport, drivers license or national ID-card)
Ga hier maar eens op kliken! {{ selfServiceUrl }} Een week geleden heb je een token geregistreerd. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\\n
Neem aub het volgende mee:
\\n
\\n
Je token
\\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
\\n
De registratiecode uit deze e-mail
\\n
\\n\\n
\\n {{ registrationCode }}\\n
\\n\\n
Service Desk medewerkers die je token kunnen activeren:
\\n\\n{% if ras is empty %}\\n
Er zijn geen Service Desk medewerkers beschikbaar.
Ga hier maar eens op kliken! {{ selfServiceUrl }} One week ago, you registered a token. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\\n
Please bring the following:
\\n
\\n
Your token
\\n
A valid identity document (passport, drivers license or national ID-card)
\\n
The registration code from this e-mail
\\n
\\n\\n
\\n {{ registrationCode }}\\n
\\n\\n
Service Desk employees authorized to activate your token:
Ga hier maar eens op kliken! {{ selfServiceUrl }} Een week geleden heb je een token geregistreerd. Ga uiterlijk {{ expirationDate|localizeddate('full', 'none', locale) }} naar de Service Desk om je token te laten activeren.
\\n
Neem aub het volgende mee:
\\n
\\n
Je token
\\n
Een geldig legitimatiebewijs (paspoort, rijbewijs of nationale ID-kaart)
Ga hier maar eens op kliken! {{ selfServiceUrl }} One week ago, you registered a token. Please visit the Service Desk no later than {{ expirationDate|localizeddate('full', 'none', locale) }} to activate your token.
\\n
Please bring the following:
\\n
\\n
Your token
\\n
A valid identity document (passport, drivers license or national ID-card)
Ga hier maar eens op kliken! {{ selfServiceUrl }}{% if isRevokedByRa %}De registratie van je {{ tokenType }} token met ID {{ tokenIdentifier }} is verwijderd door een beheerder.{% else %}Je hebt de registratie voor je {{ tokenType }} token met ID {{ tokenIdentifier }} verwijderd. Neem direct contact op met de helpdesk van je instelling als je dit zelf niet gedaan hebt, omdat dit kan betekenen dat je account gecompromitteerd is.{% endif %}
Je kunt dit token niet meer gebruiken om in te loggen bij op SURFconext aangesloten services die een tweede inlogstap vereisen.
Wil je een nieuw token aanvragen? Ga dan naar {{ selfServiceUrl }} en doorloop het registratieproces opnieuw.
Ga hier maar eens op kliken! {{ selfServiceUrl }}{% if isRevokedByRa %}The registration of your {{ tokenType }} with ID {{ tokenIdentifier }} was deleted by an administrator.{% else %}You have deleted the registration of your {{ tokenType }} token with ID {{ tokenIdentifier }}. If you did not delete your token you must immediately contact the support desk of your institution, as this may indicate that your account has been compromised.{% endif %}
You can no longer use this token to access SURFconext services that require two-step authentication.
Do you want to replace your token? Please visit {{ selfServiceUrl }} and register a new token.
Bedankt voor het registreren van je [recovery token]. Je token is nu klaar voor gebruik. Je kunt dit token gebruiken wanneer je een second factor token dat je verloren bent opnieuw wilt activeren.
Met vriendelijke groet,
SURFnet
\",\n \"en_GB\": \"
Dear {{ commonName }},
Thank you for registering your [recovery token]. Your token is ready to use. You can use this token to restore a second factor token that you lost.
{% if isRevokedByRa %}De registratie van je {{ tokenType }} recovery token met ID {{ tokenIdentifier }} is verwijderd door een beheerder.{% else %}Je hebt de registratie voor je {{ tokenType }} recovery token met ID {{ tokenIdentifier }} verwijderd. Neem direct contact op met de helpdesk van je instelling als je dit zelf niet gedaan hebt, omdat dit kan betekenen dat je account gecompromitteerd is.{% endif %}
Je kunt dit token niet meer gebruiken om second factor tokens te recoveren.
Met vriendelijke groet,
SURFnet
\",\n \"en_GB\": \"
Dear {{ commonName }},
{% if isRevokedByRa %}The registration of your [recovery token] {{ tokenType }} with ID {{ tokenIdentifier }} was deleted by an administrator.{% else %}You have deleted the registration of your {{ tokenType }} token with ID {{ tokenIdentifier }}. If you did not delete your [recovery token] you must immediately contact the support desk of your institution, as this may indicate that your account has been compromised.{% endif %}
You can no longer use this [recovery token] to restore a lost second factor token.
Best regards,
SURFnet
\"\n }\n\n },\n \"gateway\": {\n \"identity_providers\": [],\n \"service_providers\": [\n {\n \"entity_id\": \"https://ss-dev.stepup.coin.surf.net/app_dev.php/authentication/metadata\",\n \"public_key\": \"MIIEJTCCAw2gAwIBAgIJANug+o++1X5IMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYDVQQGEwJOTDEQMA4GA1UECAwHVXRyZWNodDEQMA4GA1UEBwwHVXRyZWNodDEVMBMGA1UECgwMU1VSRm5ldCBCLlYuMRMwEQYDVQQLDApTVVJGY29uZXh0MRwwGgYDVQQDDBNTVVJGbmV0IERldmVsb3BtZW50MSswKQYJKoZIhvcNAQkBFhxzdXJmY29uZXh0LWJlaGVlckBzdXJmbmV0Lm5sMB4XDTE0MTAyMDEyMzkxMVoXDTE0MTExOTEyMzkxMVowgagxCzAJBgNVBAYTAk5MMRAwDgYDVQQIDAdVdHJlY2h0MRAwDgYDVQQHDAdVdHJlY2h0MRUwEwYDVQQKDAxTVVJGbmV0IEIuVi4xEzARBgNVBAsMClNVUkZjb25leHQxHDAaBgNVBAMME1NVUkZuZXQgRGV2ZWxvcG1lbnQxKzApBgkqhkiG9w0BCQEWHHN1cmZjb25leHQtYmVoZWVyQHN1cmZuZXQubmwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXuSSBeNJY3d4p060oNRSuAER5nLWT6AIVbv3XrXhcgSwc9m2b8u3ksp14pi8FbaNHAYW3MjlKgnLlopYIylzKD/6Ut/clEx67aO9Hpqsc0HmIP0It6q2bf5yUZ71E4CN2HtQceO5DsEYpe5M7D5i64kS2A7e2NYWVdA5Z01DqUpQGRBc+uMzOwyif6StBiMiLrZH3n2r5q5aVaXU4Vy5EE4VShv3Mp91sgXJj/v155fv0wShgl681v8yf2u2ZMb7NKnQRA4zM2Ng2EUAyy6PQ+Jbn+rALSm1YgiJdVuSlTLhvgwbiHGO2XgBi7bTHhlqSrJFK3Gs4zwIsop/XqQRBAgMBAAGjUDBOMB0GA1UdDgQWBBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAfBgNVHSMEGDAWgBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBd80GpWKjp1J+Dgp0blVAox1s/WPWQlex9xrx1GEYbc5elp3svS+S82s7dFm2llHrrNOBt1HZVC+TdW4f+MR1xq8O5lOYjDRsosxZc/u9jVsYWYc3M9bQAx8VyJ8VGpcAK+fLqRNabYlqTnj/t9bzX8fS90sp8JsALV4g84Aj0G8RpYJokw+pJUmOpuxsZN5U84MmLPnVfmrnuCVh/HkiLNV2c8Pk8LSomg6q1M1dQUTsz/HVxcOhHLj/owwh3IzXf/KXV/E8vSYW8o4WWCAnruYOWdJMI4Z8NG1Mfv7zvb7U3FL1C/KLV04DqzALXGj+LVmxtDvuxqC042apoIDQV\",\n \"acs\": [\n \"https://ss-dev.stepup.coin.surf.net/app_dev.php/authentication/consume-assertion\"\n ], \n \"loa\": {\n \"__default__\": \"https://gw-dev.stepup.coin.surf.net/authentication/loa1\"\n },\n \"assertion_encryption_enabled\": false,\n \"blacklisted_encryption_algorithms\": [],\n \"second_factor_only\": false,\n \"second_factor_only_nameid_patterns\": []\n },\n {\n \"entity_id\": \"https://ss-dev.stepup.coin.surf.net/app_dev.php/registration/gssf/tiqr/metadata\",\n \"public_key\": \"MIIEJTCCAw2gAwIBAgIJANug+o++1X5IMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYDVQQGEwJOTDEQMA4GA1UECAwHVXRyZWNodDEQMA4GA1UEBwwHVXRyZWNodDEVMBMGA1UECgwMU1VSRm5ldCBCLlYuMRMwEQYDVQQLDApTVVJGY29uZXh0MRwwGgYDVQQDDBNTVVJGbmV0IERldmVsb3BtZW50MSswKQYJKoZIhvcNAQkBFhxzdXJmY29uZXh0LWJlaGVlckBzdXJmbmV0Lm5sMB4XDTE0MTAyMDEyMzkxMVoXDTE0MTExOTEyMzkxMVowgagxCzAJBgNVBAYTAk5MMRAwDgYDVQQIDAdVdHJlY2h0MRAwDgYDVQQHDAdVdHJlY2h0MRUwEwYDVQQKDAxTVVJGbmV0IEIuVi4xEzARBgNVBAsMClNVUkZjb25leHQxHDAaBgNVBAMME1NVUkZuZXQgRGV2ZWxvcG1lbnQxKzApBgkqhkiG9w0BCQEWHHN1cmZjb25leHQtYmVoZWVyQHN1cmZuZXQubmwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXuSSBeNJY3d4p060oNRSuAER5nLWT6AIVbv3XrXhcgSwc9m2b8u3ksp14pi8FbaNHAYW3MjlKgnLlopYIylzKD/6Ut/clEx67aO9Hpqsc0HmIP0It6q2bf5yUZ71E4CN2HtQceO5DsEYpe5M7D5i64kS2A7e2NYWVdA5Z01DqUpQGRBc+uMzOwyif6StBiMiLrZH3n2r5q5aVaXU4Vy5EE4VShv3Mp91sgXJj/v155fv0wShgl681v8yf2u2ZMb7NKnQRA4zM2Ng2EUAyy6PQ+Jbn+rALSm1YgiJdVuSlTLhvgwbiHGO2XgBi7bTHhlqSrJFK3Gs4zwIsop/XqQRBAgMBAAGjUDBOMB0GA1UdDgQWBBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAfBgNVHSMEGDAWgBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBd80GpWKjp1J+Dgp0blVAox1s/WPWQlex9xrx1GEYbc5elp3svS+S82s7dFm2llHrrNOBt1HZVC+TdW4f+MR1xq8O5lOYjDRsosxZc/u9jVsYWYc3M9bQAx8VyJ8VGpcAK+fLqRNabYlqTnj/t9bzX8fS90sp8JsALV4g84Aj0G8RpYJokw+pJUmOpuxsZN5U84MmLPnVfmrnuCVh/HkiLNV2c8Pk8LSomg6q1M1dQUTsz/HVxcOhHLj/owwh3IzXf/KXV/E8vSYW8o4WWCAnruYOWdJMI4Z8NG1Mfv7zvb7U3FL1C/KLV04DqzALXGj+LVmxtDvuxqC042apoIDQV\",\n \"acs\": [\n \"https://ss-dev.stepup.coin.surf.net/app_dev.php/registration/gssf/tiqr/consume-assertion\"\n ], \n \"loa\": {\n \"__default__\": \"https://gw-dev.stepup.coin.surf.net/authentication/loa1\"\n },\n \"assertion_encryption_enabled\": false,\n \"blacklisted_encryption_algorithms\": [],\n \"second_factor_only\": false,\n \"second_factor_only_nameid_patterns\": []\n },\n {\n \"entity_id\": \"https://ra-dev.stepup.coin.surf.net/app_dev.php/vetting-procedure/gssf/tiqr/metadata\",\n \"public_key\": \"MIIEJTCCAw2gAwIBAgIJANug+o++1X5IMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYDVQQGEwJOTDEQMA4GA1UECAwHVXRyZWNodDEQMA4GA1UEBwwHVXRyZWNodDEVMBMGA1UECgwMU1VSRm5ldCBCLlYuMRMwEQYDVQQLDApTVVJGY29uZXh0MRwwGgYDVQQDDBNTVVJGbmV0IERldmVsb3BtZW50MSswKQYJKoZIhvcNAQkBFhxzdXJmY29uZXh0LWJlaGVlckBzdXJmbmV0Lm5sMB4XDTE0MTAyMDEyMzkxMVoXDTE0MTExOTEyMzkxMVowgagxCzAJBgNVBAYTAk5MMRAwDgYDVQQIDAdVdHJlY2h0MRAwDgYDVQQHDAdVdHJlY2h0MRUwEwYDVQQKDAxTVVJGbmV0IEIuVi4xEzARBgNVBAsMClNVUkZjb25leHQxHDAaBgNVBAMME1NVUkZuZXQgRGV2ZWxvcG1lbnQxKzApBgkqhkiG9w0BCQEWHHN1cmZjb25leHQtYmVoZWVyQHN1cmZuZXQubmwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXuSSBeNJY3d4p060oNRSuAER5nLWT6AIVbv3XrXhcgSwc9m2b8u3ksp14pi8FbaNHAYW3MjlKgnLlopYIylzKD/6Ut/clEx67aO9Hpqsc0HmIP0It6q2bf5yUZ71E4CN2HtQceO5DsEYpe5M7D5i64kS2A7e2NYWVdA5Z01DqUpQGRBc+uMzOwyif6StBiMiLrZH3n2r5q5aVaXU4Vy5EE4VShv3Mp91sgXJj/v155fv0wShgl681v8yf2u2ZMb7NKnQRA4zM2Ng2EUAyy6PQ+Jbn+rALSm1YgiJdVuSlTLhvgwbiHGO2XgBi7bTHhlqSrJFK3Gs4zwIsop/XqQRBAgMBAAGjUDBOMB0GA1UdDgQWBBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAfBgNVHSMEGDAWgBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBd80GpWKjp1J+Dgp0blVAox1s/WPWQlex9xrx1GEYbc5elp3svS+S82s7dFm2llHrrNOBt1HZVC+TdW4f+MR1xq8O5lOYjDRsosxZc/u9jVsYWYc3M9bQAx8VyJ8VGpcAK+fLqRNabYlqTnj/t9bzX8fS90sp8JsALV4g84Aj0G8RpYJokw+pJUmOpuxsZN5U84MmLPnVfmrnuCVh/HkiLNV2c8Pk8LSomg6q1M1dQUTsz/HVxcOhHLj/owwh3IzXf/KXV/E8vSYW8o4WWCAnruYOWdJMI4Z8NG1Mfv7zvb7U3FL1C/KLV04DqzALXGj+LVmxtDvuxqC042apoIDQV\",\n \"acs\": [\n \"https://ra-dev.stepup.coin.surf.net/app_dev.php/vetting-procedure/gssf/tiqr/verify\"\n ], \n \"loa\": {\n \"__default__\": \"https://gw-dev.stepup.coin.surf.net/authentication/loa1\"\n },\n \"assertion_encryption_enabled\": false,\n \"blacklisted_encryption_algorithms\": [],\n \"second_factor_only\": false,\n \"second_factor_only_nameid_patterns\": []\n },\n {\n \"entity_id\": \"https://ra-dev.stepup.coin.surf.net/app_dev.php/authentication/metadata\",\n \"public_key\": \"MIIEJTCCAw2gAwIBAgIJANug+o++1X5IMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYDVQQGEwJOTDEQMA4GA1UECAwHVXRyZWNodDEQMA4GA1UEBwwHVXRyZWNodDEVMBMGA1UECgwMU1VSRm5ldCBCLlYuMRMwEQYDVQQLDApTVVJGY29uZXh0MRwwGgYDVQQDDBNTVVJGbmV0IERldmVsb3BtZW50MSswKQYJKoZIhvcNAQkBFhxzdXJmY29uZXh0LWJlaGVlckBzdXJmbmV0Lm5sMB4XDTE0MTAyMDEyMzkxMVoXDTE0MTExOTEyMzkxMVowgagxCzAJBgNVBAYTAk5MMRAwDgYDVQQIDAdVdHJlY2h0MRAwDgYDVQQHDAdVdHJlY2h0MRUwEwYDVQQKDAxTVVJGbmV0IEIuVi4xEzARBgNVBAsMClNVUkZjb25leHQxHDAaBgNVBAMME1NVUkZuZXQgRGV2ZWxvcG1lbnQxKzApBgkqhkiG9w0BCQEWHHN1cmZjb25leHQtYmVoZWVyQHN1cmZuZXQubmwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXuSSBeNJY3d4p060oNRSuAER5nLWT6AIVbv3XrXhcgSwc9m2b8u3ksp14pi8FbaNHAYW3MjlKgnLlopYIylzKD/6Ut/clEx67aO9Hpqsc0HmIP0It6q2bf5yUZ71E4CN2HtQceO5DsEYpe5M7D5i64kS2A7e2NYWVdA5Z01DqUpQGRBc+uMzOwyif6StBiMiLrZH3n2r5q5aVaXU4Vy5EE4VShv3Mp91sgXJj/v155fv0wShgl681v8yf2u2ZMb7NKnQRA4zM2Ng2EUAyy6PQ+Jbn+rALSm1YgiJdVuSlTLhvgwbiHGO2XgBi7bTHhlqSrJFK3Gs4zwIsop/XqQRBAgMBAAGjUDBOMB0GA1UdDgQWBBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAfBgNVHSMEGDAWgBQCJmcoa/F7aM3jIFN7Bd4uzWRgzjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBd80GpWKjp1J+Dgp0blVAox1s/WPWQlex9xrx1GEYbc5elp3svS+S82s7dFm2llHrrNOBt1HZVC+TdW4f+MR1xq8O5lOYjDRsosxZc/u9jVsYWYc3M9bQAx8VyJ8VGpcAK+fLqRNabYlqTnj/t9bzX8fS90sp8JsALV4g84Aj0G8RpYJokw+pJUmOpuxsZN5U84MmLPnVfmrnuCVh/HkiLNV2c8Pk8LSomg6q1M1dQUTsz/HVxcOhHLj/owwh3IzXf/KXV/E8vSYW8o4WWCAnruYOWdJMI4Z8NG1Mfv7zvb7U3FL1C/KLV04DqzALXGj+LVmxtDvuxqC042apoIDQV\",\n \"acs\": [\n \"https://ra-dev.stepup.coin.surf.net/app_dev.php/authentication/consume-assertion\"\n ], \n \"loa\": {\n \"__default__\": \"https://gw-dev.stepup.coin.surf.net/authentication/loa3\"\n },\n \"assertion_encryption_enabled\": false,\n \"blacklisted_encryption_algorithms\": [],\n \"second_factor_only\": false,\n \"second_factor_only_nameid_patterns\": []\n }\n ]\n }\n}"
- },
- "url": "http://middleware.stepup.example.com/management/configuration",
- "description": "POST the configuration\n"
- },
- "response": []
- },
- {
- "name": "/management/whitelist",
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "url": "http://middleware.stepup.example.com/management/whitelist",
- "description": "Get whitelist\n"
- },
- "response": []
- },
- {
- "name": "/management/whitelist/add",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"institutions\": [\n \"institution-a.example.com\",\n \"institution-b.example.com\",\n \"institution-c.example.com\",\n \"institution-d.example.com\",\n \"institution-e.example.com\",\n \"institution-f.example.com\",\n \"institution-g.example.com\",\n \"institution-h.example.com\",\n \"institution-i.example.com\",\n \"institution-j.example.com\"\n ]\n}"
- },
- "url": "http://middleware.stepup.example.com/management/whitelist/add",
- "description": "Add institutions to the whitelist"
- },
- "response": []
- },
- {
- "name": "/management/whitelist/remove",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"institutions\": [\n \"miko.organisation.example.commm\"\n ]\n}"
- },
- "url": "http://middleware.stepup.example.com/management/whitelist/remove",
- "description": "Remove an institution from the whitelist"
- },
- "response": []
- },
- {
- "name": "/management/whitelist/replace",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"institutions\": [\n \"dev.organisation.example\",\n \"institution-a.example.com\",\n \"institution-b.example.com\",\n \"institution-c.example.com\",\n \"institution-d.example.com\",\n \"institution-e.example.com\",\n \"institution-f.example.com\",\n \"institution-g.example.com\",\n \"institution-h.example.com\",\n \"institution-i.example.com\",\n \"institution-j.example.com\"\n ]\n}"
- },
- "url": "http://middleware.stepup.example.com/management/whitelist/replace",
- "description": "Replace the Institution Whitelist\n"
- },
- "response": []
- },
- {
- "name": "/management/forget-identity",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"name_id\": \"2592ab2afb52eea9a61f5db90febd631966d49f5\",\n \"institution\": \"Ibuildings\"\n}"
- },
- "url": "http://middleware.stepup.example.com/management/forget-identity",
- "description": "- POST body must contain `name_id` and `institution`"
- },
- "response": []
- },
- {
- "name": "/management/institution-configuration",
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "url": {
- "raw": "http://middleware.stepup.example.com/management/institution-configuration?XDEBUG_SESSION_START=PHPSTORM",
- "protocol": "http",
- "host": [
- "middleware",
- "stepup",
- "example",
- "com"
- ],
- "path": [
- "management",
- "institution-configuration"
- ],
- "query": [
- {
- "key": "XDEBUG_SESSION_START",
- "value": "PHPSTORM"
- }
- ]
- },
- "description": "GET the institution configuration options"
- },
- "response": []
- },
- {
- "name": "/management/institution-configuration",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- },
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"institution-a.example.com\": {\n \"use_ra_locations\": true,\n \"show_raa_contact_information\": true,\n \"verify_email\": false,\n \"self_vet\": true,\n \"number_of_tokens_per_identity\": 2,\n \"allowed_second_factors\": []\n }\n}"
- },
- "url": {
- "raw": "http://middleware.stepup.example.com/management/institution-configuration?XDEBUG_SESSION_START=PHPSTORM",
- "protocol": "http",
- "host": [
- "middleware",
- "stepup",
- "example",
- "com"
- ],
- "path": [
- "management",
- "institution-configuration"
- ],
- "query": [
- {
- "key": "XDEBUG_SESSION_START",
- "value": "PHPSTORM"
- }
- ]
- },
- "description": "POST the institution configuration options to reconfigure\n"
- },
- "response": []
- }
- ],
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- },
- {
- "listen": "test",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- }
- ]
-}
diff --git a/src/Kernel.php b/src/Kernel.php
index 517b77a41..94c750689 100644
--- a/src/Kernel.php
+++ b/src/Kernel.php
@@ -7,8 +7,7 @@
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
-use Symfony\Component\Routing\RouteCollectionBuilder;
-use function dirname;
+use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use const PHP_VERSION_ID;
class Kernel extends BaseKernel
@@ -45,12 +44,12 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
}
- protected function configureRoutes(RouteCollectionBuilder $routes): void
+ protected function configureRoutes(RoutingConfigurator $routes): void
{
- $confDir = $this->getProjectDir() . '/config';
+ $extensions = '{php,yml,yaml}';
- $routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob');
- $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
- $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
+ $routes->import('../config/{routes}/' . $this->environment . "/*.$extensions");
+ $routes->import("../config/{routes}/*.$extensions");
+ $routes->import("../config/{routes}.$extensions");
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
index eb4d2bb4b..3111855a2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
@@ -49,11 +49,13 @@ class ConfiguredInstitutionControllerTest extends WebTestCase
public function setUp(): void
{
+ self::ensureKernelShutdown();
+ $this->client = static::createClient();
+
$this->databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();
// Initialises schema.
$this->databaseTool->loadFixtures([]);
- $this->client = static::createClient();
$passwordSs = $this->client->getKernel()->getContainer()->getParameter('selfservice_api_password');
$passwordRa = $this->client->getKernel()->getContainer()->getParameter('registration_authority_api_password');
From 4d5c91e45387189a0946e6f73c69920fbf9f3ebb Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 29 Feb 2024 15:17:53 +0100
Subject: [PATCH 30/89] Remove .env from Middleware
---
.env | 40 --
.env.test | 4 -
.gitignore | 2 +-
bin/console | 43 +-
ci/qa/phpunit | 2 +-
composer.json | 11 +-
composer.lock | 499 +++---------------
config/bootstrap.php | 44 +-
.../parameters.yaml.dist | 3 +
config/{legacy => packages}/bundles.yaml | 0
config/packages/smoketest/framework.yaml | 2 +-
config/services.yaml | 4 +-
public/apple-touch-icon.png | Bin 4054 -> 0 bytes
public/index.php | 27 +-
symfony.lock | 18 -
15 files changed, 131 insertions(+), 568 deletions(-)
delete mode 100644 .env
delete mode 100644 .env.test
rename config/{legacy => openconext}/parameters.yaml.dist (98%)
rename config/{legacy => packages}/bundles.yaml (100%)
delete mode 100644 public/apple-touch-icon.png
diff --git a/.env b/.env
deleted file mode 100644
index c5d153763..000000000
--- a/.env
+++ /dev/null
@@ -1,40 +0,0 @@
-# In all environments, the following files are loaded if they exist,
-# the latter taking precedence over the former:
-#
-# * .env contains default values for the environment variables needed by the app
-# * .env.local uncommitted file with local overrides
-# * .env.$APP_ENV committed environment-specific defaults
-# * .env.$APP_ENV.local uncommitted environment-specific overrides
-#
-# Real environment variables win over .env files.
-#
-# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
-#
-# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
-# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
-
-###> symfony/framework-bundle ###
-#APP_ENV=dev
-#APP_SECRET=8a978a0a9df7d35ad963ac184f0b1608
-#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
-#TRUSTED_HOSTS='^(localhost|example\.com)$'
-###< symfony/framework-bundle ###
-
-###> doctrine/doctrine-bundle ###
-# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
-# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
-# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
-# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
-#DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7
-###< doctrine/doctrine-bundle ###
-
-###> symfony/mailer ###
-# MAILER_DSN=smtp://localhost
-###< symfony/mailer ###
-
-###> symfony/swiftmailer-bundle ###
-# For Gmail as a transport, use: "gmail://username:password@localhost"
-# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
-# Delivery is disabled by default via "null://localhost"
-MAILER_URL=null://localhost
-###< symfony/swiftmailer-bundle ###
diff --git a/.env.test b/.env.test
deleted file mode 100644
index 24a43c03b..000000000
--- a/.env.test
+++ /dev/null
@@ -1,4 +0,0 @@
-# define your env variables for the test env here
-KERNEL_CLASS='App\Kernel'
-APP_SECRET='$ecretf0rt3st'
-SYMFONY_DEPRECATIONS_HELPER=999999
diff --git a/.gitignore b/.gitignore
index 75d84e335..4a872431a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
/web/app_dev.php
/web/app_test.php
/web/app_dev.php.dist
-/config/legacy/parameters.yaml
+/config/openconext/parameters.yaml
/var/cache/*
/var/logs/*
!var/cache/.gitkeep
diff --git a/bin/console b/bin/console
index 5de0e1c5b..22a216a4c 100755
--- a/bin/console
+++ b/bin/console
@@ -1,42 +1,17 @@
#!/usr/bin/env php
getParameterOption(['--env', '-e'], null, true)) {
- putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
-}
+require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
+require_once dirname(__DIR__).'/config/bootstrap.php';
-if ($input->hasParameterOption('--no-debug', true)) {
- putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
-}
-
-require dirname(__DIR__).'/config/bootstrap.php';
-
-if ($_SERVER['APP_DEBUG']) {
- umask(0000);
-
- if (class_exists(Debug::class)) {
- Debug::enable();
- }
-}
+return function (array $context) {
+ $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
-$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
-$application = new Application($kernel);
-$application->run($input);
+ return new Application($kernel);
+};
diff --git a/ci/qa/phpunit b/ci/qa/phpunit
index 1ba4249d9..60d577c1c 100755
--- a/ci/qa/phpunit
+++ b/ci/qa/phpunit
@@ -9,5 +9,5 @@ cd $(dirname $0)/../../
# PHPUnit Bridge should always be used in Symfony applications. (https://symfony.com/doc/current/components/phpunit_bridge.html)
# This will create a phpunit executable in /bin/ instead of /vendor/bin/
-XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --coverage-text --testsuite=unit --stop-on-error $1
+./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --coverage-text --stop-on-error $1
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --testsuite=database
diff --git a/composer.json b/composer.json
index b03e970c7..29716da48 100644
--- a/composer.json
+++ b/composer.json
@@ -49,6 +49,7 @@
"symfony/mailer": "6.4.*",
"symfony/monolog-bundle": "^v3.9",
"symfony/password-hasher": "6.4.*",
+ "symfony/runtime": "6.4.*",
"symfony/security-bundle": "6.4.*",
"symfony/translation": "6.4.*",
"symfony/twig-bundle": "6.4.*",
@@ -69,7 +70,6 @@
"sebastian/phpcpd": "^6.0",
"squizlabs/php_codesniffer": "^3.7",
"symfony/browser-kit": "6.4.*",
- "symfony/dotenv": "6.4.*",
"symfony/phpunit-bridge": "^6.4",
"symfony/stopwatch": "6.4.*",
"symfony/web-profiler-bundle": "6.4.*"
@@ -131,17 +131,16 @@
"sort-packages": true
},
"extra": {
- "symfony-app-dir": "app",
- "symfony-var-dir": "var",
- "symfony-bin-dir": "bin",
- "symfony-web-dir": "web",
"incenteev-parameters": {
- "file": "config/legacy/parameters.yaml"
+ "file": "config/openconext/parameters.yaml"
},
"symfony": {
"allow-contrib": false,
"require": "6.4.*"
},
+ "runtime": {
+ "disable_dotenv": true
+ },
"src-dir": "src/Surfnet"
}
}
diff --git a/composer.lock b/composer.lock
index f14db44d4..60189991a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ce9db433d4af3c8eab0b1f37bdf28282",
+ "content-hash": "43dd339e8ef5224c6f39f806eacea1d4",
"packages": [
{
"name": "beberlei/assert",
@@ -7108,6 +7108,85 @@
],
"time": "2024-01-30T13:55:02+00:00"
},
+ {
+ "name": "symfony/runtime",
+ "version": "v6.4.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/runtime.git",
+ "reference": "5682281d26366cd3bf0648cec69de0e62cca7fa0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/runtime/zipball/5682281d26366cd3bf0648cec69de0e62cca7fa0",
+ "reference": "5682281d26366cd3bf0648cec69de0e62cca7fa0",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0|^2.0",
+ "php": ">=8.1"
+ },
+ "conflict": {
+ "symfony/dotenv": "<5.4"
+ },
+ "require-dev": {
+ "composer/composer": "^1.0.2|^2.0",
+ "symfony/console": "^5.4.9|^6.0.9|^7.0",
+ "symfony/dotenv": "^5.4|^6.0|^7.0",
+ "symfony/http-foundation": "^5.4|^6.0|^7.0",
+ "symfony/http-kernel": "^5.4|^6.0|^7.0"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Runtime\\": "",
+ "Symfony\\Runtime\\Symfony\\Component\\": "Internal/"
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Enables decoupling PHP applications from global state",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "runtime"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/runtime/tree/v6.4.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-01-23T14:51:35+00:00"
+ },
{
"name": "symfony/security-bundle",
"version": "v6.4.4",
@@ -9123,61 +9202,6 @@
},
"time": "2023-12-10T02:24:34+00:00"
},
- {
- "name": "moontoast/math",
- "version": "1.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/ramsey/moontoast-math.git",
- "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ramsey/moontoast-math/zipball/5f47d34c87767dbcc08b30377a9827df71de91fa",
- "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "phpseclib/bcmath_compat": ">=1.0.3"
- },
- "require-dev": {
- "jakub-onderka/php-parallel-lint": "^0.9.0",
- "phpunit/phpunit": "^4.8 || ^5.5 || ^6.5 || ^7.0",
- "satooshi/php-coveralls": "^0.6.1",
- "squizlabs/php_codesniffer": "^2.3"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Moontoast\\Math\\": "src/Moontoast/Math",
- "Moontoast\\Math\\Exception\\": "src/Moontoast/Math/Exception"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Ben Ramsey",
- "email": "ben@benramsey.com",
- "homepage": "https://benramsey.com"
- }
- ],
- "description": "A mathematics library, providing functionality for large numbers",
- "homepage": "https://github.com/ramsey/moontoast-math",
- "keywords": [
- "bcmath",
- "math"
- ],
- "support": {
- "issues": "https://github.com/ramsey/moontoast-math/issues",
- "source": "https://github.com/ramsey/moontoast-math"
- },
- "abandoned": "brick/math",
- "time": "2020-01-05T04:49:34+00:00"
- },
{
"name": "myclabs/deep-copy",
"version": "1.11.1",
@@ -9327,123 +9351,6 @@
],
"time": "2024-02-06T10:43:30+00:00"
},
- {
- "name": "paragonie/constant_time_encoding",
- "version": "v2.6.3",
- "source": {
- "type": "git",
- "url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938",
- "shasum": ""
- },
- "require": {
- "php": "^7|^8"
- },
- "require-dev": {
- "phpunit/phpunit": "^6|^7|^8|^9",
- "vimeo/psalm": "^1|^2|^3|^4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "ParagonIE\\ConstantTime\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com",
- "role": "Maintainer"
- },
- {
- "name": "Steve 'Sc00bz' Thomas",
- "email": "steve@tobtu.com",
- "homepage": "https://www.tobtu.com",
- "role": "Original Developer"
- }
- ],
- "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
- "keywords": [
- "base16",
- "base32",
- "base32_decode",
- "base32_encode",
- "base64",
- "base64_decode",
- "base64_encode",
- "bin2hex",
- "encoding",
- "hex",
- "hex2bin",
- "rfc4648"
- ],
- "support": {
- "email": "info@paragonie.com",
- "issues": "https://github.com/paragonie/constant_time_encoding/issues",
- "source": "https://github.com/paragonie/constant_time_encoding"
- },
- "time": "2022-06-14T06:56:20+00:00"
- },
- {
- "name": "paragonie/random_compat",
- "version": "v9.99.100",
- "source": {
- "type": "git",
- "url": "https://github.com/paragonie/random_compat.git",
- "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
- "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
- "shasum": ""
- },
- "require": {
- "php": ">= 7"
- },
- "require-dev": {
- "phpunit/phpunit": "4.*|5.*",
- "vimeo/psalm": "^1"
- },
- "suggest": {
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
- },
- "type": "library",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com"
- }
- ],
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
- "keywords": [
- "csprng",
- "polyfill",
- "pseudorandom",
- "random"
- ],
- "support": {
- "email": "info@paragonie.com",
- "issues": "https://github.com/paragonie/random_compat/issues",
- "source": "https://github.com/paragonie/random_compat"
- },
- "time": "2020-10-15T08:29:30+00:00"
- },
{
"name": "pdepend/pdepend",
"version": "2.16.2",
@@ -9701,178 +9608,6 @@
],
"time": "2023-12-11T08:22:20+00:00"
},
- {
- "name": "phpseclib/bcmath_compat",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phpseclib/bcmath_compat.git",
- "reference": "2ffea8bfe1702b4535a7b3c2649c4301968e9a3c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpseclib/bcmath_compat/zipball/2ffea8bfe1702b4535a7b3c2649c4301968e9a3c",
- "reference": "2ffea8bfe1702b4535a7b3c2649c4301968e9a3c",
- "shasum": ""
- },
- "require": {
- "phpseclib/phpseclib": "^3.0"
- },
- "provide": {
- "ext-bcmath": "8.1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
- "squizlabs/php_codesniffer": "^3.0"
- },
- "suggest": {
- "ext-gmp": "Will enable faster math operations"
- },
- "type": "library",
- "autoload": {
- "files": [
- "lib/bcmath.php"
- ],
- "psr-4": {
- "bcmath_compat\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jim Wigginton",
- "email": "terrafrost@php.net",
- "homepage": "http://phpseclib.sourceforge.net"
- }
- ],
- "description": "PHP 5.x-8.x polyfill for bcmath extension",
- "keywords": [
- "BigInteger",
- "bcmath",
- "bigdecimal",
- "math",
- "polyfill"
- ],
- "support": {
- "email": "terrafrost@php.net",
- "issues": "https://github.com/phpseclib/bcmath_compat/issues",
- "source": "https://github.com/phpseclib/bcmath_compat"
- },
- "time": "2021-12-16T02:35:52+00:00"
- },
- {
- "name": "phpseclib/phpseclib",
- "version": "3.0.36",
- "source": {
- "type": "git",
- "url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "c2fb5136162d4be18fdd4da9980696f3aee96d7b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c2fb5136162d4be18fdd4da9980696f3aee96d7b",
- "reference": "c2fb5136162d4be18fdd4da9980696f3aee96d7b",
- "shasum": ""
- },
- "require": {
- "paragonie/constant_time_encoding": "^1|^2",
- "paragonie/random_compat": "^1.4|^2.0|^9.99.99",
- "php": ">=5.6.1"
- },
- "require-dev": {
- "phpunit/phpunit": "*"
- },
- "suggest": {
- "ext-dom": "Install the DOM extension to load XML formatted public keys.",
- "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
- "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
- "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
- "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
- },
- "type": "library",
- "autoload": {
- "files": [
- "phpseclib/bootstrap.php"
- ],
- "psr-4": {
- "phpseclib3\\": "phpseclib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jim Wigginton",
- "email": "terrafrost@php.net",
- "role": "Lead Developer"
- },
- {
- "name": "Patrick Monnerat",
- "email": "pm@datasphere.ch",
- "role": "Developer"
- },
- {
- "name": "Andreas Fischer",
- "email": "bantu@phpbb.com",
- "role": "Developer"
- },
- {
- "name": "Hans-Jürgen Petrich",
- "email": "petrich@tronic-media.com",
- "role": "Developer"
- },
- {
- "name": "Graham Campbell",
- "email": "graham@alt-three.com",
- "role": "Developer"
- }
- ],
- "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
- "homepage": "http://phpseclib.sourceforge.net",
- "keywords": [
- "BigInteger",
- "aes",
- "asn.1",
- "asn1",
- "blowfish",
- "crypto",
- "cryptography",
- "encryption",
- "rsa",
- "security",
- "sftp",
- "signature",
- "signing",
- "ssh",
- "twofish",
- "x.509",
- "x509"
- ],
- "support": {
- "issues": "https://github.com/phpseclib/phpseclib/issues",
- "source": "https://github.com/phpseclib/phpseclib/tree/3.0.36"
- },
- "funding": [
- {
- "url": "https://github.com/terrafrost",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/phpseclib",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
- "type": "tidelift"
- }
- ],
- "time": "2024-02-26T05:13:14+00:00"
- },
{
"name": "phpunit/php-code-coverage",
"version": "9.2.30",
@@ -11536,80 +11271,6 @@
],
"time": "2024-02-07T09:17:57+00:00"
},
- {
- "name": "symfony/dotenv",
- "version": "v6.4.4",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/dotenv.git",
- "reference": "f6f0a3dd102915b4c5bfdf4f4e3139a8cbf477a0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/dotenv/zipball/f6f0a3dd102915b4c5bfdf4f4e3139a8cbf477a0",
- "reference": "f6f0a3dd102915b4c5bfdf4f4e3139a8cbf477a0",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1"
- },
- "conflict": {
- "symfony/console": "<5.4",
- "symfony/process": "<5.4"
- },
- "require-dev": {
- "symfony/console": "^5.4|^6.0|^7.0",
- "symfony/process": "^5.4|^6.0|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Dotenv\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Registers environment variables from a .env file",
- "homepage": "https://symfony.com",
- "keywords": [
- "dotenv",
- "env",
- "environment"
- ],
- "support": {
- "source": "https://github.com/symfony/dotenv/tree/v6.4.4"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-02-08T17:53:17+00:00"
- },
{
"name": "symfony/phpunit-bridge",
"version": "v6.4.4",
diff --git a/config/bootstrap.php b/config/bootstrap.php
index e53d600da..9c7d3a6c0 100644
--- a/config/bootstrap.php
+++ b/config/bootstrap.php
@@ -1,25 +1,29 @@
=1.2)
-//if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
-// (new Dotenv(false))->populate($env);
-//} else {
-// // load all the .env files
-// (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
-//}
-//
-$_SERVER += $_ENV;
-$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
-$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
-$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
+// Test if required parameters are set
+if (0 !== count(array_diff($requiredParameters, array_keys($parameters)))) {
+ throw new RuntimeException(sprintf(
+ 'Required parameters are not configured, required params are: %s, configure them in %s',
+ implode(', ', $requiredParameters),
+ $parametersPath
+ ));
+}
+
+$_SERVER['APP_ENV'] = $parameters['app_env'];
+$_SERVER['APP_DEBUG'] = $parameters['app_debug'];
+$_SERVER['APP_SECRET'] = $parameters['app_secret'];
+
+// Allow the application environment (dev/test/prod) to change via the APP_ENV environment variable.
+if (array_key_exists('APP_ENV', $_ENV)) {
+ $_SERVER['APP_ENV'] = $_ENV['APP_ENV'];
+}
+
+filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
diff --git a/config/legacy/parameters.yaml.dist b/config/openconext/parameters.yaml.dist
similarity index 98%
rename from config/legacy/parameters.yaml.dist
rename to config/openconext/parameters.yaml.dist
index a97c85a72..a54d3723a 100644
--- a/config/legacy/parameters.yaml.dist
+++ b/config/openconext/parameters.yaml.dist
@@ -1,4 +1,7 @@
parameters:
+ app_env: prod
+ app_debug: false
+ app_secret: SeTW1ThY0uR0WnS3cR37
application_name: OpenConext Middleware
# IP addresses of any HTTP proxies that are sitting in front of the application
# See: http://symfony.com/doc/current/request/load_balancer_reverse_proxy.html
diff --git a/config/legacy/bundles.yaml b/config/packages/bundles.yaml
similarity index 100%
rename from config/legacy/bundles.yaml
rename to config/packages/bundles.yaml
diff --git a/config/packages/smoketest/framework.yaml b/config/packages/smoketest/framework.yaml
index 3689f8bad..00dcd315f 100644
--- a/config/packages/smoketest/framework.yaml
+++ b/config/packages/smoketest/framework.yaml
@@ -1,5 +1,5 @@
framework:
- test: ~
+ test: true
profiler:
collect: false
php_errors:
diff --git a/config/services.yaml b/config/services.yaml
index cd536baa6..9aa8ff92f 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -1,7 +1,7 @@
# import legacy parameters.yaml so this could later on be refactored to utilize dotenv support
imports:
- - { resource: 'legacy/bundles.yaml' }
- - { resource: 'legacy/parameters.yaml' }
+ - { resource: 'packages/bundles.yaml' }
+ - { resource: 'openconext/parameters.yaml' }
services:
_defaults:
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
deleted file mode 100644
index 8c0753a4600cb05a0a9fa8484d69d5a3ca933fb4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 4054
zcmcIn`9GB18`f)Ak_v^Q5y~3ImVGB#vc?#~2r-T9vJ)w5g(8M5*$u`nrZ-C?%h-1#
zBh(mMjENcM`}F<~-*Z0qIp=dfKiucJ&UIh+IWH{DjW{{@IT#oiI8BW8tr!?i$^SJr
z7QhqM=hO>KEN-So`V92Hy|A?4N?x*x=e
z$?Qpe2U;dIh5fOTKzR*G=;!064~?W+Gd7i}8Q4paIlGcHwwsS7a_XNrdHWbS*06sZ
zjFBZ(b;xcdSlNBg3&3ft<8yH0VOG{C3NmcCZHXE_95x&PZ1Vrt3h#+2{)|)ux#{Q+
z)*kPXl2jle<8IDLNux=Z%A0hc@+a}W!TM4)%rju
zQ~Ty>{g`m=B%Q^F3H@l!kfN&W(;&ipJFEXFH@8q)k`VDF0SJ39zlnr5#!fHXQY^0f
zuqt+qg|q(V-GLi0uUQ^$dL^Xr+8l^Lsch)ul4k9$j`S+2FR#6*P$bE((C8%5Q@A{w
zMoeMgw|T{>-%}REe$gr`=vkXbn>`GjaOt9Bmh>d&A#09#g4^M+;sY<$^VwyIMbJy;
zN9%U4g4pD47`&Ci%3=e>*yMFs*cu*Qa{Q+^;EuTXo1)uqODnc&^6;9X?V75RYlCg-
z!&I;EyPe`NSgeZ@-^n?f)?4siXdS6c{z+Hfp`|58OmXks
z_UvhzcINX$h5?{|qTrWj>Q~xAgDJAasO^Nk^`0MS^d?cy-JSEeL!f?Wh!%2XWo+m3
zYbS8;?e+2bG8;RxRK=&;tyQmkXZ~f(+MI9x&vO@1U`08Qf`D7(gLgi&Mol5}kJ}>p
zcHw({isCe?QZ*#!mj>T(f%R+`+*H&8b#|+ApInQpK_$PqJP_;iQnwC4Ru^pDKw@s}Nl;p6S{Xk7p<7YMh9UmaBMks27cAkRLL{+R;O^4(ouE4ylSl|NG1nL2Bc
zW*(yRIsuQrY5@7x13gL+stc495(!+QZZBe^H06@7ynRDwMpCRC!el}W6ih5
z22gisbITtVcgfL^pfN@t=k=7<-!COsh(4(FjmNDkC9J>fPgXY$4%inWsfyyq6wmxH
zy9iQI@=8&TP`c!8lm*#6aD09Hk#R=;qxa+IAJm}gOovR??s#-EMg16#0XRY%ZA=5E
z5@daTpjt9A>RyG-ooL*zO=~M0`OY{!b!JTr0R@%!#!3D9RIkoh^eR@3J6=lut`oGQ
z9g@M`kSMVaiyphyZ@>rj#ev(h=zmsKz(m>xm-Di^$?4G=ipR>Rcs
zal>k;JJwj?=Dvg(exT8JskyWvI4Goc!?^8Hj_+cfp;YOQN>MYHR|X{=b6Gt>$_w0-
z=+*h%VyITSh8oqn#$QJXph=IOfRbp`u^J{)jqb8^N7Qzn-skr>Mp(WANt?&Pr`n*I
zp1M3yRZ)q3je@-o9;yRR{#Jo9+Zjwf@XXx(utfbApVS*YTBq1A)4KCI^e3huMSxeG
zf042vfLWlcg&$o%AdxKg+f7eM7b+;zrm~t@1M$|s{`bIBJh?J%H!~(Su=c$
zScYWvD1p`o7TLm5Gn><2*3na4d2#|^hhczL5Gtz>X&nfR*e-0g@!>Er<>VwPyqyWB
zaqMM{Pl0Qw>r9J5S&HEn|3@kq@IG#Z+W?
z5YtMuS6HR%I*_ex8cTkp@3B34gC*AbfYkJF<{(o;{}?;;oxO^srC>pT^bCwx8Q3k<
z?Fn_Y%V`Fz7Y&Hg`ELQF`Xsv9`qfEe}-zWct$^lRoQ9f;=
z-+COC765etDKwK6di!&Vw~&cqo3eL7US+%LcJbzu4Z`XR{022WQsKnE|1E!)khobc
z*tsh{K*UY^Vg=S}@pE2a+}c{IkCj>7UA13IAS>vrA%9I798qitZbG*4kdSu-VW(=h
zYDu%R(T#9?>&J#lPm_Dv_cI
zd6s-Ia8QOBqQL)~>^3055`Xpb#K5K5>v5&Fu^N};z@~L%=Y~b7jL$MnH46Z{q-!qs
z;aR6*UDv17Oq==qCW#9$Fj=($I2Ez3_DkHm8!nx^C@zd3AaO4!cr`)lLFZNON!B-c
z%4AwAsj{|by)G?u>zC1rf-*km4;jehRHH8H%3$=~&d8QZMEO&5$zMF<7xKHm{r1Iv
z!YP-|K6k)nsTvtt+rzw{Tcu`rgl1E8GYs(G^Fo5G^=&_biYwx)eH|FDZN6l>-tCI{}>pH0SEyb(ym?`9jOru!Maa(fv5ww@rMz9nis
zaO-Z*YP0hMfZfQwD0q2WXUOsRZ<)Jh|Kd$G(^!&F`T2Q9P`N?8R2oEGE}g>@NITts
zNPjp2Hi=sk7Cg6u-zy`W#z)|qvs{MR>zA*qBJLv;BN|p*sm;fF
zmNmBpCV6J#@4kz@CBUa6HmLnhv2*Js0?oOGJp4LG)~X-aH@
zXV`=@6esdQsbgv(=4@~H2c<{+6-}pf>@aCNSV>1c2+cLOn>6>t=d4Fm;-g7|FvIXb9wZQ$obap3alXkqZmgu2n=3eh)V&*@mG7$=9jCa`3HDA8o
zy3og%NPQAtR2^blGhU-+o5=!~N~)IdVHl`3=ZzXn8HdP&3hd
zoYk_mhFk8VfWHF7fTcHFt1>-Mp<;aGydyHqLzOw_&9NnN6nO0@PvBJLZ{T8N&cQ~A
z3(g`~ZG%MN_=Z$sT!hLj*J|a@e|Rp(2s1MM9nQgGgvXixTQJ0(IR^sQ|?mt7vi%a8y>%|>Q!8FlPXyI9lMOP439|!E!H~;_u
diff --git a/public/index.php b/public/index.php
index 5a1dd66d4..a20b1e57a 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,26 +1,9 @@
handle($request);
-$response->send();
-$kernel->terminate($request, $response);
+return function (array $context) {
+ return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
+};
diff --git a/symfony.lock b/symfony.lock
index e33a02b27..bb44e90e4 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -165,9 +165,6 @@
"monolog/monolog": {
"version": "1.25.4"
},
- "moontoast/math": {
- "version": "1.2.1"
- },
"myclabs/deep-copy": {
"version": "1.9.5"
},
@@ -201,12 +198,6 @@
"pagerfanta/pagerfanta": {
"version": "v1.1.0"
},
- "paragonie/constant_time_encoding": {
- "version": "v2.5.0"
- },
- "paragonie/random_compat": {
- "version": "v2.0.18"
- },
"pdepend/pdepend": {
"version": "2.7.1"
},
@@ -219,12 +210,6 @@
"phpmd/phpmd": {
"version": "2.8.2"
},
- "phpseclib/bcmath_compat": {
- "version": "1.0.5"
- },
- "phpseclib/phpseclib": {
- "version": "2.0.27"
- },
"phpunit/php-code-coverage": {
"version": "7.0.10"
},
@@ -393,9 +378,6 @@
"symfony/dom-crawler": {
"version": "v4.4.10"
},
- "symfony/dotenv": {
- "version": "v4.4.9"
- },
"symfony/error-handler": {
"version": "v4.4.10"
},
From 86cea19a1afef9bfe6e2dde77cbc677ff2f8eb7b Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 14 Mar 2024 09:21:17 +0100
Subject: [PATCH 31/89] Rename namespace of Kernel
It is no longer in App, but resides in Surf/Middleware
---
bin/console | 2 +-
ci/qa/phpunit.xml | 2 +-
composer.json | 5 +--
public/index.php | 2 +-
src/Kernel.php | 55 -------------------------
src/Surfnet/StepupMiddleware/Kernel.php | 21 ++++++++++
6 files changed, 25 insertions(+), 62 deletions(-)
delete mode 100644 src/Kernel.php
create mode 100644 src/Surfnet/StepupMiddleware/Kernel.php
diff --git a/bin/console b/bin/console
index 22a216a4c..044c2d8f5 100755
--- a/bin/console
+++ b/bin/console
@@ -1,6 +1,6 @@
#!/usr/bin/env php
-
+
diff --git a/composer.json b/composer.json
index 29716da48..aee55b98d 100644
--- a/composer.json
+++ b/composer.json
@@ -6,10 +6,7 @@
"psr-4": {
"Surfnet\\Stepup\\": "src\\Surfnet\\Stepup",
"Surfnet\\StepupMiddleware\\": "src\\Surfnet\\StepupMiddleware"
- },
- "classmap": [
- "src/Kernel.php"
- ]
+ }
},
"autoload-dev": {
"psr-4": {
diff --git a/public/index.php b/public/index.php
index a20b1e57a..0d0178f6d 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,5 +1,5 @@
getProjectDir() . '/config/bundles.php';
- foreach ($contents as $class => $envs) {
- if ($envs[$this->environment] ?? $envs['all'] ?? false) {
- yield new $class();
- }
- }
- }
-
- public function getProjectDir(): string
- {
- return dirname(__DIR__);
- }
-
- protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
- {
- $container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php'));
- $container->setParameter('container.dumper.inline_class_loader', PHP_VERSION_ID < 70400 || $this->debug);
- $container->setParameter('container.dumper.inline_factories', true);
- $confDir = $this->getProjectDir() . '/config';
-
- $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob');
- $loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');
- $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');
- $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
- }
-
- protected function configureRoutes(RoutingConfigurator $routes): void
- {
- $extensions = '{php,yml,yaml}';
-
- $routes->import('../config/{routes}/' . $this->environment . "/*.$extensions");
- $routes->import("../config/{routes}/*.$extensions");
- $routes->import("../config/{routes}.$extensions");
- }
-}
diff --git a/src/Surfnet/StepupMiddleware/Kernel.php b/src/Surfnet/StepupMiddleware/Kernel.php
new file mode 100644
index 000000000..51f692d8b
--- /dev/null
+++ b/src/Surfnet/StepupMiddleware/Kernel.php
@@ -0,0 +1,21 @@
+
Date: Thu, 14 Mar 2024 09:27:51 +0100
Subject: [PATCH 32/89] Install PHPStan with SF support
Set on level 1 for starters
---
.gitignore | 4 +
ci/qa/phpstan | 5 +
ci/qa/phpstan-baseline.neon | 2 +
ci/qa/phpstan-update-baseline | 5 +
composer.json | 4 +
composer.lock | 480 +++++++++++++++++++++++++++++++++-
symfony.lock | 12 +
7 files changed, 511 insertions(+), 1 deletion(-)
create mode 100755 ci/qa/phpstan
create mode 100644 ci/qa/phpstan-baseline.neon
create mode 100755 ci/qa/phpstan-update-baseline
diff --git a/.gitignore b/.gitignore
index 4a872431a..2bea33b45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,7 @@ config/services.yml
###> symfony/phpunit-bridge ###
.phpunit
###< symfony/phpunit-bridge ###
+
+###> phpstan/phpstan ###
+phpstan.neon
+###< phpstan/phpstan ###
diff --git a/ci/qa/phpstan b/ci/qa/phpstan
new file mode 100755
index 000000000..f60f80592
--- /dev/null
+++ b/ci/qa/phpstan
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+cd $(dirname $0)/../../
+
+vendor/bin/phpstan analyse --memory-limit=-1 --no-ansi -c ./ci/qa/phpstan.neon
diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon
new file mode 100644
index 000000000..364905f71
--- /dev/null
+++ b/ci/qa/phpstan-baseline.neon
@@ -0,0 +1,2 @@
+parameters:
+ ignoreErrors:
diff --git a/ci/qa/phpstan-update-baseline b/ci/qa/phpstan-update-baseline
new file mode 100755
index 000000000..50441d856
--- /dev/null
+++ b/ci/qa/phpstan-update-baseline
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+cd $(dirname $0)/../../
+
+vendor/bin/phpstan analyse --memory-limit=-1 --no-ansi -c ./ci/qa/phpstan.neon --generate-baseline ./ci/qa/phpstan-baseline.neon
diff --git a/composer.json b/composer.json
index aee55b98d..99016b9b6 100644
--- a/composer.json
+++ b/composer.json
@@ -63,6 +63,8 @@
"moontoast/math": "^1.2",
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.15",
+ "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.5",
"sebastian/phpcpd": "^6.0",
"squizlabs/php_codesniffer": "^3.7",
@@ -80,11 +82,13 @@
"@phplint",
"@phpmd",
"@phpcs",
+ "@phpstan",
"@phpcpd",
"@phpunit"
],
"phplint": "./ci/qa/phplint",
"phpmd": "./ci/qa/phpmd",
+ "phpstan": "./ci/qa/phpstan",
"phpcs": "./ci/qa/phpcs",
"phpcpd": "./ci/qa/phpcpd",
"phpunit": "./ci/qa/phpunit --",
diff --git a/composer.lock b/composer.lock
index 60189991a..3c7ceec52 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "43dd339e8ef5224c6f39f806eacea1d4",
+ "content-hash": "6df21d3155df0de1eb00a85abe71a17f",
"packages": [
{
"name": "beberlei/assert",
@@ -9202,6 +9202,61 @@
},
"time": "2023-12-10T02:24:34+00:00"
},
+ {
+ "name": "moontoast/math",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/moontoast-math.git",
+ "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/moontoast-math/zipball/5f47d34c87767dbcc08b30377a9827df71de91fa",
+ "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "phpseclib/bcmath_compat": ">=1.0.3"
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "^0.9.0",
+ "phpunit/phpunit": "^4.8 || ^5.5 || ^6.5 || ^7.0",
+ "satooshi/php-coveralls": "^0.6.1",
+ "squizlabs/php_codesniffer": "^2.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Moontoast\\Math\\": "src/Moontoast/Math",
+ "Moontoast\\Math\\Exception\\": "src/Moontoast/Math/Exception"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Ben Ramsey",
+ "email": "ben@benramsey.com",
+ "homepage": "https://benramsey.com"
+ }
+ ],
+ "description": "A mathematics library, providing functionality for large numbers",
+ "homepage": "https://github.com/ramsey/moontoast-math",
+ "keywords": [
+ "bcmath",
+ "math"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/moontoast-math/issues",
+ "source": "https://github.com/ramsey/moontoast-math"
+ },
+ "abandoned": "brick/math",
+ "time": "2020-01-05T04:49:34+00:00"
+ },
{
"name": "myclabs/deep-copy",
"version": "1.11.1",
@@ -9351,6 +9406,123 @@
],
"time": "2024-02-06T10:43:30+00:00"
},
+ {
+ "name": "paragonie/constant_time_encoding",
+ "version": "v2.6.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paragonie/constant_time_encoding.git",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7|^8"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6|^7|^8|^9",
+ "vimeo/psalm": "^1|^2|^3|^4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "ParagonIE\\ConstantTime\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paragon Initiative Enterprises",
+ "email": "security@paragonie.com",
+ "homepage": "https://paragonie.com",
+ "role": "Maintainer"
+ },
+ {
+ "name": "Steve 'Sc00bz' Thomas",
+ "email": "steve@tobtu.com",
+ "homepage": "https://www.tobtu.com",
+ "role": "Original Developer"
+ }
+ ],
+ "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
+ "keywords": [
+ "base16",
+ "base32",
+ "base32_decode",
+ "base32_encode",
+ "base64",
+ "base64_decode",
+ "base64_encode",
+ "bin2hex",
+ "encoding",
+ "hex",
+ "hex2bin",
+ "rfc4648"
+ ],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/constant_time_encoding/issues",
+ "source": "https://github.com/paragonie/constant_time_encoding"
+ },
+ "time": "2022-06-14T06:56:20+00:00"
+ },
+ {
+ "name": "paragonie/random_compat",
+ "version": "v9.99.100",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paragonie/random_compat.git",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">= 7"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*|5.*",
+ "vimeo/psalm": "^1"
+ },
+ "suggest": {
+ "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
+ },
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paragon Initiative Enterprises",
+ "email": "security@paragonie.com",
+ "homepage": "https://paragonie.com"
+ }
+ ],
+ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
+ "keywords": [
+ "csprng",
+ "polyfill",
+ "pseudorandom",
+ "random"
+ ],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/random_compat/issues",
+ "source": "https://github.com/paragonie/random_compat"
+ },
+ "time": "2020-10-15T08:29:30+00:00"
+ },
{
"name": "pdepend/pdepend",
"version": "2.16.2",
@@ -9608,6 +9780,312 @@
],
"time": "2023-12-11T08:22:20+00:00"
},
+ {
+ "name": "phpseclib/bcmath_compat",
+ "version": "2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpseclib/bcmath_compat.git",
+ "reference": "29bbf07a7039ff65ce7daa44502ba34baf1512ec"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpseclib/bcmath_compat/zipball/29bbf07a7039ff65ce7daa44502ba34baf1512ec",
+ "reference": "29bbf07a7039ff65ce7daa44502ba34baf1512ec",
+ "shasum": ""
+ },
+ "require": {
+ "phpseclib/phpseclib": "^3.0"
+ },
+ "provide": {
+ "ext-bcmath": "8.1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
+ "squizlabs/php_codesniffer": "^3.0"
+ },
+ "suggest": {
+ "ext-gmp": "Will enable faster math operations"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/bcmath.php"
+ ],
+ "psr-4": {
+ "bcmath_compat\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jim Wigginton",
+ "email": "terrafrost@php.net",
+ "homepage": "http://phpseclib.sourceforge.net"
+ }
+ ],
+ "description": "PHP 5.x-8.x polyfill for bcmath extension",
+ "keywords": [
+ "BigInteger",
+ "bcmath",
+ "bigdecimal",
+ "math",
+ "polyfill"
+ ],
+ "support": {
+ "email": "terrafrost@php.net",
+ "issues": "https://github.com/phpseclib/bcmath_compat/issues",
+ "source": "https://github.com/phpseclib/bcmath_compat"
+ },
+ "time": "2024-02-21T10:30:36+00:00"
+ },
+ {
+ "name": "phpseclib/phpseclib",
+ "version": "3.0.37",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpseclib/phpseclib.git",
+ "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
+ "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
+ "shasum": ""
+ },
+ "require": {
+ "paragonie/constant_time_encoding": "^1|^2",
+ "paragonie/random_compat": "^1.4|^2.0|^9.99.99",
+ "php": ">=5.6.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "*"
+ },
+ "suggest": {
+ "ext-dom": "Install the DOM extension to load XML formatted public keys.",
+ "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
+ "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
+ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
+ "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "phpseclib/bootstrap.php"
+ ],
+ "psr-4": {
+ "phpseclib3\\": "phpseclib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jim Wigginton",
+ "email": "terrafrost@php.net",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Patrick Monnerat",
+ "email": "pm@datasphere.ch",
+ "role": "Developer"
+ },
+ {
+ "name": "Andreas Fischer",
+ "email": "bantu@phpbb.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Hans-Jürgen Petrich",
+ "email": "petrich@tronic-media.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
+ "homepage": "http://phpseclib.sourceforge.net",
+ "keywords": [
+ "BigInteger",
+ "aes",
+ "asn.1",
+ "asn1",
+ "blowfish",
+ "crypto",
+ "cryptography",
+ "encryption",
+ "rsa",
+ "security",
+ "sftp",
+ "signature",
+ "signing",
+ "ssh",
+ "twofish",
+ "x.509",
+ "x509"
+ ],
+ "support": {
+ "issues": "https://github.com/phpseclib/phpseclib/issues",
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.37"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/terrafrost",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/phpseclib",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-03-03T02:14:58+00:00"
+ },
+ {
+ "name": "phpstan/phpstan",
+ "version": "1.10.62",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd5c8a1660ed3540b211407c77abf4af193a6af9",
+ "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "keywords": [
+ "dev",
+ "static analysis"
+ ],
+ "support": {
+ "docs": "https://phpstan.org/user-guide/getting-started",
+ "forum": "https://github.com/phpstan/phpstan/discussions",
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "security": "https://github.com/phpstan/phpstan/security/policy",
+ "source": "https://github.com/phpstan/phpstan-src"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phpstan",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-03-13T12:27:20+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-symfony",
+ "version": "1.3.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-symfony.git",
+ "reference": "d8a0bc03a68d95288b6471c37d435647fbdaff1a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d8a0bc03a68d95288b6471c37d435647fbdaff1a",
+ "reference": "d8a0bc03a68d95288b6471c37d435647fbdaff1a",
+ "shasum": ""
+ },
+ "require": {
+ "ext-simplexml": "*",
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.10.36"
+ },
+ "conflict": {
+ "symfony/framework-bundle": "<3.0"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.3.11",
+ "phpstan/phpstan-strict-rules": "^1.5.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5",
+ "psr/container": "1.0 || 1.1.1",
+ "symfony/config": "^5.4 || ^6.1",
+ "symfony/console": "^5.4 || ^6.1",
+ "symfony/dependency-injection": "^5.4 || ^6.1",
+ "symfony/form": "^5.4 || ^6.1",
+ "symfony/framework-bundle": "^5.4 || ^6.1",
+ "symfony/http-foundation": "^5.4 || ^6.1",
+ "symfony/messenger": "^5.4",
+ "symfony/polyfill-php80": "^1.24",
+ "symfony/serializer": "^5.4",
+ "symfony/service-contracts": "^2.2.0"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Lukáš Unger",
+ "email": "looky.msc@gmail.com",
+ "homepage": "https://lookyman.net"
+ }
+ ],
+ "description": "Symfony Framework extensions and rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-symfony/issues",
+ "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.8"
+ },
+ "time": "2024-03-05T16:33:08+00:00"
+ },
{
"name": "phpunit/php-code-coverage",
"version": "9.2.30",
diff --git a/symfony.lock b/symfony.lock
index bb44e90e4..8ba174f6b 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -210,6 +210,18 @@
"phpmd/phpmd": {
"version": "2.8.2"
},
+ "phpstan/phpstan": {
+ "version": "1.10",
+ "recipe": {
+ "repo": "github.com/symfony/recipes-contrib",
+ "branch": "main",
+ "version": "1.0",
+ "ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
+ },
+ "files": [
+ "phpstan.dist.neon"
+ ]
+ },
"phpunit/php-code-coverage": {
"version": "7.0.10"
},
From a438e3b2c1ed1a0bac142ee5090262316846bf6e Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 14 Mar 2024 09:40:00 +0100
Subject: [PATCH 33/89] Update EventDisplatcher interface contracts
---
.../MiddlewareBundle/Service/EventDispatcher.php | 16 ++++------------
.../Service/ReplayingEventDispatcher.php | 14 +++++---------
.../Service/TransactionAwareEventDispatcher.php | 8 ++++----
.../VerifiedSecondFactorReminderMailService.php | 13 ++++++-------
4 files changed, 19 insertions(+), 32 deletions(-)
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventDispatcher.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventDispatcher.php
index bb67d1f3c..5c5694417 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventDispatcher.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventDispatcher.php
@@ -18,20 +18,12 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Broadway\Domain\DomainEventStreamInterface;
-use Broadway\ReadModel\ProjectorInterface;
+use Broadway\Domain\DomainEventStream;
+use Broadway\EventHandling\EventListener;
interface EventDispatcher
{
- /**
- * @param ProjectorInterface $projector
- * @return void
- */
- public function registerProjector(ProjectorInterface $projector);
+ public function registerProjector(EventListener $projector): void;
- /**
- * @param DomainEventStreamInterface $event
- * @return void
- */
- public function dispatch(DomainEventStreamInterface $event);
+ public function dispatch(DomainEventStream $event): void;
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
index 6c0b97676..d3a3355ad 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
@@ -18,26 +18,22 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Broadway\Domain\DomainEventStreamInterface;
-use Broadway\ReadModel\ProjectorInterface;
+use Broadway\Domain\DomainEventStream;
+use Broadway\EventHandling\EventListener;
final class ReplayingEventDispatcher implements EventDispatcher
{
/**
- * @var ProjectorInterface[]
+ * @var EventListener[]
*/
private ?array $projectors = null;
- /**
- * @param ProjectorInterface $projector
- */
- public function registerProjector(ProjectorInterface $projector): void
+ public function registerProjector(EventListener $projector): void
{
$this->projectors[] = $projector;
}
- public function dispatch(DomainEventStreamInterface $events): void
- {
+ public function dispatch(DomainEventStream $events): void {
foreach ($events as $event) {
foreach ($this->projectors as $projector) {
$projector->handle($event);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionAwareEventDispatcher.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionAwareEventDispatcher.php
index a058b36bb..b8697a53f 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionAwareEventDispatcher.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionAwareEventDispatcher.php
@@ -18,8 +18,8 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Broadway\Domain\DomainEventStreamInterface;
-use Broadway\ReadModel\ProjectorInterface;
+use Broadway\Domain\DomainEventStream;
+use Broadway\EventHandling\EventListener;
use Exception;
final readonly class TransactionAwareEventDispatcher implements EventDispatcher
@@ -30,12 +30,12 @@ public function __construct(
) {
}
- public function registerProjector(ProjectorInterface $projector): void
+ public function registerProjector(EventListener $projector): void
{
$this->eventDispatcher->registerProjector($projector);
}
- public function dispatch(DomainEventStreamInterface $events): void
+ public function dispatch(DomainEventStream $events): void
{
$this->connectionHelper->beginTransaction();
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
index b6da3132e..e61bda613 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
@@ -61,16 +61,13 @@ public function __construct(
$this->fallbackLocale = $fallbackLocale;
}
- /**
- * @return int
- */
- public function sendReminder(VerifiedTokenInformation $tokenInformation)
+ public function sendReminder(VerifiedTokenInformation $tokenInformation): void
{
$institution = new Institution((string)$tokenInformation->getInstitution());
$institutionConfigurationOptions = $this->institutionConfigurationOptionsService
->findInstitutionConfigurationOptionsFor($institution);
if ($institutionConfigurationOptions->useRaLocationsOption->isEnabled()) {
- return $this->sendReminderWithInstitution(
+ $this->sendReminderWithInstitution(
$tokenInformation->getPreferredLocale(),
$tokenInformation->getCommonName(),
$tokenInformation->getEmail(),
@@ -78,12 +75,13 @@ public function sendReminder(VerifiedTokenInformation $tokenInformation)
$tokenInformation->getRegistrationCode(),
$this->raLocationService->listRaLocationsFor($institution),
);
+ return;
}
$ras = $this->raListingService->listRegistrationAuthoritiesFor($tokenInformation->getInstitution());
if ($institutionConfigurationOptions->showRaaContactInformationOption->isEnabled()) {
- return $this->sendReminderWithRas(
+ $this->sendReminderWithRas(
$tokenInformation->getPreferredLocale(),
$tokenInformation->getCommonName(),
$tokenInformation->getEmail(),
@@ -91,11 +89,12 @@ public function sendReminder(VerifiedTokenInformation $tokenInformation)
$tokenInformation->getRegistrationCode(),
$ras,
);
+ return;
}
$rasWithoutRaas = array_filter($ras, fn(RegistrationAuthorityCredentials $ra): bool => !$ra->isRaa());
- return $this->sendReminderWithRas(
+ $this->sendReminderWithRas(
$tokenInformation->getPreferredLocale(),
$tokenInformation->getCommonName(),
$tokenInformation->getEmail(),
From 39f4cd97cdd119d2eb18eaf8bf2f991305f08c34 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 14 Mar 2024 09:53:38 +0100
Subject: [PATCH 34/89] Annotate event replay might throw an exception
This then shows PHPStan that the exception catch block might have access
to the local variable: `$replayProgress`
---
.../EventHandling/BufferedEventBus.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index 426819c6e..aff80d558 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -23,7 +23,8 @@
use Broadway\EventHandling\EventBus as EventBusInterface;
use Broadway\EventHandling\EventListener as EventListenerInterface;
use Doctrine\ORM\EntityManagerInterface;
-use Exception;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\Exception;
+
class BufferedEventBus implements EventBusInterface
{
@@ -52,6 +53,9 @@ public function subscribe(EventListenerInterface $eventListener): void
$this->eventListeners[] = $eventListener;
}
+ /**
+ * @throws Exception
+ */
public function publish(DomainEventStreamInterface $domainMessages): void
{
foreach ($domainMessages as $domainMessage) {
From 6b9b0e74fa8c0a71fbd63bf13436c4edb0a6663a Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 14 Mar 2024 10:27:29 +0100
Subject: [PATCH 35/89] Stop using AnonymousToken
TODO; we probably need to authenticate another null token-ish construction
---
composer.json | 2 +-
composer.lock | 17 ++++++++++-------
.../BootstrapGsspSecondFactorCommand.php | 4 ----
.../Command/BootstrapIdentityCommand.php | 5 -----
...apIdentityWithYubikeySecondFactorCommand.php | 5 -----
.../Command/BootstrapSmsSecondFactorCommand.php | 4 ----
.../BootstrapYubikeySecondFactorCommand.php | 4 ----
.../Command/MigrateSecondFactorCommand.php | 6 ------
8 files changed, 11 insertions(+), 36 deletions(-)
diff --git a/composer.json b/composer.json
index 99016b9b6..1aec54a31 100644
--- a/composer.json
+++ b/composer.json
@@ -63,7 +63,7 @@
"moontoast/math": "^1.2",
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.15",
- "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan": "^1.11.x-dev",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.5",
"sebastian/phpcpd": "^6.0",
diff --git a/composer.lock b/composer.lock
index 3c7ceec52..a5568a8fa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "6df21d3155df0de1eb00a85abe71a17f",
+ "content-hash": "156291ab918516a27e699fc01ab05e0c",
"packages": [
{
"name": "beberlei/assert",
@@ -9954,16 +9954,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.10.62",
+ "version": "1.11.x-dev",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9"
+ "reference": "5b77cb3070b7ca25fcdb964583cef15cddcfc926"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd5c8a1660ed3540b211407c77abf4af193a6af9",
- "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5b77cb3070b7ca25fcdb964583cef15cddcfc926",
+ "reference": "5b77cb3070b7ca25fcdb964583cef15cddcfc926",
"shasum": ""
},
"require": {
@@ -9972,6 +9972,7 @@
"conflict": {
"phpstan/phpstan-shim": "*"
},
+ "default-branch": true,
"bin": [
"phpstan",
"phpstan.phar"
@@ -10012,7 +10013,7 @@
"type": "tidelift"
}
],
- "time": "2024-03-13T12:27:20+00:00"
+ "time": "2024-03-13T14:17:45+00:00"
},
{
"name": "phpstan/phpstan-symfony",
@@ -12026,7 +12027,9 @@
],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {
+ "phpstan/phpstan": 20
+ },
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
index 9013d4943..cb7e5614b 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
@@ -28,7 +28,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
final class BootstrapGsspSecondFactorCommand extends Command
{
@@ -68,9 +67,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-gssp-token', 'cli', ['ROLE_SS', 'ROLE_RA']),
- );
$nameId = new NameId($input->getArgument('name-id'));
$institutionText = $input->getArgument('institution');
$institution = new Institution($institutionText);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
index 49ab55dd8..1db27ff4b 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
@@ -27,7 +27,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
final class BootstrapIdentityCommand extends Command
{
@@ -52,10 +51,6 @@ protected function configure(): void
protected function execute(InputInterface $input, OutputInterface $output): void
{
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-identity-with-sms-token', 'cli', ['ROLE_SS']),
- );
-
$nameId = new NameId($input->getArgument('name-id'));
$institutionText = $input->getArgument('institution');
$institution = new Institution($institutionText);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index 07e2938b4..22bb8eb81 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -30,7 +30,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -65,10 +64,6 @@ public function __construct(
protected function execute(InputInterface $input, OutputInterface $output): int
{
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-yubikey-token', 'cli', ['ROLE_SS', 'ROLE_RA', 'ROLE_MANAGEMENT']),
- );
-
$nameId = new NameId($input->getArgument('name-id'));
$institution = new Institution($input->getArgument('institution'));
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
index cab70fe89..0e84b0ca1 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
@@ -28,7 +28,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
final class BootstrapSmsSecondFactorCommand extends Command
{
@@ -63,9 +62,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-sms-token', 'cli', ['ROLE_SS', 'ROLE_RA']),
- );
$nameId = new NameId($input->getArgument('name-id'));
$institutionText = $input->getArgument('institution');
$institution = new Institution($institutionText);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
index e054725c7..c906949a9 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
@@ -28,7 +28,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
final class BootstrapYubikeySecondFactorCommand extends Command
{
@@ -63,9 +62,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-yubikey-token', 'cli', ['ROLE_SS', 'ROLE_RA']),
- );
$nameId = new NameId($input->getArgument('name-id'));
$institutionText = $input->getArgument('institution');
$institution = new Institution($institutionText);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
index fba5ed82b..8ef0bee8d 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
@@ -30,8 +30,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
-use function sprintf;
final class MigrateSecondFactorCommand extends Command
{
@@ -65,10 +63,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$sourceNameId = new NameId($input->getArgument('old-name-id'));
$targetNameId = new NameId($input->getArgument('new-name-id'));
- $this->bootstrapService->setToken(
- new AnonymousToken('cli.bootstrap-yubikey-token', 'cli', ['ROLE_SS', 'ROLE_RA']),
- );
-
$output->writeln(sprintf('Starting token migration for %s', $sourceNameId));
$sourceIdentity = $this->bootstrapService->getIdentityByNameId($sourceNameId);
$targetIdentity = $this->bootstrapService->getIdentityByNameId($targetNameId);
From 60b2d0d53bb233842de27e1b01a55a5f3ee65961 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 14 Mar 2024 11:39:43 +0100
Subject: [PATCH 36/89] Address PHPStan level 1 issues
---
composer.json | 1 +
composer.lock | 2 +-
.../Configuration/InstitutionConfiguration.php | 1 +
.../Identity/Event/RecoveryTokenRevokedEvent.php | 2 +-
.../Identity/Value/RegistrationAuthorityRole.php | 11 ++---------
.../Tests/Identity/Event/ForgettableEventsTest.php | 2 +-
.../Controller/VettingTypeHintController.php | 2 ++
.../Repository/AuthorizationRepository.php | 14 +++++++++++---
.../Identity/Repository/IdentityRepository.php | 2 +-
.../Identity/Repository/RaListingRepository.php | 6 +++---
.../Repository/RaSecondFactorRepository.php | 4 ++--
.../Repository/RecoveryTokenRepository.php | 2 +-
.../Identity/Repository/SraaRepository.php | 1 +
.../UnverifiedSecondFactorRepository.php | 2 +-
.../Repository/VerifiedSecondFactorRepository.php | 2 +-
.../Repository/VettedSecondFactorRepository.php | 2 +-
.../Identity/Service/AbstractSearchService.php | 4 ++--
.../Tests/Endpoint/SraaControllerTest.php | 1 -
.../RightToBeForgottenCommandHandlerTest.php | 1 -
.../Tests/Mockery/HasInstitutionMatcher.php | 2 +-
.../Repository/SecondFactorRepository.php | 2 +-
.../Controller/ConfigurationControllerTest.php | 5 -----
.../ReconfigureInstitutionRequestValidator.php | 8 ++++----
...strapIdentityWithYubikeySecondFactorCommand.php | 1 +
.../EmailVerifiedSecondFactorRemindersCommand.php | 1 +
25 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/composer.json b/composer.json
index 1aec54a31..c7fb61999 100644
--- a/composer.json
+++ b/composer.json
@@ -33,6 +33,7 @@
"liip/test-fixtures-bundle": "^2.7",
"nelmio/security-bundle": "^3.1",
"openconext/monitor-bundle": "^4.1",
+ "pagerfanta/doctrine-orm-adapter": "*",
"pagerfanta/pagerfanta": "^4.3",
"ramsey/uuid": "^4.7",
"sensio/framework-extra-bundle": "*",
diff --git a/composer.lock b/composer.lock
index a5568a8fa..b0250f427 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "156291ab918516a27e699fc01ab05e0c",
+ "content-hash": "83a193d6a8d10f551e177773546928f4",
"packages": [
{
"name": "beberlei/assert",
diff --git a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
index 06c74bb00..0b709e84b 100644
--- a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
@@ -218,6 +218,7 @@ public function rebuild(): static
ShowRaaContactInformationOption::getDefault(),
VerifyEmailOption::getDefault(),
NumberOfTokensPerIdentityOption::getDefault(),
+ SsoOn2faOption::getDefault(),
SelfVetOption::getDefault(),
SelfAssertedTokensOption::getDefault(),
),
diff --git a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
index 0061160df..3f7cb3c8d 100644
--- a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
@@ -21,7 +21,7 @@
use Surfnet\Stepup\Identity\AuditLog\Metadata;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
-use Surfnet\Stepup\Identity\Value\recoveryTokenId;
+use Surfnet\Stepup\Identity\Value\RecoveryTokenId;
use Surfnet\Stepup\Identity\Value\RecoveryTokenType;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\RightToObtainDataInterface;
diff --git a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
index 10981cd6b..576474a19 100644
--- a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+++ b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
@@ -28,20 +28,13 @@ final class RegistrationAuthorityRole implements SerializableInterface, Stringab
public const ROLE_RAA = 2;
public const ROLE_SRAA = 3;
- private readonly int $role;
-
- /**
- * @param string $role may not be an empty string
- */
- public function __construct($role)
+ public function __construct(private readonly int $role)
{
- if (!is_int($role) || !in_array($role, [self::ROLE_RA, self::ROLE_RAA, self::ROLE_SRAA])) {
+ if (!in_array($role, [self::ROLE_RA, self::ROLE_RAA, self::ROLE_SRAA])) {
throw new InvalidArgumentException(
'Invalid role given, role must be one of RegistrationAuthorityRole::[ROLE_RA|ROLE_RAA|ROLE_SRAA]',
);
}
-
- $this->role = $role;
}
/**
diff --git a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
index 007ad0b07..ec2b3c0bd 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
@@ -106,7 +106,7 @@ public function certain_events_are_forgettable_events_and_others_are_not(): void
foreach ($otherIdentityEventFqcns as $fqcn) {
$this->assertFalse(
is_a($fqcn, $forgettableFqcn, true),
- sprintf('%s is a Forgettable event, is this correct? Then add it to the list', $fqcn, $forgettableFqcn),
+ sprintf('%s is a Forgettable event, is this correct? Then add it to the list', $fqcn),
);
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
index 806d609fb..4f8649bb1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
@@ -22,6 +22,7 @@
use Surfnet\Stepup\Configuration\Value\InstitutionRole;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
+use Surfnet\StepupMiddleware\ApiBundle\Authorization\Service\AuthorizationContextService;
use Surfnet\StepupMiddleware\ApiBundle\Exception\NotFoundException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RecoveryTokenQuery;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
@@ -36,6 +37,7 @@ class VettingTypeHintController extends AbstractController
public function __construct(
private readonly VettingTypeHintService $service,
private readonly LoggerInterface $logger,
+ private readonly AuthorizationContextService $authorizationService,
) {
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
index 6bfed0260..857df7e74 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
@@ -29,6 +29,7 @@
use Surfnet\Stepup\Identity\Value\RegistrationAuthorityRole;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\ConfiguredInstitution;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionAuthorization;
+use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing;
@@ -55,7 +56,7 @@ public function __construct(
public function getInstitutionsForRole(RegistrationAuthorityRole $role, IdentityId $actorId): InstitutionCollection
{
$result = new InstitutionCollection();
- $qb = $this->_em->createQueryBuilder()
+ $qb = $this->getEntityManager()->createQueryBuilder()
->select("a.institution")
->from(ConfiguredInstitution::class, 'i')
->innerJoin(RaListing::class, 'r', Join::WITH, "i.institution = r.raInstitution")
@@ -90,7 +91,7 @@ public function getInstitutionsForRole(RegistrationAuthorityRole $role, Identity
// Also get the institutions that are linked to the user via the 'institution_relation' field.
// Effectively getting the use_raa relation.
// See https://www.pivotaltracker.com/story/show/181537313
- $qb = $this->_em->createQueryBuilder()
+ $qb = $this->getEntityManager()->createQueryBuilder()
->select('ia.institution')
->from(InstitutionAuthorization::class, 'ia')
// Filter the RA listing on the authorizations that apply for the RA(A) listed there
@@ -134,7 +135,7 @@ public function getInstitutionsForRole(RegistrationAuthorityRole $role, Identity
*/
public function getInstitutionsForSelectRaaRole(IdentityId $actorId): InstitutionCollection
{
- $qb = $this->_em->createQueryBuilder()
+ $qb = $this->getEntityManager()->createQueryBuilder()
->select("ci.institution")
->from(InstitutionAuthorization::class, 'ia')
->innerJoin(ConfiguredInstitution::class, 'ci', Join::WITH, 'ia.institutionRelation = ci.institution')
@@ -202,5 +203,12 @@ private function getInstitutionRoleByRaRole(RegistrationAuthorityRole $role): st
if ($role->equals(RegistrationAuthorityRole::raa())) {
return AuthorityRole::ROLE_RAA;
}
+
+ throw new RuntimeException(
+ sprintf(
+ 'The role "%s did not match any of our supported AuthorityRoles (ra, raa)',
+ $role->jsonSerialize()
+ )
+ );
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
index 6ac36ff30..f431b6716 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
@@ -143,7 +143,7 @@ public function findOneByNameId(string $nameId): ?Identity
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'i')
+ ->delete($this->getEntityName(), 'i')
->where('i.id = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
index 07c72be65..2a5246851 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
@@ -226,7 +226,7 @@ public function listRasFor(Institution $raInstitution): ArrayCollection
public function removeByIdentityId(IdentityId $identityId, Institution $institution): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'ral')
+ ->delete($this->getEntityName(), 'ral')
->where('ral.identityId = :identityId')
->andWhere('ral.raInstitution = :institution')
->setParameter('identityId', $identityId->getIdentityId())
@@ -241,7 +241,7 @@ public function removeByIdentityId(IdentityId $identityId, Institution $institut
public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'ral')
+ ->delete($this->getEntityName(), 'ral')
->where('ral.identityId = :identityId')
->andWhere('ral.raInstitution = :institution')
->setParameter('identityId', $identityId->getIdentityId())
@@ -256,7 +256,7 @@ public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Insti
public function removeByIdentityIdAndInstitution(IdentityId $identityId, Institution $institution): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'ral')
+ ->delete($this->getEntityName(), 'ral')
->where('ral.identityId = :identityId')
->andWhere('ral.institution = :institution')
->setParameter('identityId', $identityId->getIdentityId())
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
index 109ce4604..dd9f10930 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
@@ -174,7 +174,7 @@ public function createOptionsQuery(RaSecondFactorQuery $query): Query
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'rasf')
+ ->delete($this->getEntityName(), 'rasf')
->where('rasf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
@@ -204,7 +204,7 @@ public function saveAll(array $secondFactors): void
public function updateStatusByIdentityIdToForgotten(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->update($this->_entityName, 'rasf')
+ ->update($this->getEntityName(), 'rasf')
->set('rasf.status', ":forgotten")
->where('rasf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
index 6271b7165..050c63281 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
@@ -152,7 +152,7 @@ public function createOptionsQuery(RecoveryTokenQuery $query): Query
public function removeByIdentity(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'rt')
+ ->delete($this->getEntityName(), 'rt')
->where('rt.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
index 2cb9d74a4..9ceaf764c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
@@ -62,6 +62,7 @@ public function saveAll(array $sraaList): void
$invalidIndications[] = sprintf(
'"%s" at index "%d"',
get_debug_type($value),
+ $index
);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
index c77606bb0..1c39b1df8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
@@ -64,7 +64,7 @@ public function createSearchQuery(UnverifiedSecondFactorQuery $query): Query
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'sf')
+ ->delete($this->getEntityName(), 'sf')
->where('sf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
index 79cc5e6dd..3555ef02d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
@@ -119,7 +119,7 @@ public function createSearchForIdentityQuery(VerifiedSecondFactorOfIdentityQuery
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'sf')
+ ->delete($this->getEntityName(), 'sf')
->where('sf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
index b603df508..cc5ea423f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
@@ -56,7 +56,7 @@ public function createSearchQuery(VettedSecondFactorQuery $query): Query
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'sf')
+ ->delete($this->getEntityName(), 'sf')
->where('sf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
index 8b1919379..1820a7e86 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
@@ -20,7 +20,7 @@
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
-use Pagerfanta\Adapter\DoctrineORMAdapter;
+use Pagerfanta\Doctrine\ORM\QueryAdapter;
use Pagerfanta\Pagerfanta;
use Surfnet\StepupMiddleware\ApiBundle\Exception\InvalidArgumentException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\AbstractQuery;
@@ -45,7 +45,7 @@ protected function createPaginatorFrom(
);
}
- $adapter = new DoctrineORMAdapter($doctrineQuery, $fetchCollection);
+ $adapter = new QueryAdapter($doctrineQuery, $fetchCollection);
$paginator = new Pagerfanta($adapter);
$paginator->setMaxPerPage($query->itemsPerPage);
$paginator->setCurrentPage($query->pageNumber);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
index 7daf08765..bf0a68458 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
@@ -54,7 +54,6 @@ public function setUp(): void
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
- $this->loadFixtures([]);
$this->client = static::createClient();
$passwordSs = $this->client->getKernel()->getContainer()->getParameter('selfservice_api_password');
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
index b2be366f3..e7698124d 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
@@ -276,7 +276,6 @@ public function an_ra_cannot_be_forgotten(): void
new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA),
new Location('0x0392ff832'),
new ContactInformation('/dev/null'),
- $institution,
),
])
->when($command);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
index 4d597aad0..72f7ae228 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
@@ -50,6 +50,6 @@ public function match(&$actual): bool
public function __toString(): string
{
- return sprintf('', $this->expected);
+ return sprintf('', $this->expected);
}
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
index a8157e05c..a49c47817 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
@@ -52,7 +52,7 @@ public function findByIdentityId(IdentityId $identityId): array
public function removeByIdentityId(IdentityId $identityId): void
{
$this->getEntityManager()->createQueryBuilder()
- ->delete($this->_entityName, 'sf')
+ ->delete($this->getEntityName(), 'sf')
->where('sf.identityId = :identityId')
->setParameter('identityId', $identityId->getIdentityId())
->getQuery()
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
index 4bdaa88b1..d2afde83e 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
@@ -20,7 +20,6 @@
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
-use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
@@ -29,9 +28,6 @@ class ConfigurationControllerTest extends WebTestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var Client
- */
private KernelBrowser $client;
/**
@@ -52,7 +48,6 @@ public function setUp(): void
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
- $this->loadFixtures([]);
$this->client = static::createClient();
$this->password = $this->client->getKernel()->getContainer()->getParameter('management_password');
$this->passwordRo = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
index cbaa2bbde..53f54ecaa 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
@@ -280,7 +280,7 @@ private function validateAuthorizationSettings(
if (in_array($optionName, $acceptedOptions)) {
// 1. Value must be array
Assertion::isArray(
- $authorizationSettings[$optionName],
+ $setting,
sprintf(
'Option "%s" for "%s" must be an array of strings. ("%s") was passed.',
$optionName,
@@ -292,9 +292,9 @@ private function validateAuthorizationSettings(
// 2. The contents of the array must be empty or string
Assertion::allString(
- $authorizationSettings[$optionName],
+ $setting,
sprintf(
- 'All values of option "%s" should be of type string. ("%s") was passed.',
+ 'All values of option "%s" for "%s" should be of type string. ("%s") was passed.',
$optionName,
$institution,
var_export($setting, true),
@@ -307,7 +307,7 @@ private function validateAuthorizationSettings(
$authorizationSettings[$optionName],
$whitelistedInstitutions,
sprintf(
- 'All values of option "%s" should be known institutions. ("%s") was passed.',
+ 'All values of option "%s" for "%s" should be known institutions. ("%s") was passed.',
$optionName,
$institution,
var_export($setting, true),
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index 22bb8eb81..f70a9e666 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -114,5 +114,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$command->secondFactorId,
),
);
+ return 0;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
index d40b276bc..65bb0e8fd 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
@@ -110,6 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->connection->rollBack();
throw $e;
}
+ return 0;
}
private function validateInput(InputInterface $input): void
From f4fb72c543a40843f4f716e83fbfdaa177fcf56e Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Mon, 18 Mar 2024 08:50:34 +0100
Subject: [PATCH 37/89] Improve PHPStan Mockery integration
1. Installed the mockery plugin
2. Fixed type hints for Mock instances to be MockInterface
3. Addressed some other level 2 fixing in this commit. :blush:
---
composer.json | 6 +-
composer.lock | 69 ++++++++++++++++---
.../Event/NewConfigurationCreatedEvent.php | 6 --
.../Identity/Entity/InstitutionCollection.php | 19 +----
.../AuthorizationContextServiceTest.php | 9 +--
.../CommandAuthorizationServiceTest.php | 2 -
.../InstitutionAuthorizationServiceTest.php | 1 +
.../Request/CommandParamConverterTest.php | 1 +
.../Request/InstitutionParamConverterTest.php | 2 +-
.../Tests/Service/DeprovisionServiceTest.php | 3 +-
.../ConfigurationCommandHandler.php | 10 +--
...InstitutionConfigurationCommandHandler.php | 7 +-
.../EventHandling/BufferedEventBus.php | 3 +-
.../Identity/Command/AppointRoleCommand.php | 6 --
.../CommandHandler/IdentityCommandHandler.php | 2 +-
.../RegistrationAuthorityCommandHandler.php | 1 +
.../EventSourcing/SensitiveDataMessage.php | 6 +-
.../SensitiveDataMessageRepository.php | 4 +-
.../SensitiveData/SensitiveData.php | 31 ++-------
.../InstitutionConfigurationProcessorTest.php | 6 +-
.../EventHandling/BufferedEventBusTest.php | 3 +-
.../IdentityCommandHandlerMoveTokenTest.php | 6 +-
...tyCommandHandlerSelfAssertedTokensTest.php | 29 ++++----
.../IdentityCommandHandlerTest.php | 57 +++++++--------
...egistrationAuthorityCommandHandlerTest.php | 5 +-
.../SecondFactorRevocationTest.php | 18 ++---
.../Tests/Pipeline/AuthorizingStageTest.php | 2 +-
.../Tests/Pipeline/ValidationStageTest.php | 3 +-
.../Tests/Value/InstitutionTest.php | 2 -
...InstitutionConfigurationControllerTest.php | 4 --
...nfigureInstitutionRequestValidatorTest.php | 6 +-
...IdentityWithYubikeySecondFactorCommand.php | 6 +-
.../Console/Command/ReplayEventsCommand.php | 14 ++--
.../EventSourcing/DBALEventHydrator.php | 27 +++-----
.../MappedInstitutionConfiguration.php | 14 ----
.../Resources/config/console_commands.yml | 2 +-
.../Service/EventStreamReplayer.php | 1 -
.../Service/TransactionHelper.php | 4 +-
.../VerifiedSecondFactorReminderService.php | 14 ++--
...erifiedSecondFactorReminderServiceTest.php | 13 ++--
40 files changed, 199 insertions(+), 225 deletions(-)
diff --git a/composer.json b/composer.json
index c7fb61999..85a565d71 100644
--- a/composer.json
+++ b/composer.json
@@ -54,17 +54,19 @@
"symfony/validator": "6.4.*",
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3",
- "twig/twig": "^3"
+ "twig/twig": "^3",
+ "ext-pdo": "*"
},
"require-dev": {
"doctrine/data-fixtures": "~1.7",
"doctrine/doctrine-fixtures-bundle": "^3.5.1",
"liip/test-fixtures-bundle": "^2.7",
- "mockery/mockery": "^1.6",
+ "mockery/mockery": "1.7.x-dev",
"moontoast/math": "^1.2",
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.11.x-dev",
+ "phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.5",
"sebastian/phpcpd": "^6.0",
diff --git a/composer.lock b/composer.lock
index b0250f427..5214ee37d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "83a193d6a8d10f551e177773546928f4",
+ "content-hash": "668bf259b1e063066c54e7be27f14c3c",
"packages": [
{
"name": "beberlei/assert",
@@ -9121,16 +9121,16 @@
},
{
"name": "mockery/mockery",
- "version": "1.6.7",
+ "version": "1.7.x-dev",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06"
+ "reference": "3f8d3ff1ffe4c552d45c5690c6d825e9310769bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06",
- "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/3f8d3ff1ffe4c552d45c5690c6d825e9310769bf",
+ "reference": "3f8d3ff1ffe4c552d45c5690c6d825e9310769bf",
"shasum": ""
},
"require": {
@@ -9142,8 +9142,7 @@
"phpunit/phpunit": "<8.0"
},
"require-dev": {
- "phpunit/phpunit": "^8.5 || ^9.6.10",
- "symplify/easy-coding-standard": "^12.0.8"
+ "phpunit/phpunit": ">=9.6.11 <10.4"
},
"type": "library",
"autoload": {
@@ -9200,7 +9199,7 @@
"security": "https://github.com/mockery/mockery/security/advisories",
"source": "https://github.com/mockery/mockery"
},
- "time": "2023-12-10T02:24:34+00:00"
+ "time": "2023-10-01T17:31:30+00:00"
},
{
"name": "moontoast/math",
@@ -10015,6 +10014,56 @@
],
"time": "2024-03-13T14:17:45+00:00"
},
+ {
+ "name": "phpstan/phpstan-mockery",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-mockery.git",
+ "reference": "88ae85931768efd3aaf3cce4cb9cb54c4d157d03"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/88ae85931768efd3aaf3cce4cb9cb54c4d157d03",
+ "reference": "88ae85931768efd3aaf3cce4cb9cb54c4d157d03",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.10"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.2.4",
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.0",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan Mockery extension",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-mockery/issues",
+ "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.2"
+ },
+ "time": "2024-01-10T13:50:05+00:00"
+ },
{
"name": "phpstan/phpstan-symfony",
"version": "1.3.8",
@@ -12028,6 +12077,7 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
+ "mockery/mockery": 20,
"phpstan/phpstan": 20
},
"prefer-stable": false,
@@ -12035,7 +12085,8 @@
"platform": {
"php": "^8.2",
"ext-gmp": "*",
- "ext-json": "*"
+ "ext-json": "*",
+ "ext-pdo": "*"
},
"platform-dev": [],
"platform-overrides": {
diff --git a/src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php
index 052b12e5d..889565b47 100644
--- a/src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php
@@ -20,17 +20,11 @@
class NewConfigurationCreatedEvent extends ConfigurationEvent
{
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self($data['id']);
}
- /**
- * @return array
- */
public function serialize(): array
{
return ['id' => $this->id];
diff --git a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
index a525a60a0..5b472c4d4 100644
--- a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
+++ b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
@@ -18,15 +18,11 @@
namespace Surfnet\Stepup\Identity\Entity;
-use Surfnet\Stepup\Configuration\Value\InstitutionRole;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection as Institutions;
use Surfnet\Stepup\Identity\Value\Institution;
final class InstitutionCollection
{
- /**
- * @var InstitutionRole[]
- */
private $institutions = [];
public function set(Institution $institution): void
@@ -41,17 +37,11 @@ public function update(Institutions $institutions): void
}
}
- /**
- * @return Institution
- */
- public function get(Institution $institution)
+ public function get(Institution $institution): Institution
{
return $this->institutions[(string)$institution];
}
- /**
- * @return Institution
- */
public function exists(Institution $institution): bool
{
return array_key_exists((string)$institution, $this->institutions);
@@ -62,18 +52,15 @@ public function remove(Institution $institution): void
unset($this->institutions[(string)$institution]);
}
- /**
- * @return int
- */
public function count(): int
{
return count($this->institutions);
}
/**
- * @return InstitutionRole[]
+ * @return Institution[]
*/
- public function institutions()
+ public function institutions(): array
{
return $this->institutions;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
index d18f8cf17..09ab832cb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
@@ -20,6 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection;
use Surfnet\Stepup\Identity\Value\CommonName;
@@ -46,21 +47,21 @@ class AuthorizationContextServiceTest extends TestCase
private AuthorizationContextService $service;
/**
- * @var IdentityService|m\Mock
+ * @var IdentityService|MockInterface
*/
private $identityService;
/**
- * @var SraaService|m\Mock
+ * @var SraaService|MockInterface
*/
private $sraaService;
/**
- * @var AuthorizationRepository|m\Mock
+ * @var AuthorizationRepository|MockInterface
*/
private $authorizationRepository;
/**
- * @var m\Mock&ConfiguredInstitutionRepository
+ * @var MockInterface|ConfiguredInstitutionRepository
*/
private $institutionRepo;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index a7aecb99d..d29609355 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -151,8 +151,6 @@ public function test_shared_ra_and_ss_commands_are_correctly_authorized(): void
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
public function a_sraa_should_be_able_to_execute_all_commands($file, Command $command): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
index d00dc4392..f49a56fe3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
@@ -20,6 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\Mock;
use PHPUnit\Framework\TestCase as TestCase;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionRole;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
index b422d2008..127486a42 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
@@ -62,6 +62,7 @@ public function it_can_convert_command_name_notation($expectedCommandClass, stri
{
$command = ['command' => ['name' => $commandName, 'uuid' => 'abcdef', 'payload' => new stdClass]];
+ /** @var Request&m\Mock $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
index 66cdaeb27..19597b425 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
@@ -33,7 +33,7 @@ class InstitutionParamConverterTest extends UnitTest
use MockeryPHPUnitIntegration;
/**
- * @var MockInterface
+ * @var MockInterface&Request
*/
private $request;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
index fd2ec28a7..7d37d865a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
@@ -113,8 +113,7 @@ public function test_deprovision_does_not_deprovision_when_user_is_not_found():
->andReturnNull();
$this->pipeline
->shouldNotHaveReceived('process');
- $data = $this->deprovisionService->deprovision('urn:collab:person:example.com:maynard_keenan');
- $this->assertNull($data);
+ $this->deprovisionService->deprovision('urn:collab:person:example.com:maynard_keenan');
}
public function test_deprovision_method_performs_the_right_to_be_forgotten_command(): void
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
index e4e3a091c..49004bdbc 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\CommandHandler;
use Broadway\CommandHandling\SimpleCommandHandler;
+use Broadway\Domain\AggregateRoot;
use Broadway\Repository\AggregateNotFoundException;
use Surfnet\Stepup\Configuration\Configuration;
use Surfnet\Stepup\Configuration\EventSourcing\ConfigurationRepository;
@@ -43,13 +44,12 @@ public function handleUpdateConfigurationCommand(UpdateConfigurationCommand $com
$this->repository->save($configuration);
}
- /**
- * @return null|\Surfnet\Stepup\Configuration\Api\Configuration
- */
- private function getConfiguration()
+ private function getConfiguration(): ?Configuration
{
try {
- return $this->repository->load(Configuration::CONFIGURATION_ID);
+ /** @var Configuration $configuration */
+ $configuration = $this->repository->load(Configuration::CONFIGURATION_ID);
+ return $configuration;
} catch (AggregateNotFoundException) {
return null;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/InstitutionConfigurationCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/InstitutionConfigurationCommandHandler.php
index 1bcd65ef7..49f83ce95 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/InstitutionConfigurationCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/InstitutionConfigurationCommandHandler.php
@@ -183,7 +183,8 @@ public function handleRemoveInstitutionConfigurationByUnnormalizedIdCommand(
): void {
$institution = new Institution($command->institution);
- $institutionConfigurationId = InstitutionConfigurationId::from($institution);
+ $institutionConfigurationId = InstitutionConfigurationId::normalizedFrom($institution);
+ /** @var InstitutionConfiguration $institutionConfiguration */
$institutionConfiguration = $this->repository->load(
$institutionConfigurationId->getInstitutionConfigurationId(),
);
@@ -197,15 +198,17 @@ public function handleRemoveInstitutionConfigurationByUnnormalizedIdCommand(
* @deprecated Should be used until existing institution configurations have been migrated to using normalized ids
*
*/
- private function loadInstitutionConfigurationFor(Institution $institution)
+ private function loadInstitutionConfigurationFor(Institution $institution): InstitutionConfiguration
{
try {
$institutionConfigurationId = InstitutionConfigurationId::normalizedFrom($institution);
+ /** @var InstitutionConfiguration $institutionConfiguration */
$institutionConfiguration = $this->repository->load(
$institutionConfigurationId->getInstitutionConfigurationId(),
);
} catch (AggregateNotFoundException) {
$institutionConfigurationId = InstitutionConfigurationId::from($institution);
+ /** @var InstitutionConfiguration $institutionConfiguration */
$institutionConfiguration = $this->repository->load(
$institutionConfigurationId->getInstitutionConfigurationId(),
);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index aff80d558..30b148fe0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -24,6 +24,7 @@
use Broadway\EventHandling\EventListener as EventListenerInterface;
use Doctrine\ORM\EntityManagerInterface;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\Exception;
+use Throwable;
class BufferedEventBus implements EventBusInterface
@@ -54,7 +55,7 @@ public function subscribe(EventListenerInterface $eventListener): void
}
/**
- * @throws Exception
+ * @throws Throwable
*/
public function publish(DomainEventStreamInterface $domainMessages): void
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
index 09f92be0e..d9a503bc4 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
@@ -25,7 +25,6 @@
class AppointRoleCommand extends AbstractCommand implements RaExecutable
{
/**
- *
* @var string
*/
#[Assert\NotBlank]
@@ -33,7 +32,6 @@ class AppointRoleCommand extends AbstractCommand implements RaExecutable
public $identityId;
/**
- *
* @var
*/
#[Assert\NotBlank]
@@ -41,16 +39,12 @@ class AppointRoleCommand extends AbstractCommand implements RaExecutable
public $role;
/**
- *
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
public $raInstitution;
- /**
- * @inheritDoc
- */
public function getRaInstitution()
{
return $this->raInstitution;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
index a2a77123b..972dbb66b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
@@ -399,8 +399,8 @@ public function handleSelfVetSecondFactorCommand(SelfVetSecondFactorCommand $com
public function handleMigrateVettedSecondFactorCommand(MigrateVettedSecondFactorCommand $command): void
{
/** @var IdentityApi $sourceIdentity */
- /** @var IdentityApi $targetIdentity */
$sourceIdentity = $this->eventSourcedRepository->load(new IdentityId($command->sourceIdentityId));
+ /** @var IdentityApi $targetIdentity */
$targetIdentity = $this->eventSourcedRepository->load(new IdentityId($command->targetIdentityId));
// Check if second factor type is allowed by destination institution
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
index 136952a54..0fbb1575c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
@@ -115,6 +115,7 @@ public function handleRetractRegistrationAuthorityCommand(RetractRegistrationAut
public function handleSaveVettingTypeHintCommand(SaveVettingTypeHintCommand $command): void
{
+ /** @var Identity $identity */
$identity = $this->repository->load(new IdentityId($command->identityId));
$collection = $this->vettingTypeHintService->collectionFrom($command->hints);
$identity->saveVettingTypeHints(
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
index d5b256908..e71080f57 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
@@ -28,11 +28,7 @@ class SensitiveDataMessage
private readonly int $playhead;
- /**
- * @param IdentityId $identityId
- * @param int $playhead The associated broadway domain message's playhead.
- */
- public function __construct(string $identityId, $playhead, private SensitiveData $sensitiveData)
+ public function __construct(IdentityId $identityId, int $playhead, private SensitiveData $sensitiveData)
{
if (!is_int($playhead)) {
throw InvalidArgumentException::invalidType('int', 'playhead', $playhead);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
index fc2124445..84e5c1ee5 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
@@ -35,8 +35,6 @@ public function __construct(private readonly Connection $connection)
/**
* Finds all sensitive data records for a given Identity, ordered by playhead.
- *
- * @return SensitiveDataMessageStream
*/
public function findByIdentityId(IdentityId $identityId): SensitiveDataMessageStream
{
@@ -45,7 +43,7 @@ public function findByIdentityId(IdentityId $identityId): SensitiveDataMessageSt
WHERE identity_id = :identity_id
ORDER BY playhead ASC';
- $rows = $this->connection->fetchAll($sql, ['identity_id' => (string)$identityId]);
+ $rows = $this->connection->fetchAllAssociative($sql, ['identity_id' => (string)$identityId]);
$messages = array_map(fn(array $row): SensitiveDataMessage => new SensitiveDataMessage(
$identityId,
(int)$row['playhead'],
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
index 2c7d9bb39..638e04bcb 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
@@ -50,9 +50,6 @@ class SensitiveData implements SerializableInterface
private ?RecoveryTokenIdentifier $recoveryTokenIdentifier = null;
- /**
- * @return SensitiveData
- */
public function withCommonName(CommonName $commonName): static
{
$clone = clone $this;
@@ -61,9 +58,6 @@ public function withCommonName(CommonName $commonName): static
return $clone;
}
- /**
- * @return SensitiveData
- */
public function withEmail(Email $email): static
{
$clone = clone $this;
@@ -72,9 +66,6 @@ public function withEmail(Email $email): static
return $clone;
}
- /**
- * @return SensitiveData
- */
public function withSecondFactorIdentifier(
SecondFactorIdentifier $secondFactorIdentifier,
SecondFactorType $secondFactorType,
@@ -107,8 +98,6 @@ public function withVettingType(VettingType $vettingType): self
/**
* Returns an instance in which all sensitive data is forgotten.
- *
- * @return SensitiveData
*/
public function forget(): self
{
@@ -118,26 +107,17 @@ public function forget(): self
return $forgotten;
}
- /**
- * @return CommonName
- */
- public function getCommonName()
+ public function getCommonName(): CommonName
{
return $this->commonName ?: CommonName::unknown();
}
- /**
- * @return Email
- */
- public function getEmail()
+ public function getEmail(): Email
{
return $this->email ?: Email::unknown();
}
- /**
- * @return SecondFactorIdentifier
- */
- public function getSecondFactorIdentifier()
+ public function getSecondFactorIdentifier(): SecondFactorIdentifier
{
return $this->secondFactorIdentifier ?: SecondFactorIdentifierFactory::unknownForType($this->secondFactorType);
}
@@ -153,10 +133,7 @@ public function getRecoveryTokenIdentifier(): ?RecoveryTokenIdentifier
return null;
}
- /**
- * @return VettingType
- */
- public function getVettingType()
+ public function getVettingType(): VettingType
{
return $this->vettingType ?: new UnknownVettingType();
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
index aaa325c20..2618eabc7 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
@@ -44,9 +44,6 @@ class InstitutionConfigurationProcessorTest extends TestCase
private $pipelineMock;
- /**
- * @return Mockery\MockInterface
- */
public function setUp(): void
{
$this->pipelineMock = Mockery::mock(Pipeline::class);
@@ -110,8 +107,7 @@ public function no_create_institution_configuration_command_is_processed_when_an
->andReturn(true);
$this->pipelineMock
- ->shouldReceive('process')
- ->never();
+ ->shouldNotHaveReceived('process');
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
index d39475f9e..9ad95924e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
@@ -41,7 +41,7 @@ public function it_buffers_events(): void
{
$event = $this->createDummyDomainMessage(null);
$listener = m::mock(EventListener::class)
- ->shouldReceive('handle')->never()
+ ->shouldNotHaveReceived('handle')
->getMock();
$bus = new BufferedEventBus($this->getDummyEntityManager());
@@ -124,7 +124,6 @@ public function an_event_caused_by_an_event_in_the_current_buffer_being_flushed_
}
/**
- * @param mixed $payload
* @return DomainMessage
*/
private function createDummyDomainMessage(?string $payload): DomainMessage
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
index 66c2d4855..3a2e44c48 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
@@ -448,7 +448,7 @@ public function test_can_not_be_moved_if_already_present_as_vetted_token(): void
$targetYubikeySecFacId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -556,7 +556,7 @@ public function test_can_not_be_moved_if_already_present_as_verified_token(): vo
$targetYubikeySecFacId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -652,7 +652,7 @@ public function test_can_not_be_moved_if_already_present_as_unverified_token():
$targetYubikeySecFacId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
index d66923cd9..6ad9b6680 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
@@ -23,6 +23,7 @@
use Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Mockery as m;
+use Mockery\MockInterface;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList;
use Surfnet\Stepup\Configuration\Value\SelfAssertedTokensOption;
@@ -93,32 +94,32 @@ class IdentityCommandHandlerSelfAssertedTokensTest extends CommandHandlerTest
private static int $window = 3600;
/**
- * @var AllowedSecondFactorListService|m\MockInterface
+ * @var AllowedSecondFactorListService|MockInterface
*/
private $allowedSecondFactorListServiceMock;
/**
- * @var m\MockInterface|IdentityProjectionRepository
+ * @var MockInterface|IdentityProjectionRepository
*/
private $identityProjectionRepository;
/**
- * @var SecondFactorTypeService|m\MockInterface
+ * @var SecondFactorTypeService|MockInterface
*/
private $secondFactorTypeService;
/**
- * @var SecondFactorProvePossessionHelper|m\MockInterface
+ * @var SecondFactorProvePossessionHelper|MockInterface
*/
private $secondFactorProvePossessionHelper;
/**
- * @var InstitutionConfigurationOptionsService $configService
+ * @var InstitutionConfigurationOptionsService|MockInterface
*/
private $configService;
/**
- * @var LoaResolutionService
+ * @var LoaResolutionService|MockInterface
*/
private $loaResolutionService;
@@ -147,7 +148,7 @@ class IdentityCommandHandlerSelfAssertedTokensTest extends CommandHandlerTest
*/
private Locale $preferredLocale;
/**
- * @var RecoveryTokenSecretHelper|m\MockInterface
+ * @var RecoveryTokenSecretHelper|MockInterface
*/
private $recoveryTokenSecretHelper;
@@ -548,7 +549,7 @@ public function test_a_token_can_be_registered_self_asserted(): void
$yubikeyPublicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -630,7 +631,7 @@ public function test_self_asserted_token_registration_requires_possession_of_rec
$yubikeyPublicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -739,7 +740,7 @@ public function test_a_sat_token_can_be_used_to_self_vet_a_token(): void
$yubikeyPublicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -788,7 +789,7 @@ public function test_a_sat_token_can_be_used_to_self_vet_a_token(): void
$phoneIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -892,7 +893,7 @@ public function test_sat_not_allowed_when_one_vetted_token_is_identity_vetted():
$yubikeyPublicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -941,7 +942,7 @@ public function test_sat_not_allowed_when_one_vetted_token_is_identity_vetted():
$phoneIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -982,7 +983,7 @@ public function test_sat_not_allowed_when_one_vetted_token_is_identity_vetted():
$gsspIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
index 863592620..f98b8717b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
@@ -26,6 +26,7 @@
use Hamcrest\Matchers;
use Mockery as m;
use Mockery\Mock;
+use Mockery\MockInterface;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList;
use Surfnet\Stepup\DateTime\DateTime;
@@ -100,40 +101,40 @@ class IdentityCommandHandlerTest extends CommandHandlerTest
private static int $window = 3600;
/**
- * @var AllowedSecondFactorListService|m\MockInterface
+ * @var AllowedSecondFactorListService|MockInterface
*/
private $allowedSecondFactorListServiceMock;
/**
- * @var m\MockInterface|IdentityProjectionRepository
+ * @var MockInterface|IdentityProjectionRepository
*/
private $identityProjectionRepository;
/**
- * @var SecondFactorTypeService|m\MockInterface
+ * @var SecondFactorTypeService|MockInterface
*/
private $secondFactorTypeService;
/**
- * @var SecondFactorProvePossessionHelper|m\MockInterface
+ * @var SecondFactorProvePossessionHelper|MockInterface
*/
private $secondFactorProvePossessionHelper;
/**
- * @var InstitutionConfigurationOptionsService $configService
+ * @var InstitutionConfigurationOptionsService|MockInterface $configService
*/
private $configService;
/**
- * @var LoaResolutionService
+ * @var LoaResolutionService|MockInterface
*/
private $loaResolutionService;
+
/**
- * @var RegistrationMailService|Mock
+ * @var RegistrationMailService|MockInterface
*/
private $registrationMailService;
-
public function setUp(): void
{
$this->allowedSecondFactorListServiceMock = m::mock(AllowedSecondFactorListService::class);
@@ -310,7 +311,7 @@ public function a_yubikey_possession_can_be_proven(): void
$pubId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -420,7 +421,7 @@ public function yubikey_possession_cannot_be_proven_twice(): void
$pubId1,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -487,7 +488,7 @@ public function a_phone_possession_can_be_proven(): void
$phoneNumber,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -617,7 +618,7 @@ public function a_gssf_possession_can_be_proven(): void
$gssfId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
$nonce,
@@ -739,7 +740,7 @@ public function a_u2f_device_possession_can_be_proven(): void
$keyHandle,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -848,7 +849,7 @@ public function phone_possession_cannot_be_proven_twice(): void
$phoneNumber1,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -908,7 +909,7 @@ public function cannot_prove_possession_of_arbitrary_second_factor_type_twice():
$publicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -963,7 +964,7 @@ public function an_unverified_second_factors_email_can_be_verified(): void
$secondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1031,7 +1032,7 @@ public function a_verified_second_factors_email_cannot_be_verified(): void
$secondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1095,7 +1096,7 @@ public function cannot_verify_an_email_after_the_verification_window_has_closed(
$publicId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
new DateTime(new CoreDateTime('-2 days')),
),
'nonce',
@@ -1294,7 +1295,7 @@ public function a_second_factor_can_be_vetted(): void
$registrantSecFacIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1387,7 +1388,7 @@ public function a_second_factor_cannot_be_vetted_without_a_secure_enough_vetted_
$authorityPhoneNo,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1437,7 +1438,7 @@ public function a_second_factor_cannot_be_vetted_without_a_secure_enough_vetted_
$registrantPubId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1553,7 +1554,7 @@ public function a_second_factor_can_be_vetted_without_a_physical_proven_possessi
$registrantSecFacIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1654,7 +1655,7 @@ public function a_second_factor_cannot_be_vetted_without_physical_prove_of_posse
$authorityPhoneNo,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1704,7 +1705,7 @@ public function a_second_factor_cannot_be_vetted_without_physical_prove_of_posse
$registrantPubId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1922,7 +1923,7 @@ public function a_second_factor_can_be_self_vetted(): void
$registrantSecPubId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -1962,7 +1963,7 @@ public function a_second_factor_can_be_self_vetted(): void
$authorityPhoneNo,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -2051,7 +2052,7 @@ public function a_second_factor_can_be_self_vetted_using_old_authoringSecondFact
$registrantSecPubId,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -2091,7 +2092,7 @@ public function a_second_factor_can_be_self_vetted_using_old_authoringSecondFact
$authorityPhoneNo,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
index 033c18ec9..c6f7908cc 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
@@ -24,6 +24,7 @@
use Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Mockery as m;
+use Mockery\MockInterface;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Configuration\EventSourcing\InstitutionConfigurationRepository;
use Surfnet\Stepup\Configuration\InstitutionConfiguration;
@@ -63,12 +64,12 @@ class RegistrationAuthorityCommandHandlerTest extends CommandHandlerTest
{
/**
- * @var InstitutionConfigurationRepository
+ * @var InstitutionConfigurationRepository|MockInterface
*/
private $institutionConfigurationRepositoryMock;
/**
- * @var InstitutionConfiguration
+ * @var InstitutionConfiguration|MockInterface
*/
private $institutionConfiguration;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php
index 5a28dce09..80253a852 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php
@@ -139,7 +139,7 @@ public function an_identity_can_revoke_its_own_unverified_second_factor(): void
$secondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -195,7 +195,7 @@ public function an_identity_can_revoke_its_own_verified_second_factor(): void
$secondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -265,7 +265,7 @@ public function an_identity_can_revoke_its_own_vetted_second_factor(): void
$secondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -378,7 +378,7 @@ public function a_registration_authority_can_revoke_an_unverified_second_factor(
$registrantSecondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -465,7 +465,7 @@ public function a_registration_authority_can_revoke_a_verified_second_factor():
$registrantSecondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -564,7 +564,7 @@ public function a_registration_authority_can_revoke_a_vetted_second_factor(): vo
$registrantSecondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -680,7 +680,7 @@ public function a_registration_authority_can_revoke_a_possession_proved_skipped_
$registrantSecondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -802,7 +802,7 @@ public function a_registration_authority_can_revoke_one_of_multiple_vetted_secon
$registrantSecondFactorIdentifier,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
@@ -842,7 +842,7 @@ public function a_registration_authority_can_revoke_one_of_multiple_vetted_secon
$registrantSecondFactorIdentifier2,
true,
EmailVerificationWindow::createFromTimeFrameStartingAt(
- TimeFrame::ofSeconds(static::$window),
+ TimeFrame::ofSeconds(self::$window),
DateTime::now(),
),
'nonce',
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
index 7602abdf2..b464443d9 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
@@ -60,7 +60,7 @@ public function setUp(): void
public function when_a_command_has_no_marker_interface_authorization_is_granted_by_default(): void
{
$command = m::mock(Command::class);
- $this->authorizationChecker->shouldReceive('isGranted')->never();
+ $this->authorizationChecker->shouldNotHaveReceived('isGranted');
$authorizingStage = new AuthorizingStage($this->logger, $this->authorizationChecker);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
index 8a8a68415..3cce1632e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
@@ -62,7 +62,8 @@ public function it_throws_an_exception_when_validation_fails(): void
$command = m::mock(Command::class);
$violations = m::mock(ConstraintViolationListInterface::class)
- ->shouldReceive('count')->with()->andReturn(1)
+ ->shouldReceive('count')->with()->andReturn(1);
+ $violations
->shouldReceive('getIterator')->with()->andReturn(new ArrayIterator())
->getMock();
$validator = m::mock(ValidatorInterface::class)
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
index d0ce81bc6..9d5f0966b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
@@ -31,8 +31,6 @@ class InstitutionTest extends UnitTest
/**
* @test
* @dataProvider nonStringOrNonEmptyStringProvider
- *
- * @param mixed $invalidValue
*/
public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
index 6893a1cf6..bc41ec202 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
@@ -20,7 +20,6 @@
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
-use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
@@ -29,9 +28,6 @@ class InstitutionConfigurationControllerTest extends WebTestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var Client
- */
private KernelBrowser $client;
/**
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
index 4a6161588..7dfae19b4 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
@@ -183,10 +183,10 @@ public function validation_for_existing_institutions_is_done_case_insensitively(
];
$builder = Mockery::mock(ConstraintViolationBuilderInterface::class);
- $builder->shouldReceive('addViolation')->never();
+ $builder->shouldNotHaveReceived('addViolation');
$context = Mockery::mock(ExecutionContextInterface::class);
- $context->shouldReceive('buildViolation')->never();
+ $context->shouldNotHaveReceived('buildViolation');
$configuredInstitutionServiceMock = Mockery::mock(ConfiguredInstitutionService::class);
$configuredInstitutionServiceMock
@@ -238,7 +238,7 @@ public function valid_reconfigure_institution_requests_do_not_cause_any_violatio
->andReturn([$existingInstitution]);
$context = Mockery::mock(ExecutionContextInterface::class);
- $context->shouldReceive('buildViolation')->never();
+ $context->shouldNotHaveReceived('buildViolation');
$secondFactorTypeServiceMock = Mockery::mock(SecondFactorTypeService::class);
$secondFactorTypeServiceMock->shouldReceive('getAvailableSecondFactorTypes')->andReturn(['yubikey', 'sms']);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index f70a9e666..a43404c5b 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -18,13 +18,12 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Console\Command;
-use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Exception;
use Ramsey\Uuid\Uuid;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\BootstrapIdentityWithYubikeySecondFactorCommand as BootstrapIdentityWithYubikeySecondFactorIdentityCommand;
-use Surfnet\StepupMiddleware\MiddlewareBundle\Service\BootstrapCommandService;
use Surfnet\StepupMiddleware\MiddlewareBundle\Service\TransactionHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@@ -55,8 +54,7 @@ protected function configure(): void
}
public function __construct(
- private readonly BootstrapCommandService $bootstrapService,
- private readonly ServiceEntityRepository $projectionRepository,
+ private readonly IdentityRepository $projectionRepository,
private readonly TransactionHelper $transactionHelper,
) {
parent::__construct();
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
index e0940c55a..66ade8006 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
@@ -27,7 +27,6 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
-use Symfony\Component\HttpKernel\KernelInterface;
#[AsCommand(
name: 'middleware:event:replay',
@@ -36,8 +35,10 @@
)]
class ReplayEventsCommand extends Command
{
- public function __construct(private readonly EventStreamReplayer $replayer)
- {
+ public function __construct(
+ private readonly EventStreamReplayer $replayer,
+ private readonly string $environment,
+ ) {
parent::__construct();
}
@@ -55,16 +56,13 @@ protected function configure(): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
- /** @var KernelInterface $kernel */
- $kernel = $this->getApplication()->getKernel();
- $environment = $kernel->getEnvironment();
/** @var FormatterHelper $formatter */
$formatter = $this->getHelper('formatter');
// Be careful, when using the no-interaction option you will not get the confirmation question
$noInteraction = $input->getOption('no-interaction');
- if (!in_array($environment, ['dev_event_replay', 'prod_event_replay', 'smoketest_event_replay'])) {
+ if (!in_array($this->environment, ['dev_event_replay', 'prod_event_replay', 'smoketest_event_replay'])) {
$output->writeln(
$formatter->formatBlock(
[
@@ -82,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
/** @var QuestionHelper $interrogator */
$interrogator = $this->getHelper('question');
- if ($environment === 'prod_event_replay') {
+ if ($this->environment === 'prod_event_replay') {
$wantToRunOnProd = new ConfirmationQuestion(
'You have selected to run this on production. Have you disabled all access to the production '
. 'environment? (y/N)',
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
index 3cf4a3dda..f4e59a9b7 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
@@ -23,7 +23,6 @@
use Broadway\Domain\DomainMessage;
use Broadway\Serializer\SimpleInterfaceSerializer;
use Doctrine\DBAL\Connection;
-use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\Statement;
use PDO;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\Forgettable;
@@ -49,35 +48,27 @@ public function __construct(
) {
}
- /**
- * @return string
- * @throws DBALException
- */
- public function getCount()
+ public function getCount(): string
{
$statement = $this->connection->prepare('SELECT COUNT(1) AS cnt FROM ' . $this->eventStreamTableName);
- $statement->execute();
+ $result = $statement->executeQuery();
- $row = $statement->fetch();
+ $row = $result->fetchAssociative();
return $row['cnt'];
}
- /**
- * @param int $limit
- * @param int $offset
- * @return DomainEventStream
- */
- public function getFromTill($limit, $offset): DomainEventStream
+ public function getFromTill(int $limit, int $offset): DomainEventStream
{
$statement = $this->prepareLoadStatement();
$statement->bindValue('limit', $limit, PDO::PARAM_INT);
$statement->bindValue('offset', $offset, PDO::PARAM_INT);
- $statement->execute();
+ $result = $statement->executeQuery();
$events = [];
- while ($row = $statement->fetch()) {
+
+ while ($row = $result->fetchAssociative()) {
$events[] = $this->deserializeEvent($row);
}
@@ -101,10 +92,10 @@ public function fetchByEventTypes($eventTypes): DomainEventStream
);
$statement = $this->connection->prepare($query);
- $statement->execute($eventTypes);
+ $results = $statement->executeQuery($eventTypes);
$events = [];
- while ($row = $statement->fetch()) {
+ foreach ($results->fetchAssociative() as $row) {
$events[] = $this->deserializeEvent($row);
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php
index 38b1009be..b30a48c62 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php
@@ -25,7 +25,6 @@
use Surfnet\Stepup\Configuration\Value\ShowRaaContactInformationOption;
use Surfnet\Stepup\Configuration\Value\UseRaLocationsOption;
use Surfnet\Stepup\Configuration\Value\VerifyEmailOption;
-use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\RaLocation;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\AddRaLocationCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\CreateInstitutionConfigurationCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\ReconfigureInstitutionConfigurationOptionsCommand;
@@ -33,10 +32,6 @@
final readonly class MappedInstitutionConfiguration
{
- /**
- * @param SelfVetOption $setVetOption
- * @param RaLocation[] $raLocations
- */
public function __construct(
private Institution $institution,
private UseRaLocationsOption $useRaLocationsOption,
@@ -48,9 +43,6 @@ public function __construct(
) {
}
- /**
- * @return RemoveInstitutionConfigurationByUnnormalizedIdCommand
- */
public function inferRemoveInstitutionConfigurationByIdCommand(): RemoveInstitutionConfigurationByUnnormalizedIdCommand
{
$command = new RemoveInstitutionConfigurationByUnnormalizedIdCommand();
@@ -60,9 +52,6 @@ public function inferRemoveInstitutionConfigurationByIdCommand(): RemoveInstitut
return $command;
}
- /**
- * @return CreateInstitutionConfigurationCommand
- */
public function inferCreateInstitutionConfigurationCommand(): CreateInstitutionConfigurationCommand
{
$command = new CreateInstitutionConfigurationCommand();
@@ -72,9 +61,6 @@ public function inferCreateInstitutionConfigurationCommand(): CreateInstitutionC
return $command;
}
- /**
- * @return ReconfigureInstitutionConfigurationOptionsCommand
- */
public function inferReconfigureInstitutionConfigurationCommand(): ReconfigureInstitutionConfigurationOptionsCommand
{
$command = new ReconfigureInstitutionConfigurationOptionsCommand();
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
index 874251073..64629028d 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
@@ -30,12 +30,12 @@ services:
- { name: 'console.command', command: 'middleware:event:replay' }
arguments:
- "@middleware.event_replay.event_stream_replayer"
+ - "%app_env%"
Surfnet\StepupMiddleware\MiddlewareBundle\Console\Command\BootstrapIdentityWithYubikeySecondFactorCommand:
tags:
- { name: 'console.command', command: 'middleware:bootstrap:identity-with-yubikey' }
arguments:
- - '@Surfnet\StepupMiddleware\MiddlewareBundle\Service\BootstrapCommandService'
- "@surfnet_stepup_middleware_api.repository.identity"
- '@Surfnet\StepupMiddleware\MiddlewareBundle\Service\TransactionHelper'
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
index 624f8d05a..0ae8991e6 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
@@ -109,7 +109,6 @@ public function replayEvents(OutputInterface $output, $increments): void
$replayProgress->setMessage($defaultMessage);
for ($count = 0; $count < $totalEvents; $count += $increments) {
- /** @var DomainEventStream $eventStream */
$eventStream = $this->eventHydrator->getFromTill($increments, $count);
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
index f0ab19800..4e7f73854 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
@@ -18,15 +18,15 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Broadway\EventHandling\EventBus as EventBusInterface;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command as MiddlewareCommand;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Pipeline;
final readonly class TransactionHelper
{
public function __construct(
private Pipeline $pipeline,
- private EventBusInterface $eventBus,
+ private BufferedEventBus $eventBus,
private DBALConnectionHelper $connection,
) {
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderService.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderService.php
index b20ac4713..0954262fe 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderService.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderService.php
@@ -19,6 +19,7 @@
use Assert\Assertion;
use DateTime;
+use Exception;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository;
@@ -39,10 +40,7 @@ public function __construct(
) {
}
- /**
- * @param bool $dryRun
- */
- public function sendReminders(DateTime $date, $dryRun): void
+ public function sendReminders(DateTime $date, bool $dryRun): void
{
$this->logger->info(
sprintf(
@@ -60,7 +58,13 @@ public function sendReminders(DateTime $date, $dryRun): void
$this->logger->info(sprintf('%d token reminder(s) will be sent', count($tokenInformationCollection)));
foreach ($tokenInformationCollection as $tokenInformation) {
- $numberSent = $dryRun ? 1 : $this->mailService->sendReminder($tokenInformation);
+ try {
+ $this->mailService->sendReminder($tokenInformation);
+ $wasSent = 1;
+ } catch (Exception) {
+ $wasSent = 0;
+ }
+ $numberSent = $dryRun ? 1 : $wasSent;
$this->logger->info(
sprintf(
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
index 6fc86eb36..d61a2441a 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
@@ -20,7 +20,7 @@
use DateTime;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
-use Mockery\Mock;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
@@ -40,21 +40,22 @@ class VerifiedSecondFactorReminderServiceTest extends TestCase
private VerifiedSecondFactorReminderService $service;
/**
- * @var VerifiedSecondFactorReminderMailService|Mock
+ * @var VerifiedSecondFactorReminderMailService|MockInterface
+
*/
private $mailService;
/**
- * @var LoggerInterface|Mock
+ * @var LoggerInterface|MockInterface
*/
private $logger;
/**
- * @var VerifiedSecondFactorRepository|Mock
+ * @var VerifiedSecondFactorRepository|MockInterface
*/
private $verifiedSecondFactorRepository;
/**
- * @var IdentityRepository|Mock
+ * @var IdentityRepository|MockInterface
*/
private $identityRepository;
@@ -104,7 +105,7 @@ public function test_one_token_reminders_sent(): void
$this->logger
->shouldReceive('info')
- ->once()
+ ->times()
->with('Sending reminders for date: 2018-01-01. dry run mode is disabled');
$tokens = $this->buildVerifiedSecondFactors(1, $date);
From 04b156a1bd147f815fc195e5772cbf62eecd9b05 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Mon, 18 Mar 2024 16:09:38 +0100
Subject: [PATCH 38/89] Remove dead method from VettingTypeHintController
The collection method was not callable via the router, the indication of
broken code sealed the deal. Removing it
---
.../Controller/VettingTypeHintController.php | 43 -------------------
1 file changed, 43 deletions(-)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
index 4f8649bb1..4eae40def 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
@@ -19,17 +19,11 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Controller;
use Psr\Log\LoggerInterface;
-use Surfnet\Stepup\Configuration\Value\InstitutionRole;
-use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
-use Surfnet\StepupMiddleware\ApiBundle\Authorization\Service\AuthorizationContextService;
use Surfnet\StepupMiddleware\ApiBundle\Exception\NotFoundException;
-use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RecoveryTokenQuery;
-use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Service\VettingTypeHintService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
-use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class VettingTypeHintController extends AbstractController
@@ -37,7 +31,6 @@ class VettingTypeHintController extends AbstractController
public function __construct(
private readonly VettingTypeHintService $service,
private readonly LoggerInterface $logger,
- private readonly AuthorizationContextService $authorizationService,
) {
}
@@ -56,40 +49,4 @@ public function get($institution): JsonResponse
}
return new JsonResponse($recoveryToken);
}
-
- public function collection(Request $request)
- {
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
- $this->logger->info(
- sprintf('Received search request for recovery tokens with params: %s', $request->getQueryString()),
- );
- $query = new RecoveryTokenQuery();
- $query->identityId = $request->get('identityId');
- $query->type = $request->get('type');
- $query->status = $request->get('status');
- $query->institution = $request->get('institution');
- $query->email = $request->get('email');
- $query->name = $request->get('name');
- $query->pageNumber = (int)$request->get('p', 1);
- $query->orderBy = $request->get('orderBy');
- $query->orderDirection = $request->get('orderDirection');
-
- $roles = $this->getUser()->getRoles();
- // Only apply the authorization context on non self service requests
- if (!in_array('ROLE_SS', $roles)) {
- $actorId = $request->get('actorId', $request->get('identityId'));
- $this->logger->info(sprintf('Executing query on behalf of %s', $actorId));
- $actorId = new IdentityId($actorId);
- $query->authorizationContext = $this->authorizationService->buildInstitutionAuthorizationContext(
- $actorId,
- new InstitutionRole(InstitutionRole::ROLE_USE_RA),
- );
- }
- $paginator = $this->service->search($query);
- $this->logger->info(sprintf('Found %d results', $paginator->count()));
-
- $filters = $this->service->getFilterOptions($query);
-
- return JsonCollectionResponse::fromPaginator($paginator, $filters);
- }
}
From 6305abcaff97b03e1934e9565614ddfae054b3c8 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Tue, 19 Mar 2024 11:40:39 +0100
Subject: [PATCH 39/89] Address remaining PHPStan level 2 issues
---
.../Event/ServiceProvidersUpdatedEvent.php | 3 -
.../InstitutionConfiguration.php | 5 +-
.../Value/InstitutionAuthorizationOption.php | 43 ++------
.../Configuration/Value/InstitutionSet.php | 12 +--
.../Exception/InvalidArgumentException.php | 9 +-
src/Surfnet/Stepup/Identity/Api/Identity.php | 6 --
.../Collection/VettingTypeHintCollection.php | 15 ---
.../Identity/Entity/InstitutionCollection.php | 2 +-
.../RegistrationAuthorityCollection.php | 11 +--
.../Identity/Event/AppointedAsRaEvent.php | 11 +--
.../AppointedAsRaForInstitutionEvent.php | 3 -
.../Identity/Event/AppointedAsRaaEvent.php | 11 +--
.../AppointedAsRaaForInstitutionEvent.php | 13 +--
.../Event/LocalePreferenceExpressedEvent.php | 4 -
...etRecoveryTokenPossessionPromisedEvent.php | 26 +----
src/Surfnet/Stepup/Identity/Identity.php | 6 +-
.../Stepup/Identity/Value/VettingTypeHint.php | 8 ++
.../Value/ContactInformationTest.php | 2 -
.../Configuration/Value/InstitutionTest.php | 2 -
.../Configuration/Value/LocationTest.php | 2 -
.../Configuration/Value/RaLocationIdTest.php | 2 -
.../Value/RaLocationNameTest.php | 2 -
.../ShowRaaContactInformationOptionTest.php | 2 -
.../Value/UseRaLocationsOptionTest.php | 2 -
...entSerializationAndDeserializationTest.php | 3 +-
.../Tests/Identity/Value/CommonNameTest.php | 2 -
.../Identity/Value/ContactInformationTest.php | 2 -
.../Identity/Value/DocumentNumberTest.php | 2 -
.../Stepup/Tests/Identity/Value/EmailTest.php | 2 -
.../Tests/Identity/Value/GssfIdTest.php | 2 -
.../Tests/Identity/Value/InstitutionTest.php | 2 -
.../Tests/Identity/Value/LocationTest.php | 2 -
.../Tests/Identity/Value/PhoneNumberTest.php | 2 -
.../Value/RegistrationAuthorityRoleTest.php | 2 -
.../Identity/Value/StepupProviderTest.php | 2 -
.../Identity/Value/YubikeyPublicIdTest.php | 2 -
.../InstitutionAuthorizationRepository.php | 13 ++-
.../InstitutionAuthorizationOptionMap.php | 11 +--
.../Controller/CommandController.php | 17 ++--
.../ApiBundle/Doctrine/Type/DateTimeType.php | 14 +--
.../Doctrine/Type/DocumentNumberType.php | 18 +---
.../Doctrine/Type/RecoveryTokenStatusType.php | 6 +-
.../Doctrine/Type/SecondFactorStatusType.php | 10 +-
.../EventListener/ExceptionListener.php | 5 -
.../Exception/InvalidArgumentException.php | 9 +-
.../Repository/AuditLogRepository.php | 6 +-
.../Repository/AuthorizationRepository.php | 2 +-
.../Repository/RaListingRepository.php | 37 +------
.../Repository/RaSecondFactorRepository.php | 4 -
.../Identity/Service/IdentityService.php | 29 +++---
.../RegistrationAuthorityCredentials.php | 97 ++++---------------
...utionAuthorizationRepositoryFilterTest.php | 14 +--
.../CommandAuthorizationServiceTest.php | 49 +++-------
...itutionConfigurationOptionsServiceTest.php | 9 +-
.../Doctrine/Type/CommonNameTypeTest.php | 3 -
...onfigurationContactInformationTypeTest.php | 3 -
.../Type/ConfigurationInstitutionTypeTest.php | 3 -
.../Type/ConfigurationLocationTypeTest.php | 3 -
.../Type/ContactInformationTypeTest.php | 4 +-
.../Tests/Doctrine/Type/DateTimeTypeTest.php | 4 +-
.../Doctrine/Type/DocumentNumberTypeTest.php | 3 -
.../Tests/Doctrine/Type/EmailTypeTest.php | 3 -
.../Doctrine/Type/InstitutionRoleTypeTest.php | 3 -
.../Doctrine/Type/InstitutionTypeTest.php | 3 -
.../Tests/Doctrine/Type/LocaleTypeTest.php | 3 -
.../Tests/Doctrine/Type/LocationTypeTest.php | 4 +-
.../Tests/Doctrine/Type/NameIdTypeTest.php | 4 +-
.../NumberOfTokensPerIdentityTypeTest.php | 4 +-
.../Type/RecoveryTokenStatusTypeTest.php | 8 --
.../Type/SecondFactorStatusTypeTest.php | 4 +-
.../Doctrine/Type/SelfVetOptionTypeTest.php | 4 +-
...howRaaContactInformationOptionTypeTest.php | 4 +-
.../Type/UseRaLocationsOptionTypeTest.php | 4 +-
.../Type/VerifyEmailOptionTypeTest.php | 3 -
.../ConfiguredInstitutionControllerTest.php | 3 -
.../Tests/Endpoint/SraaControllerTest.php | 6 --
.../Request/CommandParamConverterTest.php | 12 ++-
.../EventHandling/BufferedEventBus.php | 6 +-
.../Exception/Exception.php | 4 +-
.../Exception/InvalidArgumentException.php | 9 +-
.../Identity/Command/AppointRoleCommand.php | 2 +-
.../Pipeline/Pipeline.php | 7 +-
.../Pipeline/StagedPipeline.php | 3 +-
.../Pipeline/TransactionAwarePipeline.php | 4 +-
.../Tests/Mockery/HasInstitutionMatcher.php | 15 +--
.../Tests/Pipeline/ValidationStageTest.php | 9 +-
.../Exception/InvalidArgumentException.php | 9 +-
...IdentityWithYubikeySecondFactorCommand.php | 5 +-
.../Exception/InvalidArgumentException.php | 9 +-
.../Service/EventStreamReplayer.php | 6 +-
90 files changed, 171 insertions(+), 589 deletions(-)
diff --git a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
index 5333b3314..30cd4feee 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
@@ -36,9 +36,6 @@ public function __construct($configurationId, array $serviceProviders)
$this->serviceProviders = $serviceProviders;
}
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self($data['id'], $data['service_providers']);
diff --git a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
index 0b709e84b..2d23025cd 100644
--- a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
@@ -200,10 +200,7 @@ public static function create(
return $institutionConfiguration;
}
- /**
- * @return InstitutionConfiguration
- */
- public function rebuild(): static
+ public function rebuild(): self
{
// We can only rebuild a destroyed InstitutionConfiguration, all other cases are not valid
if ($this->isMarkedAsDestroyed !== true) {
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
index e0594da23..fb7354d93 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
@@ -39,11 +39,7 @@ private function __construct(
$this->isDefault = (bool)$isDefault;
}
- /**
- * @param string[]|null
- * @return InstitutionAuthorizationOption
- */
- public static function fromInstitutionConfig(InstitutionRole $role, $institutions = null)
+ public static function fromInstitutionConfig(InstitutionRole $role, $institutions = null): InstitutionAuthorizationOption
{
if (is_null($institutions)) {
return self::getDefault($role);
@@ -82,7 +78,6 @@ function ($institution, $key) use ($institutions): void {
/**
* @param Institution[] $institutions
- * @return InstitutionAuthorizationOption
*/
public static function fromInstitutions(InstitutionRole $role, Institution $institution, array $institutions): self
{
@@ -92,35 +87,21 @@ public static function fromInstitutions(InstitutionRole $role, Institution $inst
return new self($role, InstitutionSet::create($institutions), false);
}
- /**
- * @param string[]|null
- * @return InstitutionAuthorizationOption
- */
public static function getDefault(InstitutionRole $role): self
{
return new self($role, InstitutionSet::create([]), true);
}
- /**
- * @param string[]|null
- * @return InstitutionAuthorizationOption
- */
public static function getEmpty(InstitutionRole $role): self
{
return new self($role, InstitutionSet::create([]), false);
}
- /**
- * @return null
- */
- public static function blank()
+ public static function blank(): null
{
return null;
}
- /**
- * @return bool
- */
public function equals(InstitutionAuthorizationOption $option): bool
{
return
@@ -129,18 +110,12 @@ public function equals(InstitutionAuthorizationOption $option): bool
$this->isDefault === $option->isDefault();
}
- /**
- * @return InstitutionRole
- */
- public function getInstitutionRole()
+ public function getInstitutionRole(): InstitutionRole
{
return $this->institutionRole;
}
- /**
- * @return InstitutionSet
- */
- public function getInstitutionSet()
+ public function getInstitutionSet(): InstitutionSet
{
return $this->institutionSet;
}
@@ -151,7 +126,7 @@ public function getInstitutionSet()
*
* @return Institution[]
*/
- public function getInstitutions(Institution $institution)
+ public function getInstitutions(Institution $institution): array
{
if ($this->isDefault) {
return [$institution];
@@ -159,9 +134,6 @@ public function getInstitutions(Institution $institution)
return $this->institutionSet->getInstitutions();
}
- /**
- * @return bool
- */
public function hasInstitution(Institution $institution, Institution $default): bool
{
$institutions = $this->getInstitutions($default);
@@ -172,10 +144,7 @@ public function hasInstitution(Institution $institution, Institution $default):
return in_array($institution->getInstitution(), $list);
}
- /**
- * @return bool
- */
- public function isDefault()
+ public function isDefault(): bool
{
return $this->isDefault;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
index 78b542583..1b99edb6a 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
@@ -25,10 +25,10 @@ final class InstitutionSet
/**
* @var Institution[]
*/
- private $institutions;
+ private array $institutions;
/**
- * @param Institution[]
+ * @param Institution[] $institutions
*/
private function __construct(array $institutions)
{
@@ -42,8 +42,7 @@ private function __construct(array $institutions)
}
/**
- * @param Institution[]
- * @return InstitutionSet
+ * @param Institution[] $institutions
*/
public static function create(array $institutions): self
{
@@ -69,9 +68,6 @@ public function equals(InstitutionSet $other): bool
return $this->toScalarArray() === $other->toScalarArray();
}
- /**
- * @return bool
- */
public function isOption(Institution $institution): bool
{
return in_array($institution->getInstitution(), $this->institutions);
@@ -80,7 +76,7 @@ public function isOption(Institution $institution): bool
/**
* @return Institution[]
*/
- public function getInstitutions()
+ public function getInstitutions(): array
{
return $this->institutions;
}
diff --git a/src/Surfnet/Stepup/Exception/InvalidArgumentException.php b/src/Surfnet/Stepup/Exception/InvalidArgumentException.php
index 798e90c42..dbe864320 100644
--- a/src/Surfnet/Stepup/Exception/InvalidArgumentException.php
+++ b/src/Surfnet/Stepup/Exception/InvalidArgumentException.php
@@ -20,14 +20,7 @@
class InvalidArgumentException extends \InvalidArgumentException implements Exception
{
- /**
- * @param string $expected description of expected type
- * @param string $parameterName
- * @param mixed $parameter the parameter that is not of the expected type.
- *
- * @return self
- */
- public static function invalidType($expected, $parameterName, mixed $parameter): self
+ public static function invalidType(string $expected, string $parameterName, mixed $parameter): self
{
$message = sprintf(
'Invalid argument type: "%s" expected, "%s" given for "%s"',
diff --git a/src/Surfnet/Stepup/Identity/Api/Identity.php b/src/Surfnet/Stepup/Identity/Api/Identity.php
index a4447b622..ef806d8bc 100644
--- a/src/Surfnet/Stepup/Identity/Api/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Api/Identity.php
@@ -327,12 +327,6 @@ public function getVerifiedSecondFactor(SecondFactorId $secondFactorId);
*/
public function getVettedSecondFactorById(SecondFactorId $secondFactorId): ?VettedSecondFactor;
- /**
- * @return IdentityId We're deviating from Broadway's official API, as they accept toString-able VOs as IDs, and we
- * require the IdentityId VO in our SensitiveDataEventStoreDecorator.
- */
- public function getAggregateRootId(): string;
-
/**
* Identity proved possession of a phone number by reproducing a secret sent to it via SMS
*/
diff --git a/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php b/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
index 6f0c08c3a..53f7c1042 100644
--- a/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+++ b/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
@@ -49,21 +49,6 @@ public function add(VettingTypeHint $hint): void
$this->elements[] = $hint;
}
- public function remove(VettingTypeHint $hint): void
- {
- if (!in_array($hint, $this->elements)) {
- throw new RuntimeException(
- sprintf(
- 'Cannot remove vetting type hint "%s" from the collection as it is not in the collection',
- $hint,
- ),
- );
- }
-
- $elements = array_filter($this->elements, fn($inst): bool => !$hint->equals($inst));
- $this->elements = $elements;
- }
-
public function jsonSerialize(): array
{
return $this->elements;
diff --git a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
index 5b472c4d4..af33f6018 100644
--- a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
+++ b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
@@ -33,7 +33,7 @@ public function set(Institution $institution): void
public function update(Institutions $institutions): void
{
foreach ($institutions as $institution) {
- $this->institutions[(string)$institutions] = $institution;
+ $this->institutions[(string)$institution] = $institution;
}
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
index b3f13ee19..2509471d5 100644
--- a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
+++ b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
@@ -32,17 +32,11 @@ public function set(Institution $institution, RegistrationAuthority $registratio
$this->registrationAuthorities[(string)$institution] = $registrationAuthority;
}
- /**
- * @return RegistrationAuthority
- */
- public function get(Institution $institution)
+ public function get(Institution $institution): RegistrationAuthority
{
return $this->registrationAuthorities[(string)$institution];
}
- /**
- * @return RegistrationAuthority
- */
public function exists(Institution $institution): bool
{
return array_key_exists((string)$institution, $this->registrationAuthorities);
@@ -53,9 +47,6 @@ public function remove(Institution $institution): void
unset($this->registrationAuthorities[(string)$institution]);
}
- /**
- * @return int
- */
public function count(): int
{
return count($this->registrationAuthorities);
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
index d4637eb4b..54e8895d9 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
@@ -35,10 +35,7 @@ class AppointedAsRaEvent extends IdentityEvent implements RightToObtainDataInter
'name_id',
];
- /**
- * @var NameId
- */
- public $nameId;
+ public NameId $nameId;
public function __construct(
IdentityId $identityId,
@@ -59,9 +56,6 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self(
@@ -71,9 +65,6 @@ public static function deserialize(array $data): self
);
}
- /**
- * @return array
- */
public function serialize(): array
{
return [
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
index bf3877d32..a1ba0e6be 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
@@ -65,9 +65,6 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self(
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
index 0d3f60f8b..5f8de76c3 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
@@ -35,10 +35,7 @@ class AppointedAsRaaEvent extends IdentityEvent implements RightToObtainDataInte
'name_id',
];
- /**
- * @var NameId
- */
- public $nameId;
+ public NameId $nameId;
public function __construct(
IdentityId $identityId,
@@ -59,9 +56,6 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self(
@@ -71,9 +65,6 @@ public static function deserialize(array $data): self
);
}
- /**
- * @return array
- */
public function serialize(): array
{
return [
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
index 6955619de..3694fabb6 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
@@ -33,15 +33,9 @@ class AppointedAsRaaForInstitutionEvent extends IdentityEvent implements RightTo
'ra_institution',
];
- /**
- * @var NameId
- */
- public $nameId;
+ public NameId $nameId;
- /**
- * @var Institution
- */
- public $raInstitution;
+ public Institution $raInstitution;
public function __construct(
IdentityId $identityId,
@@ -65,9 +59,6 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
- /**
- * @return mixed The object instance
- */
public static function deserialize(array $data): self
{
return new self(
diff --git a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
index 7b31faceb..82fa4b3d9 100644
--- a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
@@ -58,10 +58,6 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
- /**
- * @param array $data
- * @return IdentityRenamedEvent The object instance
- */
public static function deserialize(array $data): self
{
return new self(
diff --git a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
index acb9d77e2..fd661d78b 100644
--- a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
@@ -21,7 +21,6 @@
use Surfnet\Stepup\Identity\AuditLog\Metadata;
use Surfnet\Stepup\Identity\Value\CommonName;
use Surfnet\Stepup\Identity\Value\Email;
-use Surfnet\Stepup\Identity\Value\HashableSecret;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\Locale;
@@ -52,30 +51,15 @@ class SafeStoreSecretRecoveryTokenPossessionPromisedEvent extends IdentityEvent
'common_name',
];
- /**
- * @var RecoveryTokenId
- */
- public $recoveryTokenId;
+ public RecoveryTokenId $recoveryTokenId;
- /**
- * @var HashableSecret
- */
- public $secret;
+ public RecoveryTokenIdentifier $secret;
- /**
- * @var CommonName
- */
- public $commonName;
+ public CommonName $commonName;
- /**
- * @var Email
- */
- public $email;
+ public Email $email;
- /**
- * @var Locale Eg. "en_GB"
- */
- public $preferredLocale;
+ public Locale $preferredLocale;
public function __construct(
IdentityId $identityId,
diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php
index ca931b256..83e17ab97 100644
--- a/src/Surfnet/Stepup/Identity/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Identity.php
@@ -1371,10 +1371,8 @@ protected function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event)
/**
* This method is kept to be backwards compatible for changes before FGA
- *
- * @param AppointedAsRaaEvent $event
*/
- protected function applyIdentityAccreditedAsRaEvent(IdentityAccreditedAsRaEvent $event)
+ protected function applyIdentityAccreditedAsRaEvent(IdentityAccreditedAsRaEvent $event): void
{
$this->registrationAuthorities->set(
$event->identityInstitution,
@@ -1565,7 +1563,7 @@ private function assertSelfAssertedTokenRegistrationAllowed(): void
*/
private function assertAllVettedTokensAreSelfAsserted(): bool
{
- /** @var VettedSecondFactor $vettedToken */
+ /** @var VettedSecondFactor $vettedSecondFactor */
foreach ($this->vettedSecondFactors as $vettedSecondFactor) {
if ($vettedSecondFactor->vettingType()->type() !== VettingType::TYPE_SELF_ASSERTED_REGISTRATION) {
throw new DomainException(
diff --git a/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php b/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
index 54edf09b6..90a84434c 100644
--- a/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
+++ b/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
@@ -31,6 +31,14 @@ public function __construct(
) {
}
+ public function __toString(): string
+ {
+ if ($this->hint === null) {
+ return '';
+ }
+ return $this->hint;
+ }
+
public function jsonSerialize(): array
{
return [
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
index 2dc023e7a..36d7ffb18 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
@@ -32,8 +32,6 @@ class ContactInformationTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
{
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
index d5cf92fcf..94e31cd06 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
@@ -32,8 +32,6 @@ class InstitutionTest extends UnitTest
* @test
* @group domain
* @dataProvider nonStringOrNonEmptyStringProvider
- *
- * @param mixed $invalidValue
*/
public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
index 7596e55dc..5286f29e3 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
@@ -32,8 +32,6 @@ class LocationTest extends UnitTest
* @test
* @group domain
* @dataProvider nonStringProvider
- *
- * @param mixed $nonString
*/
public function it_cannot_be_created_with_anything_but_a_string(bool|int|float|stdClass|array|null $nonString): void
{
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
index 2fa26fe8f..3a0198fc3 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
@@ -33,8 +33,6 @@ class RaLocationIdTest extends TestCase
* @test
* @group domain
* @dataProvider nonStringOrEmptyStringProvider
- *
- * @param mixed $nonStringOrEmptyString
*/
public function an_ra_location_id_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $nonStringOrEmptyString,
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
index 51d0c3876..a7805c7ec 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
@@ -32,8 +32,6 @@ class RaLocationNameTest extends TestCase
* @test
* @group domain
* @dataProvider nonStringOrEmptyStringProvider
- *
- * @param mixed $nonStringOrEmptyString
*/
public function an_ra_location_name_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $nonStringOrEmptyString,
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/ShowRaaContactInformationOptionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/ShowRaaContactInformationOptionTest.php
index d96e304ed..5e3b2e6d7 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/ShowRaaContactInformationOptionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/ShowRaaContactInformationOptionTest.php
@@ -33,8 +33,6 @@ class ShowRaaContactInformationOptionTest extends TestCase
* @group domain
* @group institution-configuration-option
* @dataProvider nonBooleanProvider
- *
- * @param mixed $nonBooleanProvider
*/
public function show_raa_contact_information_option_can_only_be_boolean(
string|int|float|StdClass|array $nonBooleanProvider,
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
index 1032557e0..45b825098 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
@@ -33,8 +33,6 @@ class UseRaLocationsOptionTest extends TestCase
* @group domain
* @group institution-configuration-option
* @dataProvider nonBooleanProvider
- *
- * @param mixed $nonBooleanProvider
*/
public function use_ra_locations_option_can_only_be_boolean(string|int|float|StdClass|array $nonBooleanProvider,): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php b/src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
index fb71eff0f..3d2b558f3 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
@@ -83,7 +83,7 @@ class EventSerializationAndDeserializationTest extends UnitTest
* @group domain
* @dataProvider eventProvider
*/
- public function an_event_should_be_the_same_after_serialization_and_deserialization(SerializableInterface $event,): void
+ public function an_event_should_be_the_same_after_serialization_and_deserialization(SerializableInterface $event): void
{
$isForgettableEvent = $event instanceof Forgettable;
$providesSensitiveData = method_exists($event, 'getSensitiveData') || method_exists($event, 'setSensitiveData');
@@ -100,6 +100,7 @@ public function an_event_should_be_the_same_after_serialization_and_deserializat
$serializedEvent = $event->serialize();
if ($isForgettableEvent) {
+ assert($event instanceof Forgettable);
$sensitiveData = $event->getSensitiveData();
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
index b9377bfc0..2dfd33973 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
@@ -32,8 +32,6 @@ class CommonNameTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidArgumentProvider
- *
- * @param mixed $invalidValue
*/
public function the_common_name_address_must_be_a_non_empty_string(string|int|float|StdClass|array $invalidValue,): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
index dbe80cd29..d00ff196e 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
@@ -32,8 +32,6 @@ class ContactInformationTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
index e16687617..d957f1a47 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
@@ -32,8 +32,6 @@ class DocumentNumberTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidArgumentProvider
- *
- * @param mixed $invalidValue
*/
public function the_document_number_must_be_a_non_empty_string(string|int|float|StdClass|array $invalidValue): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
index a95bb3825..daf63f21d 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
@@ -32,8 +32,6 @@ class EmailTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidArgumentProvider
- *
- * @param mixed $invalidValue
*/
public function the_email_address_must_be_a_non_empty_string(string|int|float|StdClass|array $invalidValue): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
index 6e05e8033..5e50dff84 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
@@ -32,8 +32,6 @@ class GssfIdTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function a_gssf_id_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
index fdabec5d6..bcfd7a01d 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
@@ -32,8 +32,6 @@ class InstitutionTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
index b1964440e..05837f4d6 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
@@ -32,8 +32,6 @@ class LocationTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
index 7aa40b9bb..d5aca4494 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
@@ -32,8 +32,6 @@ class PhoneNumberTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function a_phone_number_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
index a3573a5b8..4a4573a97 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
@@ -32,8 +32,6 @@ class RegistrationAuthorityRoleTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function it_cannot_be_created_with_anything_but_a_valid_role(float|StdClass|array $invalidValue): void
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
index 07187cf64..fa53c77ac 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
@@ -32,8 +32,6 @@ class StepupProviderTest extends UnitTest
* @test
* @group domain
* @dataProvider invalidValueProvider
- *
- * @param mixed $invalidValue
*/
public function a_stepup_provider_cannot_be_created_with_anything_but_a_nonempty_string(
string|int|float|StdClass|array $invalidValue,
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
index c89fcc50a..fa085e594 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
@@ -61,8 +61,6 @@ public function invalidFormatProvider(): array
* @test
* @group domain
* @dataProvider invalidFormatProvider
- *
- * @param mixed $invalidFormat
*/
public function it_cannot_be_constructed_with_an_invalid_format(string $invalidFormat): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
index 575c5716e..ac0ebf9f2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
@@ -19,7 +19,7 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\Stepup\Configuration\Value\Institution;
@@ -37,7 +37,7 @@ public function __construct(ManagerRegistry $registry)
/**
* @return InstitutionAuthorization[]
*/
- public function findAuthorizationOptionsForInstitutionByRole(Institution $institution, InstitutionRole $role)
+ public function findAuthorizationOptionsForInstitutionByRole(Institution $institution, InstitutionRole $role): array
{
return $this->createQueryBuilder('ia')
->where('ia.institution = :institution')
@@ -51,7 +51,7 @@ public function findAuthorizationOptionsForInstitutionByRole(Institution $instit
/**
* @return InstitutionAuthorization[]
*/
- public function findAuthorizationOptionsForInstitution(Institution $institution)
+ public function findAuthorizationOptionsForInstitution(Institution $institution): array
{
return $this->createQueryBuilder('ia')
->where('ia.institution = :institution')
@@ -63,7 +63,7 @@ public function findAuthorizationOptionsForInstitution(Institution $institution)
/**
* @return InstitutionAuthorization[]
*/
- public function findSelectRaasForInstitution(Institution $institution)
+ public function findSelectRaasForInstitution(Institution $institution): array
{
return $this->createQueryBuilder('ia')
->where('ia.institutionRelation = :institution')
@@ -95,7 +95,6 @@ public function saveInstitutionOption(
}
/**
- * @param InstitutionAuthorizationOption $institutionOption
* @throws OptimisticLockException
*/
public function clearInstitutionOption(Institution $institution): void
@@ -147,7 +146,7 @@ private function save(Institution $institution, InstitutionRole $role, array $in
}
private function clearOldAuthorizations(
- EntityManager $entityManager,
+ EntityManagerInterface $entityManager,
Institution $institution,
InstitutionRole $role,
): void {
@@ -164,7 +163,7 @@ private function clearOldAuthorizations(
* @param InstitutionAuthorization[] $institutionAuthorizations
*/
private function addNewAuthorizations(
- EntityManager $entityManager,
+ EntityManagerInterface $entityManager,
InstitutionRole $role,
array $institutionAuthorizations,
): void {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
index 9ac663dbf..b6244bf09 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
@@ -30,7 +30,6 @@ final class InstitutionAuthorizationOptionMap
private array $institutionOptions = [];
/**
- * InstitutionAuthorizationOptionMap constructor.
* @param InstitutionAuthorization[] $institutionAuthorizations
*/
private function __construct(Institution $institution, array $institutionAuthorizations)
@@ -60,10 +59,6 @@ private function __construct(Institution $institution, array $institutionAuthori
}
}
- /**
- * @param InstitutionAuthorization[]|null
- * @return InstitutionAuthorizationOptionMap
- */
public static function fromInstitutionAuthorizations(
Institution $institution,
array $institutionAuthorizations,
@@ -71,11 +66,7 @@ public static function fromInstitutionAuthorizations(
return new self($institution, $institutionAuthorizations);
}
- /**
- * InstitutionAuthorizationOption
- * @return InstitutionAuthorizationOption
- */
- public function getAuthorizationOptionsByRole(InstitutionRole $role)
+ public function getAuthorizationOptionsByRole(InstitutionRole $role): InstitutionAuthorizationOption
{
if (!isset($this->institutionOptions[$role->getType()])) {
return InstitutionAuthorizationOption::getEmpty($role);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
index 10bbcad1c..26fc80e3f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
@@ -22,8 +22,10 @@
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Service\CommandAuthorizationService;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Metadata;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfServiceExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventSourcing\MetadataEnricher;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\ForbiddenException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\CreateIdentityCommand;
@@ -34,6 +36,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
+use function sprintf;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -49,7 +52,7 @@ public function __construct(
) {
}
- public function handle(Command $command, Metadata $metadata, Request $request): JsonResponse
+ public function handle(AbstractCommand $command, Metadata $metadata, Request $request): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS']);
$this->logger->notice(sprintf('Received request to process Command "%s"', $command));
@@ -101,7 +104,7 @@ private function resolveInstitution(Command $command, Metadata $metadata): Insti
);
}
- private function handleAuthorization(Command $command, Metadata $metadata): void
+ private function handleAuthorization(AbstractCommand $command, Metadata $metadata): void
{
// Get the actorId and actorInstitution from the metadata
// Be aware that these values could be null when executing commands where we shouldn't log in for
@@ -135,13 +138,15 @@ private function handleAuthorization(Command $command, Metadata $metadata): void
$command,
$actorId,
)) {
- throw new AccessDeniedHttpException(
- sprintf(
+ $message = 'Processing of SelfService command denied, see log entries for details';
+ if ($command instanceof SelfServiceExecutable) {
+ $message = sprintf(
'The actor "%s" is not allowed to act on behalf of identity "%s" processing of SelfService command denied',
new IdentityId($metadata->actorId),
$command->getIdentityId(),
- ),
- );
+ );
+ }
+ throw new AccessDeniedHttpException($message);
}
// Validate that if a command is an RAExecutable we may execute the command
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
index f9809b1a8..dfd3be74b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
@@ -20,7 +20,6 @@
use DateTime as CoreDateTime;
use DateTimeZone;
-use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Doctrine\DBAL\Types\Type;
@@ -37,19 +36,13 @@ class DateTimeType extends Type
* @param array $column
* @param AbstractPlatform $platform
* @return string
- * @throws DBALException
*/
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return $platform->getDateTimeTypeDeclarationSQL($column);
}
- /**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return null|string
- */
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string
{
if ($value === null) {
return null;
@@ -62,12 +55,9 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
}
/**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return null|DateTime
* @throws ConversionException
*/
- public function convertToPHPValue($value, AbstractPlatform $platform): ?DateTime
+ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime
{
if (is_null($value)) {
return $value;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DocumentNumberType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DocumentNumberType.php
index 46ce0a7ba..ddfea6a16 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DocumentNumberType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DocumentNumberType.php
@@ -18,10 +18,10 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Doctrine\Type;
-use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Doctrine\DBAL\Types\Type;
+use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\DocumentNumber;
/**
@@ -31,21 +31,12 @@ class DocumentNumberType extends Type
{
public const NAME = 'stepup_document_number';
- /**
- * @param array $column
- * @param AbstractPlatform $platform
- * @return string
- * @throws DBALException
- */
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return $platform->getVarcharTypeDeclarationSQL($column);
}
/**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return null|string
* @throws ConversionException
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
@@ -68,12 +59,9 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
}
/**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return null|DocumentNumber
- * @throws ConversionException
+ * @throws InvalidArgumentException
*/
- public function convertToPHPValue($value, AbstractPlatform $platform): ?DocumentNumber
+ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DocumentNumber
{
if (is_null($value)) {
return null;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RecoveryTokenStatusType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RecoveryTokenStatusType.php
index 26c97a724..0cfd34c42 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RecoveryTokenStatusType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RecoveryTokenStatusType.php
@@ -36,10 +36,9 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
}
/**
- * @param mixed $value
* @throws ConversionException
*/
- public function convertToDatabaseValue($value, AbstractPlatform $platform): int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): int
{
if (!$value instanceof RecoveryTokenStatus) {
throw new ConversionException(
@@ -63,10 +62,9 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): int
}
/**
- * @param mixed $value
* @throws ConversionException
*/
- public function convertToPHPValue($value, AbstractPlatform $platform): RecoveryTokenStatus
+ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): RecoveryTokenStatus
{
if ($value === '0') {
return RecoveryTokenStatus::active();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
index d0bd3199c..f179fde92 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
@@ -42,12 +42,9 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
}
/**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return int
* @throws ConversionException
*/
- public function convertToDatabaseValue($value, AbstractPlatform $platform): int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): int
{
if (!$value instanceof SecondFactorStatus) {
throw new ConversionException(
@@ -75,12 +72,9 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): int
}
/**
- * @param mixed $value
- * @param AbstractPlatform $platform
- * @return SecondFactorStatus
* @throws ConversionException
*/
- public function convertToPHPValue($value, AbstractPlatform $platform): SecondFactorStatus
+ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): SecondFactorStatus
{
if ($value === '0') {
return SecondFactorStatus::unverified();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php b/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
index c4c3f12f8..df2fb4e40 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
@@ -74,11 +74,6 @@ private function logException(Throwable $throwable): void
}
}
- /**
- * @param Throwable $exception
- * @param array $headers OPTIONAL
- * @return JsonResponse
- */
private function createJsonErrorResponse(Throwable $throwable, int $statusCode, array $headers = []): JsonResponse
{
if ($throwable instanceof BadApiRequestException
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/InvalidArgumentException.php b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/InvalidArgumentException.php
index 1a0a78c36..d76474f23 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/InvalidArgumentException.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/InvalidArgumentException.php
@@ -22,14 +22,7 @@
class InvalidArgumentException extends CoreInvalidArgumentException implements Exception
{
- /**
- * @param string $expected description of expected type
- * @param string $parameterName
- * @param mixed $parameter the parameter that is not of the expected type.
- *
- * @return self
- */
- public static function invalidType($expected, $parameterName, mixed $parameter): self
+ public static function invalidType(string $expected, string $parameterName, mixed $parameter): self
{
$message = sprintf(
'Invalid argument type: "%s" expected, "%s" given for "%s"',
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
index 5044a54e5..53ce97c6c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
@@ -106,7 +106,6 @@ public function __construct(ManagerRegistry $registry)
/**
* @SuppressWarnings(PHPMD.CyclomaticComplexity) - The filtering switch triggers the CyclomaticComplexity, it does
* not actually make the class complex or hard to maintain.
- * @return Query
*/
public function createSecondFactorSearchQuery(SecondFactorAuditLogQuery $query): Query
{
@@ -133,7 +132,7 @@ public function createSecondFactorSearchQuery(SecondFactorAuditLogQuery $query):
/**
* @return AuditLogEntry[]
*/
- public function findEntriesWhereIdentityIsActorOnly(IdentityId $actorId)
+ public function findEntriesWhereIdentityIsActorOnly(IdentityId $actorId): array
{
return $this->createQueryBuilder('al')
->where('al.actorId = :actorId')
@@ -144,10 +143,9 @@ public function findEntriesWhereIdentityIsActorOnly(IdentityId $actorId)
}
/**
- * @param IdentityId $actorId
* @return AuditLogEntry[]
*/
- public function findByIdentityId(IdentityId $identityId)
+ public function findByIdentityId(IdentityId $identityId): array
{
return $this->createQueryBuilder('al')
->where('al.identityId = :identityId')
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
index 857df7e74..f61331e7b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
@@ -119,7 +119,7 @@ public function getInstitutionsForRole(RegistrationAuthorityRole $role, Identity
$this->logger->notice(
sprintf(
'Adding %s to authorized institutions from %s',
- $role->getType(),
+ $role,
$institution['institution'],
),
);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
index 2a5246851..80740d199 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
@@ -42,20 +42,12 @@ public function __construct(
parent::__construct($registry, RaListing::class);
}
- /**
- * @param IdentityId $identityId The RA's identity id.
- * @return null|RaListing[]
- */
- public function findByIdentityId(IdentityId $identityId): array
+ public function findByIdentityId(IdentityId $identityId): ?array
{
return parent::findBy(['identityId' => (string)$identityId]);
}
- /**
- * @param IdentityId $identityId The RA's identity id.
- * @return null|RaListing
- */
- public function findByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): ?object
+ public function findByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): ?RaListing
{
return parent::findOneBy([
'identityId' => (string)$identityId,
@@ -63,16 +55,11 @@ public function findByIdentityIdAndRaInstitution(IdentityId $identityId, Institu
]);
}
-
- /**
- * @param IdentityId $identityId The RA's identity id.
- * @return null|RaListing
- */
public function findByIdentityIdAndRaInstitutionWithContext(
IdentityId $identityId,
Institution $raInstitution,
InstitutionAuthorizationContextInterface $authorizationContext,
- ) {
+ ): ?RaListing {
$queryBuilder = $this->createQueryBuilder('r')
->where('r.identityId = :identityId')
->andWhere('r.raInstitution = :raInstitution')
@@ -95,7 +82,6 @@ public function findByIdentityIdAndRaInstitutionWithContext(
}
/**
- * @param IdentityId $identityId The RA's identity id.
* @return RaListing[]
*/
public function findByIdentityIdAndInstitution(IdentityId $identityId, Institution $institution): array
@@ -115,8 +101,6 @@ public function save(RaListing $raListingEntry): void
/**
* @SuppressWarnings(PHPMD.CyclomaticComplexity) The amount of if statements do not necessarily make the method
* @SuppressWarnings(PHPMD.NPathComplexity) below complex or hard to maintain.
- *
- * @return Query
*/
public function createSearchQuery(RaListingQuery $query): Query
{
@@ -183,9 +167,6 @@ public function createSearchQuery(RaListingQuery $query): Query
return $queryBuilder->getQuery();
}
- /**
- * @return Query
- */
public function createOptionsQuery(RaListingQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('r')
@@ -206,9 +187,6 @@ public function createOptionsQuery(RaListingQuery $query): Query
return $queryBuilder->getQuery();
}
- /**
- * @return ArrayCollection
- */
public function listRasFor(Institution $raInstitution): ArrayCollection
{
$listings = $this->createQueryBuilder('rl')
@@ -220,9 +198,6 @@ public function listRasFor(Institution $raInstitution): ArrayCollection
return new ArrayCollection($listings);
}
- /**
- * @return void
- */
public function removeByIdentityId(IdentityId $identityId, Institution $institution): void
{
$this->getEntityManager()->createQueryBuilder()
@@ -235,9 +210,6 @@ public function removeByIdentityId(IdentityId $identityId, Institution $institut
->execute();
}
- /**
- * @return void
- */
public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): void
{
$this->getEntityManager()->createQueryBuilder()
@@ -250,9 +222,6 @@ public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Insti
->execute();
}
- /**
- * @return void
- */
public function removeByIdentityIdAndInstitution(IdentityId $identityId, Institution $institution): void
{
$this->getEntityManager()->createQueryBuilder()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
index dd9f10930..bf68aa1c2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
@@ -19,7 +19,6 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
-use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Query;
use Doctrine\Persistence\ManagerRegistry;
@@ -71,9 +70,6 @@ public function findByInstitution($institution): array
* @SuppressWarnings(PHPMD.CyclomaticComplexity) The amount of if statements do not necessarily make the method
* below complex or hard to maintain.
* @SuppressWarnings(PHPMD.NPathComplexity)
- *
- * @return Query
- * @throws DBALException
*/
public function createSearchQuery(RaSecondFactorQuery $query): Query
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
index 01ea58a32..0036ee754 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
@@ -18,6 +18,8 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Service;
+use Iterator;
+use IteratorAggregate;
use Pagerfanta\Pagerfanta;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
@@ -32,6 +34,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RaListingRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\SraaRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials;
+use Traversable;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -55,22 +58,14 @@ public function find(mixed $id): ?Identity
return $this->repository->find($id);
}
- /**
- * @param InstitutionRoleSet $institutionRoles
- * @return Pagerfanta
- */
- public function search(IdentityQuery $query)
+ public function search(IdentityQuery $query): Pagerfanta
{
$searchQuery = $this->repository->createSearchQuery($query);
return $this->createPaginatorFrom($searchQuery, $query);
}
- /**
- * @param string $identityId
- * @return null|RegistrationAuthorityCredentials
- */
- public function findRegistrationAuthorityCredentialsOf($identityId)
+ public function findRegistrationAuthorityCredentialsOf(string $identityId): ?RegistrationAuthorityCredentials
{
$identity = $this->find($identityId);
@@ -81,11 +76,10 @@ public function findRegistrationAuthorityCredentialsOf($identityId)
return $this->findRegistrationAuthorityCredentialsByIdentity($identity);
}
- /**
- * @return RegistrationAuthorityCredentials|null
- */
- public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(NameId $nameId, Institution $institution)
- {
+ public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(
+ NameId $nameId,
+ Institution $institution
+ ): ?RegistrationAuthorityCredentials {
$query = new IdentityQuery();
$query->nameId = $nameId->getNameId();
$query->institution = $institution->getInstitution();
@@ -109,8 +103,11 @@ public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(NameI
);
}
+ /** @var Iterator $collection */
+ $collection = $identities->getIterator();
+
/** @var Identity $identity */
- $identity = $identities->getIterator()->current();
+ $identity = $collection->current();
return $this->findRegistrationAuthorityCredentialsByIdentity($identity);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
index 3723b8a53..620c02113 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
@@ -30,42 +30,25 @@
class RegistrationAuthorityCredentials implements JsonSerializable
{
- /**
- * @var Institution
- */
- private $institution;
+ private Institution $institution;
- /**
- * @var CommonName
- */
- private $commonName;
+ private CommonName $commonName;
- /**
- * @var Location|null
- */
- private $location;
+ private ?Location $location;
- /**
- * @var ContactInformation|null
- */
- private $contactInformation;
+ private ?ContactInformation $contactInformation;
- /**
- * @param string $identityId
- * @param bool $isRa
- * @param bool $isRaa
- * @param bool $isSraa
- */
- private function __construct(private $identityId, private $isRa, private $isRaa, private $isSraa)
- {
+ private function __construct(
+ private readonly string $identityId,
+ private readonly bool $isRa,
+ private readonly bool $isRaa,
+ private bool $isSraa
+ ) {
}
- /**
- * @return RegistrationAuthorityCredentials
- */
public static function fromSraa(Sraa $sraa, Identity $identity): self
{
- static::assertEquals($sraa->nameId, $identity->nameId);
+ self::assertEquals($sraa->nameId, $identity->nameId);
$credentials = new self($identity->id, true, true, true);
$credentials->commonName = $identity->commonName;
@@ -75,7 +58,6 @@ public static function fromSraa(Sraa $sraa, Identity $identity): self
/**
* @param RaListing[] $raListings
- * @return RegistrationAuthorityCredentials
*/
public static function fromRaListings(array $raListings): self
{
@@ -108,10 +90,6 @@ public static function fromRaListings(array $raListings): self
return $credentials;
}
-
- /**
- * @return RegistrationAuthorityCredentials
- */
public static function fromRaListing(RaListing $raListing): self
{
$credentials = new self(
@@ -129,19 +107,11 @@ public static function fromRaListing(RaListing $raListing): self
return $credentials;
}
- /**
- * @param string $nameId
- * @param string $identityNameId
- * @return void
- */
- private static function assertEquals($nameId, $identityNameId): void
+ private static function assertEquals(string $nameId, string $identityNameId): void
{
Assertion::eq($nameId, $identityNameId);
}
- /**
- * @return RegistrationAuthorityCredentials
- */
public function grantSraa(): static
{
$copy = clone $this;
@@ -150,9 +120,6 @@ public function grantSraa(): static
return $copy;
}
- /**
- * @return bool
- */
public function equals(RegistrationAuthorityCredentials $other): bool
{
return $other->jsonSerialize() === $this->jsonSerialize();
@@ -174,66 +141,42 @@ public function jsonSerialize(): array
];
}
- /**
- * @return string
- */
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
- /**
- * @return Institution
- */
- public function getInstitution()
+ public function getInstitution(): Institution
{
return $this->institution;
}
- /**
- * @return CommonName
- */
- public function getCommonName()
+ public function getCommonName(): CommonName
{
return $this->commonName;
}
- /**
- * @return string
- */
- public function getLocation()
+ public function getLocation(): string
{
return $this->location;
}
- /**
- * @return string
- */
- public function getContactInformation()
+ public function getContactInformation(): string
{
return $this->contactInformation;
}
- /**
- * @return boolean
- */
- public function isRa()
+ public function isRa(): bool
{
return $this->isRa;
}
- /**
- * @return boolean
- */
- public function isRaa()
+ public function isRaa(): bool
{
return $this->isRaa;
}
- /**
- * @return boolean
- */
- public function isSraa()
+ public function isSraa(): bool
{
return $this->isSraa;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
index 312ddad43..72a6810f4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
@@ -23,7 +23,6 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
-use PHPUnit_Framework_MockObject_MockObject;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection;
use Surfnet\Stepup\Identity\Value\Institution as InstitutionValue;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Filter\InstitutionAuthorizationRepositoryFilter;
@@ -33,20 +32,11 @@ class InstitutionAuthorizationRepositoryFilterTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var QueryBuilder
- */
private QueryBuilder $queryBuilder;
- /**
- * @var EntityManager
- */
- private MockObject $entityManager;
+ private EntityManager&MockObject $entityManager;
- /**
- * @var InstitutionAuthorizationContextInterface|PHPUnit_Framework_MockObject_MockObject
- */
- private MockObject $mockedAuthorizationContext;
+ private InstitutionAuthorizationContextInterface&MockObject $mockedAuthorizationContext;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index d29609355..2e160c5d6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -20,6 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Ramsey\Uuid\Uuid;
@@ -81,26 +82,14 @@ class CommandAuthorizationServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var WhitelistService|m\MockInterface
- */
- private $whitelistService;
- /**
- * @var IdentityService|m\MockInterface
- */
- private $identityService;
- /**
- * @var LoggerInterface|m\MockInterface
- */
- private $logger;
- /**
- * @var AuthorizationContextService|m\MockInterface
- */
- private $authorizationContextService;
+ private WhitelistService&MockInterface $whitelistService;
+
+ private IdentityService&MockInterface $identityService;
+
+ private LoggerInterface&MockInterface $logger;
+
+ private AuthorizationContextService&MockInterface $authorizationContextService;
- /**
- * @var CommandAuthorizationService
- */
private CommandAuthorizationService $service;
public function setUp(): void
@@ -177,10 +166,8 @@ public function a_sraa_should_be_able_to_execute_all_commands($file, Command $co
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
- public function an_identity_should_be_able_to_execute_own_selfservice_commands($file, $command): void
+ public function an_identity_should_be_able_to_execute_own_selfservice_commands(string $file, mixed $command): void
{
$this->assertInstanceOf(Command::class, $command);
@@ -211,10 +198,8 @@ public function an_identity_should_be_able_to_execute_own_selfservice_commands($
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
- public function an_identity_should_be_able_to_execute_configured_ra_commands($file, $command): void
+ public function an_identity_should_be_able_to_execute_configured_ra_commands(string $file, mixed $command): void
{
$this->assertInstanceOf(Command::class, $command);
@@ -273,10 +258,8 @@ public function an_identity_should_be_able_to_execute_configured_ra_commands($fi
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
- public function an_identity_should_be_able_to_execute_configured_ra_and_selfservice_commands($file, $command): void
+ public function an_identity_should_be_able_to_execute_configured_ra_and_selfservice_commands(string $file, mixed $command): void
{
$this->assertInstanceOf(Command::class, $command);
@@ -331,10 +314,8 @@ public function an_identity_should_be_able_to_execute_configured_ra_and_selfserv
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
- public function an_identity_should_not_be_able_to_execute_someone_elses_selfservice_commands($file, $command): void
+ public function an_identity_should_not_be_able_to_execute_someone_elses_selfservice_commands(string $file, mixed $command): void
{
$this->assertInstanceOf(Command::class, $command);
@@ -373,10 +354,8 @@ public function an_identity_should_not_be_able_to_execute_someone_elses_selfserv
/**
* @test
* @dataProvider availableCommands
- *
- * @param mixed $value
*/
- public function an_identity_should_be_able_to_execute_unconfigured_ra_commands($file, $command): void
+ public function an_identity_should_be_able_to_execute_unconfigured_ra_commands(string $file, mixed $command): void
{
$this->assertInstanceOf(Command::class, $command);
@@ -433,8 +412,6 @@ public function an_identity_should_be_able_to_execute_unconfigured_ra_commands($
/**
* @test
- *
- * @param mixed $value
*/
public function all_available_commands_should_be_tested(): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
index db929c8e1..b52f02e8c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
@@ -20,6 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as TestCase;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\NumberOfTokensPerIdentityOption;
@@ -31,15 +32,9 @@ class InstitutionConfigurationOptionsServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var InstitutionConfigurationOptionsService
- */
private InstitutionConfigurationOptionsService $service;
- /**
- * @var InstitutionConfigurationOptionsRepository|Mock
- */
- private $repository;
+ private InstitutionConfigurationOptionsRepository&MockInterface $repository;
/**
* A representation of the globally configured application setting for the numberOfTokensPerIdentity, this value
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/CommonNameTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/CommonNameTypeTest.php
index 035aee960..f1bd6b66b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/CommonNameTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/CommonNameTypeTest.php
@@ -30,9 +30,6 @@ class CommonNameTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
index 00d1bbce4..b546b676d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
@@ -30,9 +30,6 @@ class ConfigurationContactInformationTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
index a54c82ddb..0ff23bd14 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
@@ -30,9 +30,6 @@ class ConfigurationInstitutionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
index c4d1021e7..c7896cd1c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
@@ -30,9 +30,6 @@ class ConfigurationLocationTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ContactInformationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ContactInformationTypeTest.php
index 10d7921cc..c7906d28d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ContactInformationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ContactInformationTypeTest.php
@@ -30,9 +30,7 @@ class ContactInformationTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
index e4b157880..d0dd1ddaf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
@@ -32,9 +32,7 @@ class DateTimeTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
index cdfd1e9ab..a6c0ab968 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
@@ -31,9 +31,6 @@ class DocumentNumberTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/EmailTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/EmailTypeTest.php
index 1128b6a72..6c4ed6837 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/EmailTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/EmailTypeTest.php
@@ -30,9 +30,6 @@ class EmailTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionRoleTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionRoleTypeTest.php
index 4a811bd4f..c7cb82c67 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionRoleTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionRoleTypeTest.php
@@ -30,9 +30,6 @@ class InstitutionRoleTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionTypeTest.php
index 6a7772f4e..edb107a84 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/InstitutionTypeTest.php
@@ -30,9 +30,6 @@ class InstitutionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
index 110b56f47..384bdaafa 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
@@ -30,9 +30,6 @@ class LocaleTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocationTypeTest.php
index 4d0549a18..e1eec910c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocationTypeTest.php
@@ -30,9 +30,7 @@ class LocationTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NameIdTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NameIdTypeTest.php
index 93d418f0a..6c40a2c0d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NameIdTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NameIdTypeTest.php
@@ -30,9 +30,7 @@ class NameIdTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
index 2f4aacd7f..8199614fc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
@@ -30,9 +30,7 @@ class NumberOfTokensPerIdentityTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
index 3e79ddc17..6267e421d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
@@ -31,9 +31,6 @@ class RecoveryTokenStatusTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
@@ -88,9 +85,6 @@ public function validPhpValues(): array
* @test
* @dataProvider validPhpValues
* @group doctrine
- *
- * @param mixed $phpValue
- * @param mixed $databaseValue
*/
public function a_valid_php_value_is_converted_to_a_sql_value(
RecoveryTokenStatus $phpValue,
@@ -139,8 +133,6 @@ public function validDatabaseValues(): array
* @test
* @dataProvider validDatabaseValues
* @group doctrine
- *
- * @param mixed $phpValue
*/
public function a_valid_database_value_is_converted_to_a_sql_value(
string $databaseValue,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
index d5ca85f14..6fa40236d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
@@ -31,9 +31,7 @@ class SecondFactorStatusTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
index a333103dd..0e3fa9571 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
@@ -30,9 +30,7 @@ class SelfVetOptionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
index b562c5cd0..2e494ff83 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
@@ -31,9 +31,7 @@ class ShowRaaContactInformationOptionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
index 9cefbb413..aa35e5b0e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
@@ -30,9 +30,7 @@ class UseRaLocationsOptionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
+
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
index feb1705b5..987336b6d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
@@ -30,9 +30,6 @@ class VerifyEmailOptionTypeTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MySqlPlatform
- */
private MariaDBPlatform $platform;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
index 3111855a2..af79059b7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
@@ -30,9 +30,6 @@ class ConfiguredInstitutionControllerTest extends WebTestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var Client
- */
private KernelBrowser $client;
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
index bf0a68458..ee7e9acbe 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
@@ -31,9 +31,6 @@ class SraaControllerTest extends WebTestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var Client
- */
private KernelBrowser $client;
/**
@@ -41,9 +38,6 @@ class SraaControllerTest extends WebTestCase
*/
private array $accounts;
- /**
- * @var string
- */
private string $endpoint;
private DatabaseToolCollection $databaseTool;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
index 127486a42..9ef5b6cd6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
@@ -21,7 +21,9 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Mockery\Matcher\MatcherAbstract;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use stdClass;
use Surfnet\StepupMiddleware\ApiBundle\Exception\BadCommandRequestException;
use Surfnet\StepupMiddleware\ApiBundle\Request\CommandParamConverter;
@@ -62,14 +64,14 @@ public function it_can_convert_command_name_notation($expectedCommandClass, stri
{
$command = ['command' => ['name' => $commandName, 'uuid' => 'abcdef', 'payload' => new stdClass]];
- /** @var Request&m\Mock $request */
+ /** @var Request&MockInterface $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
$request->attributes = m::mock()
->shouldReceive('set')->with('command', m::type($expectedCommandClass))
->getMock();
- $configuration = m::mock('Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter');
+ $configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
$converter->apply($request, $configuration);
@@ -85,13 +87,14 @@ public function it_sets_uuid(): void
{
$command = ['command' => ['name' => 'Root:FooBar', 'uuid' => 'abcdef', 'payload' => new stdClass]];
+ /** @var Request&MockInterface $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
$request->attributes = m::mock()
->shouldReceive('set')->with('command', $this->spy($spiedCommand))
->getMock();
- $configuration = m::mock('Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter');
+ $configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
$converter->apply($request, $configuration);
@@ -107,13 +110,14 @@ public function it_sets_payload(): void
{
$command = ['command' => ['name' => 'Root:FooBar', 'uuid' => 'abcdef', 'payload' => ['snake_case' => true]]];
+ /** @var Request&MockInterface $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
$request->attributes = m::mock()
->shouldReceive('set')->with('command', $this->spy($spiedCommand))
->getMock();
- $configuration = m::mock('Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter');
+ $configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
$converter->apply($request, $configuration);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index 30b148fe0..490b21aa6 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -54,9 +54,6 @@ public function subscribe(EventListenerInterface $eventListener): void
$this->eventListeners[] = $eventListener;
}
- /**
- * @throws Throwable
- */
public function publish(DomainEventStreamInterface $domainMessages): void
{
foreach ($domainMessages as $domainMessage) {
@@ -66,6 +63,7 @@ public function publish(DomainEventStreamInterface $domainMessages): void
/**
* Flushes the buffered domain messages to all event listeners.
+ * @throws Exception
*/
public function flush(): void
{
@@ -93,7 +91,7 @@ public function flush(): void
// This comes with a caveat: event listeners cannot hold references to certain entities between events
$this->entityManager->clear();
}
- } catch (Exception $e) {
+ } catch (Throwable $e) {
$this->isFlushing = false;
array_splice($this->buffer, 0, 0, $buffer);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/Exception.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/Exception.php
index d311543e3..ce4fe5a24 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/Exception.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/Exception.php
@@ -18,6 +18,8 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Exception;
-interface Exception
+use Throwable;
+
+interface Exception extends Throwable
{
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/InvalidArgumentException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/InvalidArgumentException.php
index 9aceca79b..725a658ec 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/InvalidArgumentException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/InvalidArgumentException.php
@@ -20,14 +20,7 @@
class InvalidArgumentException extends \InvalidArgumentException implements Exception
{
- /**
- * @param string $expected description of expected type
- * @param string $parameterName
- * @param mixed $parameter the parameter that is not of the expected type.
- *
- * @return self
- */
- public static function invalidType($expected, $parameterName, mixed $parameter): self
+ public static function invalidType(string $expected, string $parameterName, mixed $parameter): self
{
$message = sprintf(
'Invalid argument type: "%s" expected, "%s" given for "%s"',
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
index d9a503bc4..ad2b99fc2 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
@@ -32,7 +32,7 @@ class AppointRoleCommand extends AbstractCommand implements RaExecutable
public $identityId;
/**
- * @var
+ * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Pipeline.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Pipeline.php
index fbdb8d1ac..9c81b2ca0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Pipeline.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Pipeline.php
@@ -18,7 +18,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
/**
* Describes a linear structure in which commands are processed. For example, authorisation may be checked and
@@ -26,8 +26,5 @@
*/
interface Pipeline
{
- /**
- * @return Command
- */
- public function process(Command $command);
+ public function process(AbstractCommand $command): AbstractCommand;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
index d5aaa6b0f..d993c48ec 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
use Psr\Log\LoggerInterface;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
class StagedPipeline implements Pipeline
@@ -32,7 +33,7 @@ public function __construct(private readonly LoggerInterface $logger)
{
}
- public function process(Command $command)
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(sprintf('Processing "%s"', $command));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/TransactionAwarePipeline.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/TransactionAwarePipeline.php
index 2023e488d..b74b2d761 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/TransactionAwarePipeline.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/TransactionAwarePipeline.php
@@ -21,7 +21,7 @@
use Doctrine\DBAL\Connection;
use Exception;
use Psr\Log\LoggerInterface;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
class TransactionAwarePipeline implements Pipeline
{
@@ -33,7 +33,7 @@ public function __construct(
) {
}
- public function process(Command $command)
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(
sprintf(
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
index 72f7ae228..7c12ca630 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
@@ -19,17 +19,18 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Mockery;
use Mockery\Exception\RuntimeException;
-use Mockery\Matcher\MatcherInterface;
+use Mockery\Matcher\MatcherAbstract;
-final class HasInstitutionMatcher implements MatcherInterface
+final class HasInstitutionMatcher extends MatcherAbstract
{
- public function __construct(private $expected)
+ public function __construct($expected)
{
- if (!is_string($this->expected)) {
+ if (!is_string($expected)) {
throw new RuntimeException(
sprintf('In order to use the %s, a string should be given.', self::class),
);
}
+ parent::__construct($expected);
}
public function match(&$actual): bool
@@ -39,10 +40,10 @@ public function match(&$actual): bool
}
if (method_exists($actual, 'getInstitution')) {
- return $this->expected === $actual->getInstitution();
+ return $this->_expected === $actual->getInstitution();
}
if (property_exists($actual, 'institution')) {
- return $this->expected === $actual->institution;
+ return $this->_expected === $actual->institution;
}
return false;
@@ -50,6 +51,6 @@ public function match(&$actual): bool
public function __toString(): string
{
- return sprintf('', $this->expected);
+ return sprintf('', $this->_expected);
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
index 3cce1632e..c0fd0f831 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
@@ -61,11 +61,10 @@ public function it_throws_an_exception_when_validation_fails(): void
$this->expectException(InvalidCommandException::class);
$command = m::mock(Command::class);
- $violations = m::mock(ConstraintViolationListInterface::class)
- ->shouldReceive('count')->with()->andReturn(1);
- $violations
- ->shouldReceive('getIterator')->with()->andReturn(new ArrayIterator())
- ->getMock();
+ $violations = m::mock(ConstraintViolationListInterface::class);
+ $violations->allows()->count()->andReturn(1);
+ $violations->allows()->getIterator()->andReturn(new ArrayIterator())->getMock();
+
$validator = m::mock(ValidatorInterface::class)
->shouldReceive('validate')->once()->with($command)->andReturn($violations)
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/InvalidArgumentException.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/InvalidArgumentException.php
index 4e4fa23d9..2f8d2533c 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/InvalidArgumentException.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/InvalidArgumentException.php
@@ -20,14 +20,7 @@
class InvalidArgumentException extends \InvalidArgumentException implements Exception
{
- /**
- * @param string $expected description of expected type
- * @param string $parameterName
- * @param mixed $parameter the parameter that is not of the expected type.
- *
- * @return self
- */
- public static function invalidType($expected, $parameterName, mixed $parameter): self
+ public static function invalidType(string $expected, string $parameterName, mixed $parameter): self
{
$message = sprintf(
'Invalid argument type: "%s" expected, "%s" given for "%s"',
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index a43404c5b..8e81795a9 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -85,7 +85,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$command->commonName = $input->getArgument('common-name');
$command->email = $input->getArgument('email');
$command->preferredLocale = $input->getArgument('preferred-locale');
- $command->secondFactorId = (string)Uuid::uuid4();
+ $secondFactorId = (string)Uuid::uuid4();
+ $command->secondFactorId = $secondFactorId;
$command->yubikeyPublicId = $input->getArgument('yubikey');
$this->transactionHelper->beginTransaction();
@@ -109,7 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln(
sprintf(
'Successfully registered a Yubikey token with UUID %s',
- $command->secondFactorId,
+ $secondFactorId,
),
);
return 0;
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/InvalidArgumentException.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/InvalidArgumentException.php
index 41d4c67f8..bf6bf3528 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/InvalidArgumentException.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/InvalidArgumentException.php
@@ -22,14 +22,7 @@
class InvalidArgumentException extends CoreInvalidArgumentException
{
- /**
- * @param string $expected description of expected type
- * @param string $parameterName
- * @param mixed $parameter the parameter that is not of the expected type.
- *
- * @return self
- */
- public static function invalidType($expected, $parameterName, mixed $parameter): self
+ public static function invalidType(string $expected, string $parameterName, mixed $parameter): self
{
$message = sprintf(
'Invalid argument type: "%s" expected, "%s" given for "%s"',
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
index 0ae8991e6..49ba7e401 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
@@ -20,6 +20,7 @@
use Broadway\Domain\DomainEventStream;
use Broadway\Domain\DomainMessage;
+use Doctrine\DBAL\Exception\InvalidArgumentException;
use Exception;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
use Surfnet\StepupMiddleware\MiddlewareBundle\EventSourcing\DBALEventHydrator;
@@ -85,7 +86,7 @@ public function replayEvents(OutputInterface $output, $increments): void
$preparationProgress->advance();
$preparationProgress->setMessage('Determining amount of events to replay...');
- $totalEvents = $this->eventHydrator->getCount();
+ $totalEvents = (int) $this->eventHydrator->getCount();
$preparationProgress->advance();
@@ -148,6 +149,9 @@ public function replayEvents(OutputInterface $output, $increments): void
}
}
+ /**
+ * @throws InvalidArgumentException|\Doctrine\DBAL\Exception
+ */
private function wipeReadTables(OutputInterface $output): void
{
if ($output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG) {
From 3dc4490cf39c77cad40d5f207edcccf24deeffdd Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Wed, 20 Mar 2024 09:38:28 +0100
Subject: [PATCH 40/89] Address level 3 PHPStan issues
---
.../Migrations/Version20210610131957.php | 9 +-
.../Configuration/Api/Configuration.php | 4 +-
.../Api/InstitutionConfiguration.php | 32 +--
.../Stepup/Configuration/Configuration.php | 6 +-
.../Configuration/Entity/RaLocation.php | 16 +-
.../Event/ConfigurationEvent.php | 2 +-
.../Event/ConfigurationUpdatedEvent.php | 4 +-
.../Event/EmailTemplatesUpdatedEvent.php | 2 +-
.../Event/IdentityProvidersUpdatedEvent.php | 2 +-
.../InstitutionConfigurationRemovedEvent.php | 4 +-
...ewInstitutionConfigurationCreatedEvent.php | 18 +-
.../Event/RaLocationAddedEvent.php | 12 +-
...LocationContactInformationChangedEvent.php | 6 +-
.../Event/RaLocationRelocatedEvent.php | 6 +-
.../Event/RaLocationRemovedEvent.php | 6 +-
.../Event/RaLocationRenamedEvent.php | 6 +-
.../Event/ServiceProvidersUpdatedEvent.php | 2 +-
.../Configuration/Event/SraaUpdatedEvent.php | 2 +-
.../InstitutionConfiguration.php | 71 +++----
.../Value/ContactInformation.php | 6 +-
.../Configuration/Value/Institution.php | 9 +-
.../Value/InstitutionAuthorizationOption.php | 5 +-
.../Value/InstitutionConfigurationId.php | 9 +-
.../Configuration/Value/InstitutionRole.php | 7 +-
.../Stepup/Configuration/Value/Location.php | 9 +-
.../Value/NumberOfTokensPerIdentityOption.php | 13 +-
.../Configuration/Value/RaLocationId.php | 9 +-
.../Configuration/Value/RaLocationList.php | 10 +-
.../Configuration/Value/RaLocationName.php | 12 +-
.../Value/ShowRaaContactInformationOption.php | 5 +-
.../Value/UseRaLocationsOption.php | 5 +-
.../Configuration/Value/VerifyEmailOption.php | 5 +-
src/Surfnet/Stepup/DateTime/DateTime.php | 30 +--
.../SecondFactorProvePossessionHelper.php | 3 -
src/Surfnet/Stepup/Identity/Api/Id.php | 5 +-
src/Surfnet/Stepup/Identity/Api/Identity.php | 179 ++++++-----------
src/Surfnet/Stepup/Identity/Api/Whitelist.php | 16 +-
.../Stepup/Identity/AuditLog/Metadata.php | 18 +-
.../Identity/Entity/ConfigurableSettings.php | 8 +-
.../Identity/Entity/InstitutionCollection.php | 2 +-
.../Identity/Entity/RegistrationAuthority.php | 16 +-
.../Entity/SecondFactorCollection.php | 5 +-
.../Entity/UnverifiedSecondFactor.php | 34 ++--
.../Identity/Entity/VerifiedSecondFactor.php | 40 ++--
.../Identity/Entity/VettedSecondFactor.php | 12 +-
.../AppointedAsRaForInstitutionEvent.php | 4 +-
.../Stepup/Identity/Event/AuditableEvent.php | 2 +-
...ompliedWithRecoveryCodeRevocationEvent.php | 6 +-
.../Event/CompliedWithRevocationEvent.php | 10 +-
.../Identity/Event/EmailVerifiedEvent.php | 32 +--
.../GssfPossessionProvenAndVerifiedEvent.php | 36 ++--
.../Event/GssfPossessionProvenEvent.php | 56 +++---
.../Event/IdentityAccreditedAsRaEvent.php | 8 +-
...ntityAccreditedAsRaForInstitutionEvent.php | 10 +-
.../Event/IdentityAccreditedAsRaaEvent.php | 8 +-
...tityAccreditedAsRaaForInstitutionEvent.php | 10 +-
.../Identity/Event/IdentityCreatedEvent.php | 10 +-
.../Event/IdentityEmailChangedEvent.php | 4 +-
.../Stepup/Identity/Event/IdentityEvent.php | 4 +-
.../Identity/Event/IdentityRenamedEvent.php | 4 +-
.../InstitutionsAddedToWhitelistEvent.php | 2 +-
.../InstitutionsRemovedFromWhitelistEvent.php | 2 +-
.../Event/LocalePreferenceExpressedEvent.php | 2 +-
.../PhonePossessionProvenAndVerifiedEvent.php | 34 ++--
.../Event/PhonePossessionProvenEvent.php | 40 ++--
...honeRecoveryTokenPossessionProvenEvent.php | 18 +-
.../Event/RecoveryTokenRevokedEvent.php | 4 +-
...rationAuthorityInformationAmendedEvent.php | 6 +-
...yInformationAmendedForInstitutionEvent.php | 8 +-
.../RegistrationAuthorityRetractedEvent.php | 8 +-
...nAuthorityRetractedForInstitutionEvent.php | 10 +-
...etRecoveryTokenPossessionPromisedEvent.php | 4 +-
.../Event/SecondFactorMigratedEvent.php | 20 +-
.../Event/SecondFactorMigratedToEvent.php | 12 +-
.../Event/SecondFactorRevokedEvent.php | 8 +-
.../Event/SecondFactorVettedEvent.php | 16 +-
...torVettedWithoutTokenProofOfPossession.php | 18 +-
...DevicePossessionProvenAndVerifiedEvent.php | 34 ++--
.../Event/U2fDevicePossessionProvenEvent.php | 40 ++--
.../Event/VettingTypeHintsSavedEvent.php | 4 +-
.../Identity/Event/WhitelistCreatedEvent.php | 2 +-
.../Identity/Event/WhitelistReplacedEvent.php | 2 +-
...ubikeyPossessionProvenAndVerifiedEvent.php | 35 ++--
.../Event/YubikeyPossessionProvenEvent.php | 44 ++---
.../YubikeySecondFactorBootstrappedEvent.php | 8 +-
src/Surfnet/Stepup/Identity/Identity.php | 184 +++++++++---------
.../Stepup/Identity/Value/CommonName.php | 6 +-
.../Identity/Value/ContactInformation.php | 13 +-
.../Stepup/Identity/Value/DocumentNumber.php | 11 +-
src/Surfnet/Stepup/Identity/Value/Email.php | 6 +-
.../Value/EmailVerificationWindow.php | 11 +-
src/Surfnet/Stepup/Identity/Value/GssfId.php | 6 +-
.../Stepup/Identity/Value/IdentityId.php | 2 +-
.../Stepup/Identity/Value/Institution.php | 9 +-
src/Surfnet/Stepup/Identity/Value/Locale.php | 7 +-
.../Stepup/Identity/Value/Location.php | 13 +-
src/Surfnet/Stepup/Identity/Value/NameId.php | 2 +-
.../Identity/Value/OnPremiseVettingType.php | 2 +-
.../Stepup/Identity/Value/PhoneNumber.php | 6 +-
.../Stepup/Identity/Value/RecoveryTokenId.php | 2 +-
.../Identity/Value/RecoveryTokenType.php | 2 +-
.../Value/RegistrationAuthorityRole.php | 7 +-
.../Stepup/Identity/Value/SecondFactorId.php | 2 +-
.../Identity/Value/SecondFactorIdentifier.php | 6 +-
.../SelfAssertedRegistrationVettingType.php | 2 +-
.../Identity/Value/SelfVetVettingType.php | 2 +-
.../Stepup/Identity/Value/StepupProvider.php | 2 +-
.../Stepup/Identity/Value/TimeFrame.php | 12 +-
.../Stepup/Identity/Value/U2fKeyHandle.php | 6 +-
.../Stepup/Identity/Value/UnhashedSecret.php | 2 +-
.../Identity/Value/UnknownVettingType.php | 2 +-
.../Stepup/Identity/Value/YubikeyPublicId.php | 6 +-
src/Surfnet/Stepup/Identity/Whitelist.php | 3 -
...entSerializationAndDeserializationTest.php | 3 -
.../Value/AllowedSecondFactorListTest.php | 6 +-
.../Value/ContactInformationTest.php | 5 +-
.../InstitutionAuthorizationOptionTest.php | 2 +-
.../Value/InstitutionConfigurationIdTest.php | 1 -
.../Configuration/Value/InstitutionTest.php | 23 ++-
.../Configuration/Value/LocationTest.php | 5 +-
.../Configuration/Value/RaLocationIdTest.php | 24 ++-
.../Value/RaLocationNameTest.php | 24 ++-
.../Stepup/Tests/Helper/JsonHelperTest.php | 1 -
.../Tests/Helper/UserDataFilterTest.php | 3 +-
.../Collection/InstitutionCollectionTest.php | 2 +-
.../Entity/SecondFactorCollectionTest.php | 5 +-
.../Identity/Event/ForgettableEventsTest.php | 3 +
...entSerializationAndDeserializationTest.php | 2 +-
.../Tests/Identity/Value/CommonNameTest.php | 26 ++-
.../Identity/Value/ContactInformationTest.php | 5 +-
.../Identity/Value/DocumentNumberTest.php | 25 ++-
.../Stepup/Tests/Identity/Value/EmailTest.php | 26 ++-
.../Value/EmailVerificationWindowTest.php | 6 +-
.../Tests/Identity/Value/InstitutionTest.php | 28 ++-
.../Tests/Identity/Value/LocationTest.php | 6 +-
.../Value/RegistrationAuthorityRoleTest.php | 5 +-
.../Tests/Identity/Value/TimeFrameTest.php | 37 +++-
.../Doctrine/Type/CommonNameType.php | 3 +-
.../ConfigurationContactInformationType.php | 5 +-
.../Type/ConfigurationLocationType.php | 5 +-
.../Doctrine/Type/ContactInformationType.php | 5 +-
.../Doctrine/Type/DocumentNumberType.php | 2 +
.../ApiBundle/Doctrine/Type/LocaleType.php | 5 +-
.../ApiBundle/Doctrine/Type/LocationType.php | 5 +-
.../Identity/Entity/AuditLogEntry.php | 73 ++-----
.../ApiBundle/Identity/Entity/Identity.php | 31 +--
.../IdentitySelfAssertedTokenOptions.php | 6 +-
.../Identity/Entity/InstitutionListing.php | 2 +-
.../ApiBundle/Identity/Entity/RaCandidate.php | 12 +-
.../ApiBundle/Identity/Entity/RaListing.php | 18 +-
.../Identity/Entity/RaSecondFactor.php | 24 +--
.../Identity/Entity/RecoveryToken.php | 16 +-
.../Entity/SecondFactorRevocation.php | 10 +-
.../Entity/UnverifiedSecondFactor.php | 10 +-
.../Identity/Entity/VerifiedSecondFactor.php | 40 +---
.../Identity/Entity/VettedSecondFactor.php | 10 +-
.../Identity/Projector/AuditLogProjector.php | 4 +-
.../Identity/Projector/RaListingProjector.php | 2 +-
.../Projector/RaSecondFactorProjector.php | 33 ++--
.../Projector/RecoveryTokenProjector.php | 2 +-
.../Projector/SecondFactorProjector.php | 17 +-
.../SecondFactorRevocationProjector.php | 6 +-
.../Identity/Projector/WhitelistProjector.php | 8 +-
.../Identity/Query/AbstractQuery.php | 4 +-
.../Identity/Query/IdentityQuery.php | 8 +-
.../Identity/Query/RaCandidateQuery.php | 12 +-
.../Identity/Query/RaListingQuery.php | 18 +-
.../Identity/Query/RaSecondFactorQuery.php | 18 +-
.../ApiBundle/Identity/Query/RaaQuery.php | 4 +-
.../Identity/Query/RecoveryTokenQuery.php | 18 +-
.../Query/SecondFactorAuditLogQuery.php | 8 +-
.../Query/UnverifiedSecondFactorQuery.php | 4 +-
.../VerifiedSecondFactorOfIdentityQuery.php | 2 +-
.../Query/VerifiedSecondFactorQuery.php | 8 +-
.../Query/VettedSecondFactorQuery.php | 2 +-
.../Repository/IdentityRepository.php | 8 +-
...titySelfAssertedTokenOptionsRepository.php | 2 -
.../Repository/RaCandidateRepository.php | 4 +-
.../Repository/RaSecondFactorRepository.php | 4 +-
.../VerifiedSecondFactorRepository.php | 7 +-
.../Repository/WhitelistEntryRepository.php | 2 +-
.../Service/AbstractSearchService.php | 2 +-
.../Identity/Service/AuditLogService.php | 2 +-
.../Identity/Service/IdentityService.php | 5 +-
.../Identity/Service/ProfileService.php | 4 +-
.../Identity/Service/RaCandidateService.php | 6 +-
.../Identity/Service/RaListingService.php | 9 +-
.../Service/RaSecondFactorService.php | 6 +-
.../Identity/Service/RecoveryTokenService.php | 2 +-
.../Identity/Service/SecondFactorService.php | 8 +-
.../Identity/Service/SraaService.php | 4 +-
.../Identity/Service/WhitelistService.php | 4 +-
.../Specification/SpecificationInterface.php | 2 +-
.../Identity/Value/AuthorityRole.php | 8 +-
.../Value/AuthorizedInstitutionCollection.php | 16 +-
.../ApiBundle/Identity/Value/Profile.php | 4 +-
.../Identity/Value/SecondFactorStatus.php | 4 +-
.../Request/CommandParamConverter.php | 3 +-
...ConfigurationInstitutionParamConverter.php | 3 +-
.../Request/InstitutionParamConverter.php | 4 +-
.../Request/MetadataParamConverter.php | 3 +-
.../CommandAuthorizationServiceTest.php | 7 +
...onfigurationContactInformationTypeTest.php | 2 +
.../Type/ConfigurationLocationTypeTest.php | 2 +
.../Type/ContactInformationTypeTest.php | 2 +
.../Doctrine/Type/DocumentNumberTypeTest.php | 5 +-
.../Tests/Doctrine/Type/LocaleTypeTest.php | 2 +
.../Tests/Doctrine/Type/LocationTypeTest.php | 2 +
.../ConfiguredInstitutionControllerTest.php | 8 +-
.../Tests/Endpoint/SraaControllerTest.php | 5 +-
.../Projector/AuditLogProjectorTest.php | 22 +--
.../Identity/Projector/Event/EventStub.php | 2 +-
.../Request/CommandParamConverterTest.php | 24 ++-
.../Command/AbstractCommand.php | 2 +-
.../Command/Metadata.php | 4 +-
.../Command/RaExecutable.php | 4 +-
.../Command/SelfServiceExecutable.php | 2 +-
.../Command/AddRaLocationCommand.php | 15 +-
.../Command/ChangeRaLocationCommand.php | 12 +-
.../CreateInstitutionConfigurationCommand.php | 2 +-
...InstitutionConfigurationOptionsCommand.php | 22 +--
...onConfigurationByUnnormalizedIdCommand.php | 2 +-
.../Command/RemoveRaLocationCommand.php | 6 +-
.../Command/UpdateConfigurationCommand.php | 2 +-
.../ConfigurationCommandHandler.php | 1 -
.../Configuration/Dto/EmailTemplate.php | 6 +-
.../Service/EmailTemplateService.php | 6 +-
.../Dto/VettingLocation.php | 2 +-
.../EventHandling/BufferedEventBus.php | 2 +-
.../EventSourcing/MetadataEnricher.php | 2 +-
.../SecondFactorNotAllowedException.php | 4 +-
.../Command/AccreditIdentityCommand.php | 41 +---
...egistrationAuthorityInformationCommand.php | 10 +-
.../Identity/Command/AppointRoleCommand.php | 8 +-
...IdentityWithYubikeySecondFactorCommand.php | 16 +-
.../Command/CreateIdentityCommand.php | 14 +-
.../ExpressLocalePreferenceCommand.php | 11 +-
.../Command/ForgetIdentityCommand.php | 4 +-
.../MigrateVettedSecondFactorCommand.php | 8 +-
...eSafeStoreSecretTokenPossessionCommand.php | 13 +-
.../Command/ProveGssfPossessionCommand.php | 10 +-
.../Command/ProvePhonePossessionCommand.php | 8 +-
...ovePhoneRecoveryTokenPossessionCommand.php | 19 +-
.../ProveU2fDevicePossessionCommand.php | 8 +-
.../Command/ProveYubikeyPossessionCommand.php | 8 +-
...egisterSelfAssertedSecondFactorCommand.php | 14 +-
.../RetractRegistrationAuthorityCommand.php | 6 +-
.../Command/RevokeOwnRecoveryTokenCommand.php | 6 +-
.../Command/RevokeOwnSecondFactorCommand.php | 6 +-
.../RevokeRegistrantsRecoveryTokenCommand.php | 11 +-
.../RevokeRegistrantsSecondFactorCommand.php | 8 +-
.../Command/SaveVettingTypeHintCommand.php | 6 +-
.../Command/SelfVetSecondFactorCommand.php | 35 +---
...ndSecondFactorRegistrationEmailCommand.php | 6 +-
...ndVerifiedSecondFactorRemindersCommand.php | 4 +-
.../Command/UpdateIdentityCommand.php | 8 +-
.../Identity/Command/VerifyEmailCommand.php | 6 +-
.../Command/VetSecondFactorCommand.php | 20 +-
.../CommandHandler/IdentityCommandHandler.php | 2 +-
.../RegistrationAuthorityCommandHandler.php | 8 +-
.../WhitelistCommandHandler.php | 10 +-
.../Service/RecoveryTokenMailService.php | 2 +-
.../Service/RegistrationMailService.php | 6 +-
.../SecondFactorRevocationMailService.php | 2 +-
.../Service/SecondFactorVettedMailService.php | 2 +-
.../Pipeline/AuthorizingStage.php | 4 +-
.../Pipeline/DispatchStage.php | 4 +-
.../Pipeline/EventDispatchingStage.php | 4 +-
.../Exception/InvalidCommandException.php | 2 +-
.../Exception/ProcessingAbortedException.php | 2 +-
.../CommandHandlingBundle/Pipeline/Stage.php | 7 +-
.../Pipeline/StagedPipeline.php | 1 -
.../Pipeline/ValidationStage.php | 4 +-
.../EventSourcing/SensitiveDataMessage.php | 6 +-
.../SensitiveData/Forgettable.php | 4 +-
.../SensitiveData/SensitiveData.php | 5 +-
.../Tests/Command/FixedUuidStubCommand.php | 2 +-
...itutionConfigurationCommandHandlerTest.php | 1 -
.../InstitutionConfigurationProcessorTest.php | 5 +-
.../EventHandling/BufferedEventBusTest.php | 3 +-
...ndPublishToBusOnFirstCallEventListener.php | 2 +-
.../IdentityCommandHandlerMoveTokenTest.php | 21 +-
...tyCommandHandlerSelfAssertedTokensTest.php | 32 +--
.../IdentityCommandHandlerTest.php | 36 +---
...IdentityIdEnforcingEventStoreDecorator.php | 2 +-
...egistrationAuthorityCommandHandlerTest.php | 10 +-
.../RightToBeForgottenCommandHandlerTest.php | 6 +-
.../Tests/Pipeline/AuthorizingStageTest.php | 8 +-
.../RecoveryTokenEmailProcessorTest.php | 17 +-
.../EventSourcing/ForgettableEventStub.php | 4 +-
.../Value/Institution.php | 4 +-
.../Service/EmailTemplateService.php | 2 +-
.../ConfigurationControllerTest.php | 6 +-
...InstitutionConfigurationControllerTest.php | 6 +-
.../BootstrapGsspSecondFactorCommand.php | 7 +-
.../Command/BootstrapIdentityCommand.php | 8 +-
.../BootstrapSmsSecondFactorCommand.php | 7 +-
.../BootstrapYubikeySecondFactorCommand.php | 7 +-
.../Command/MigrateSecondFactorCommand.php | 5 +-
.../EventSourcing/DBALEventHydrator.php | 7 +-
...erifiedSecondFactorReminderServiceTest.php | 20 +-
301 files changed, 1522 insertions(+), 1734 deletions(-)
diff --git a/src/Surfnet/Migrations/Version20210610131957.php b/src/Surfnet/Migrations/Version20210610131957.php
index 0846335d3..35f662f55 100644
--- a/src/Surfnet/Migrations/Version20210610131957.php
+++ b/src/Surfnet/Migrations/Version20210610131957.php
@@ -5,8 +5,6 @@
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
-use function json_decode;
-use function json_encode;
/**
* This migration removes sensitive data (vetting type) from the event stream
@@ -36,11 +34,12 @@ public function up(Schema $schema): void
// Do not show warning on migrations.
$this->addSql('# Updating entities.');
- $affectedEventStreamRows = $this->connection->executeQuery(self::$select);
+ $result = $this->connection->executeQuery(self::$select);
- $this->write("Affected records: {$affectedEventStreamRows->rowCount()}");
+ $affectedEventStreamRows = $result->fetchAllAssociative();
+ $this->write("Affected records: {$result->rowCount()}");
- if ($affectedEventStreamRows->rowCount() === 0) {
+ if ($result->rowCount() === 0) {
return;
}
diff --git a/src/Surfnet/Stepup/Configuration/Api/Configuration.php b/src/Surfnet/Stepup/Configuration/Api/Configuration.php
index 5d77d8281..2857d3e6b 100644
--- a/src/Surfnet/Stepup/Configuration/Api/Configuration.php
+++ b/src/Surfnet/Stepup/Configuration/Api/Configuration.php
@@ -25,11 +25,11 @@ interface Configuration extends AggregateRoot
/**
* @return Configuration
*/
- public static function create();
+ public static function create(): Configuration;
/**
* @param string $newConfiguration
* @return void
*/
- public function update($newConfiguration);
+ public function update(string $newConfiguration): void;
}
diff --git a/src/Surfnet/Stepup/Configuration/Api/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/Api/InstitutionConfiguration.php
index a0dd6a12a..5c8a1b7d3 100644
--- a/src/Surfnet/Stepup/Configuration/Api/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/Api/InstitutionConfiguration.php
@@ -30,50 +30,32 @@
interface InstitutionConfiguration extends AggregateRoot
{
- /**
- * @return InstitutionConfiguration
- */
- public static function create(InstitutionConfigurationId $institutionConfigurationId, Institution $institution);
+ public static function create(InstitutionConfigurationId $institutionConfigurationId, Institution $institution): InstitutionConfiguration;
- /**
- * @return void
- */
- public function configureUseRaLocationsOption(UseRaLocationsOption $useRaLocationsOption);
+ public function configureUseRaLocationsOption(UseRaLocationsOption $useRaLocationsOption): void;
- /**
- * @return void
- */
public function configureShowRaaContactInformationOption(
ShowRaaContactInformationOption $showRaaContactInformationOption,
- );
+ ): void;
- /**
- * @return void
- */
public function addRaLocation(
RaLocationId $raLocationId,
RaLocationName $raLocationName,
Location $location,
ContactInformation $contactInformation,
- );
+ ): void;
- /**
- * @return void
- */
public function changeRaLocation(
RaLocationId $raLocationId,
RaLocationName $raLocationName,
Location $location,
ContactInformation $contactInformation,
- );
+ ): void;
- /**
- * @return void
- */
- public function removeRaLocation(RaLocationId $raLocationId);
+ public function removeRaLocation(RaLocationId $raLocationId): void;
/**
* @return void
*/
- public function destroy();
+ public function destroy(): void;
}
diff --git a/src/Surfnet/Stepup/Configuration/Configuration.php b/src/Surfnet/Stepup/Configuration/Configuration.php
index 98fb67b94..aa1490cdc 100644
--- a/src/Surfnet/Stepup/Configuration/Configuration.php
+++ b/src/Surfnet/Stepup/Configuration/Configuration.php
@@ -38,7 +38,7 @@ class Configuration extends EventSourcedAggregateRoot implements ConfigurationIn
/**
* @var array
*/
- private $configuration;
+ private array $configuration;
public static function create(): self
{
@@ -48,9 +48,9 @@ public static function create(): self
return $configuration;
}
- public function update($configurationAsJson): void
+ public function update(string $newConfiguration): void
{
- $decodedConfiguration = JsonHelper::decode($configurationAsJson);
+ $decodedConfiguration = JsonHelper::decode($newConfiguration);
$this->apply(
new ConfigurationUpdatedEvent(
diff --git a/src/Surfnet/Stepup/Configuration/Entity/RaLocation.php b/src/Surfnet/Stepup/Configuration/Entity/RaLocation.php
index e1714b094..73b4bb69d 100644
--- a/src/Surfnet/Stepup/Configuration/Entity/RaLocation.php
+++ b/src/Surfnet/Stepup/Configuration/Entity/RaLocation.php
@@ -25,9 +25,6 @@
class RaLocation
{
- /**
- * @return RaLocation
- */
public static function create(
RaLocationId $id,
RaLocationName $name,
@@ -60,10 +57,7 @@ public function changeContactInformation(ContactInformation $contactInformation)
$this->contactInformation = $contactInformation;
}
- /**
- * @return bool
- */
- public function hasId(RaLocationId $otherId)
+ public function hasId(RaLocationId $otherId): bool
{
return $this->id->equals($otherId);
}
@@ -71,7 +65,7 @@ public function hasId(RaLocationId $otherId)
/**
* @return RaLocationId
*/
- public function getId()
+ public function getId(): RaLocationId
{
return $this->id;
}
@@ -79,7 +73,7 @@ public function getId()
/**
* @return RaLocationName
*/
- public function getName()
+ public function getName(): RaLocationName
{
return $this->name;
}
@@ -87,7 +81,7 @@ public function getName()
/**
* @return Location
*/
- public function getLocation()
+ public function getLocation(): Location
{
return $this->location;
}
@@ -95,7 +89,7 @@ public function getLocation()
/**
* @return ContactInformation
*/
- public function getContactInformation()
+ public function getContactInformation(): ContactInformation
{
return $this->contactInformation;
}
diff --git a/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php b/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
index 3080aaf9d..c62e3cdcf 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
@@ -27,7 +27,7 @@ abstract class ConfigurationEvent implements SerializableInterface
/**
* @var string
*/
- public $id;
+ public string $id;
public function __construct($id)
{
diff --git a/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
index 276fcc822..f5352c46f 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
@@ -23,12 +23,12 @@ class ConfigurationUpdatedEvent extends ConfigurationEvent
/**
* @var array
*/
- public $newConfiguration;
+ public array $newConfiguration;
/**
* @var array|null
*/
- public $oldConfiguration;
+ public ?array $oldConfiguration;
/**
* @param string $id
diff --git a/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
index 42cf84533..907050773 100644
--- a/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
@@ -23,7 +23,7 @@ class EmailTemplatesUpdatedEvent extends ConfigurationEvent
/**
* @var array
*/
- public $emailTemplates;
+ public array $emailTemplates;
/**
* @param string $configurationId
diff --git a/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
index aee223294..08514bf77 100644
--- a/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
@@ -23,7 +23,7 @@ class IdentityProvidersUpdatedEvent extends ConfigurationEvent
/**
* @var array
*/
- public $identityProviders;
+ public array $identityProviders;
/**
* @param string $configurationId
diff --git a/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php b/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
index 264543d36..aba2495e0 100644
--- a/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
@@ -27,12 +27,12 @@ class InstitutionConfigurationRemovedEvent implements SerializableInterface
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
public function __construct(InstitutionConfigurationId $institutionConfigurationId, Institution $institution)
{
diff --git a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
index 4afe25f42..e85fe71ea 100644
--- a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
@@ -38,46 +38,46 @@ class NewInstitutionConfigurationCreatedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
/**
* @var UseRaLocationsOption
*/
- public $useRaLocationsOption;
+ public UseRaLocationsOption $useRaLocationsOption;
/**
* @var ShowRaaContactInformationOption
*/
- public $showRaaContactInformationOption;
+ public ShowRaaContactInformationOption $showRaaContactInformationOption;
/**
* @var VerifyEmailOption
*/
- public $verifyEmailOption;
+ public VerifyEmailOption $verifyEmailOption;
/**
* @var NumberOfTokensPerIdentityOption
*/
- public $numberOfTokensPerIdentityOption;
+ public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption;
/**
* @var SelfVetOption
*/
- public $selfVetOption;
+ public SelfVetOption $selfVetOption;
/**
* @var SelfAssertedTokensOption
*/
- public $selfAssertedTokensOption;
+ public SelfAssertedTokensOption $selfAssertedTokensOption;
/**
* @var SsoOn2faOption
*/
- public $ssoOn2faOption;
+ public SsoOn2faOption $ssoOn2faOption;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
index 960e54cf7..7459b50ac 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
@@ -31,31 +31,31 @@ class RaLocationAddedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
/**
* @var RaLocationId
*/
- public $raLocationId;
+ public RaLocationId $raLocationId;
/**
* @var RaLocationName
*/
- public $raLocationName;
+ public RaLocationName $raLocationName;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
index 2326664cb..c3bcc3ff7 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
@@ -28,17 +28,17 @@ class RaLocationContactInformationChangedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var RaLocationId
*/
- public $raLocationId;
+ public RaLocationId $raLocationId;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
index 0eb8c2e6f..8a37c040d 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
@@ -28,17 +28,17 @@ class RaLocationRelocatedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var RaLocationId
*/
- public $raLocationId;
+ public RaLocationId $raLocationId;
/**
* @var Location
*/
- public $location;
+ public Location $location;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
index f03d7308d..2a2bf8eed 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
@@ -28,17 +28,17 @@ class RaLocationRemovedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
/**
* @var RaLocationId
*/
- public $raLocationId;
+ public RaLocationId $raLocationId;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
index 3452532cf..4d775a2bf 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
@@ -28,17 +28,17 @@ class RaLocationRenamedEvent implements SerializableInterface
/**
* @var InstitutionConfigurationId
*/
- public $institutionConfigurationId;
+ public InstitutionConfigurationId $institutionConfigurationId;
/**
* @var RaLocationId
*/
- public $raLocationId;
+ public RaLocationId $raLocationId;
/**
* @var RaLocationName
*/
- public $raLocationName;
+ public RaLocationName $raLocationName;
public function __construct(
InstitutionConfigurationId $institutionConfigurationId,
diff --git a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
index 30cd4feee..cbbf318da 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
@@ -23,7 +23,7 @@ class ServiceProvidersUpdatedEvent extends ConfigurationEvent
/**
* @var array
*/
- public $serviceProviders;
+ public array $serviceProviders;
/**
* @param string $configurationId
diff --git a/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
index a2c78f3cf..5d6c7ec2c 100644
--- a/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
@@ -23,7 +23,7 @@ class SraaUpdatedEvent extends ConfigurationEvent
/**
* @var array
*/
- public $sraaList;
+ public array $sraaList;
/**
* @param string $configurationId
diff --git a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
index 2d23025cd..f7fdae537 100644
--- a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
@@ -78,70 +78,70 @@ class InstitutionConfiguration extends EventSourcedAggregateRoot implements Inst
/**
* @var InstitutionConfigurationId
*/
- private $institutionConfigurationId;
+ private InstitutionConfigurationId $institutionConfigurationId;
/**
* @var Institution
*/
- private $institution;
+ private Institution $institution;
private ?RaLocationList $raLocations = null;
/**
* @var UseRaLocationsOption
*/
- private $useRaLocationsOption;
+ private UseRaLocationsOption $useRaLocationsOption;
/**
* @var ShowRaaContactInformationOption
*/
- private $showRaaContactInformationOption;
+ private ShowRaaContactInformationOption $showRaaContactInformationOption;
/**
* @var VerifyEmailOption
*/
- private $verifyEmailOption;
+ private VerifyEmailOption $verifyEmailOption;
/**
* @var NumberOfTokensPerIdentityOption
*/
- private $numberOfTokensPerIdentityOption;
+ private NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption;
/**
* @var SelfVetOption
*/
- private $selfVetOption;
+ private SelfVetOption $selfVetOption;
/**
* @var SsoOn2faOption
*/
- private $ssoOn2faOption;
+ private SsoOn2faOption $ssoOn2faOption;
/**
* @var SelfAssertedTokensOption
*/
- private $selfAssertedTokensOption;
+ private SelfAssertedTokensOption $selfAssertedTokensOption;
/**
* @var InstitutionAuthorizationOption
*/
- private $useRaOption;
+ private InstitutionAuthorizationOption $useRaOption;
/**
* @var InstitutionAuthorizationOption
*/
- private $useRaaOption;
+ private InstitutionAuthorizationOption $useRaaOption;
/**
* @var InstitutionAuthorizationOption
*/
- private $selectRaaOption;
+ private InstitutionAuthorizationOption $selectRaaOption;
/**
* @var AllowedSecondFactorList
*/
- private $allowedSecondFactorList;
+ private AllowedSecondFactorList $allowedSecondFactorList;
private ?bool $isMarkedAsDestroyed = null;
@@ -550,9 +550,8 @@ public function getAggregateRootId(): string
/**
* Check if role from institution is allowed to accredit roles
*
- * @return bool
*/
- public function isInstitutionAllowedToAccreditRoles(Institution $institution)
+ public function isInstitutionAllowedToAccreditRoles(Institution $institution): bool
{
// This method is needed to support the situation pre FGA. In that situation the SelectRaaOptionChanged wasn't
// fired and that would result in a situation were $this->selectRaaOption is null. If that occurs we should check
@@ -563,7 +562,7 @@ public function isInstitutionAllowedToAccreditRoles(Institution $institution)
return $this->selectRaaOption->hasInstitution($institution, $this->institution);
}
- protected function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionConfigurationCreatedEvent $event)
+ protected function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionConfigurationCreatedEvent $event): void
{
$this->institutionConfigurationId = $event->institutionConfigurationId;
$this->institution = $event->institution;
@@ -588,68 +587,74 @@ protected function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionCo
*
* This also applies for applyUseRaaOptionChangedEvent & applySelectRaaOptionChangedEvent
*/
- protected function applyUseRaOptionChangedEvent(UseRaOptionChangedEvent $event)
+ protected function applyUseRaOptionChangedEvent(UseRaOptionChangedEvent $event): void
{
$this->useRaOption = $event->useRaOption;
}
- protected function applyUseRaaOptionChangedEvent(UseRaaOptionChangedEvent $event)
+ protected function applyUseRaaOptionChangedEvent(UseRaaOptionChangedEvent $event): void
{
$this->useRaaOption = $event->useRaaOption;
}
- protected function applySelectRaaOptionChangedEvent(SelectRaaOptionChangedEvent $event)
+ protected function applySelectRaaOptionChangedEvent(SelectRaaOptionChangedEvent $event): void
{
$this->selectRaaOption = $event->selectRaaOption;
}
- protected function applyUseRaLocationsOptionChangedEvent(UseRaLocationsOptionChangedEvent $event)
+ protected function applyUseRaLocationsOptionChangedEvent(UseRaLocationsOptionChangedEvent $event): void
{
$this->useRaLocationsOption = $event->useRaLocationsOption;
}
protected function applyShowRaaContactInformationOptionChangedEvent(
ShowRaaContactInformationOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->showRaaContactInformationOption = $event->showRaaContactInformationOption;
}
protected function applyVerifyEmailOptionChangedEvent(
VerifyEmailOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->verifyEmailOption = $event->verifyEmailOption;
}
protected function applySelfVetOptionChangedEvent(
SelfVetOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->selfVetOption = $event->selfVetOption;
}
protected function applySelfAssertedTokensOptionChangedEvent(
SelfAssertedTokensOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->selfAssertedTokensOption = $event->selfAssertedTokensOption;
}
protected function applySsoOn2faOptionChangedEvent(
SsoOn2faOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->ssoOn2faOption = $event->ssoOn2faOption;
}
protected function applyNumberOfTokensPerIdentityOptionChangedEvent(
NumberOfTokensPerIdentityOptionChangedEvent $event,
- ) {
+ ): void
+ {
$this->numberOfTokensPerIdentityOption = $event->numberOfTokensPerIdentityOption;
}
- protected function applyAllowedSecondFactorListUpdatedEvent(AllowedSecondFactorListUpdatedEvent $event)
+ protected function applyAllowedSecondFactorListUpdatedEvent(AllowedSecondFactorListUpdatedEvent $event): void
{
$this->allowedSecondFactorList = $event->allowedSecondFactorList;
}
- protected function applyRaLocationAddedEvent(RaLocationAddedEvent $event)
+ protected function applyRaLocationAddedEvent(RaLocationAddedEvent $event): void
{
$this->raLocations->add(
RaLocation::create(
@@ -661,25 +666,25 @@ protected function applyRaLocationAddedEvent(RaLocationAddedEvent $event)
);
}
- protected function applyRaLocationRenamedEvent(RaLocationRenamedEvent $event)
+ protected function applyRaLocationRenamedEvent(RaLocationRenamedEvent $event): void
{
$raLocation = $this->raLocations->getById($event->raLocationId);
$raLocation->rename($event->raLocationName);
}
- protected function applyRaLocationRelocatedEvent(RaLocationRelocatedEvent $event)
+ protected function applyRaLocationRelocatedEvent(RaLocationRelocatedEvent $event): void
{
$raLocation = $this->raLocations->getById($event->raLocationId);
$raLocation->relocate($event->location);
}
- protected function applyRaLocationContactInformationChangedEvent(RaLocationContactInformationChangedEvent $event)
+ protected function applyRaLocationContactInformationChangedEvent(RaLocationContactInformationChangedEvent $event): void
{
$raLocation = $this->raLocations->getById($event->raLocationId);
$raLocation->changeContactInformation($event->contactInformation);
}
- protected function applyRaLocationRemovedEvent(RaLocationRemovedEvent $event)
+ protected function applyRaLocationRemovedEvent(RaLocationRemovedEvent $event): void
{
$this->raLocations->removeWithId($event->raLocationId);
}
@@ -687,7 +692,7 @@ protected function applyRaLocationRemovedEvent(RaLocationRemovedEvent $event)
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
- protected function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event)
+ protected function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void
{
// reset all configuration to defaults. This way, should it be rebuild, it seems like it is new again
$this->raLocations = new RaLocationList([]);
diff --git a/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php b/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
index 20b96978f..ff7c1fa8d 100644
--- a/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
+++ b/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
@@ -1,5 +1,7 @@
contactInformation;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/Institution.php b/src/Surfnet/Stepup/Configuration/Value/Institution.php
index c4cbf3029..9920d80e8 100644
--- a/src/Surfnet/Stepup/Configuration/Value/Institution.php
+++ b/src/Surfnet/Stepup/Configuration/Value/Institution.php
@@ -1,5 +1,7 @@
institution;
}
- /**
- * @return bool
- */
public function equals(Institution $otherInstitution): bool
{
return $this->institution === $otherInstitution->institution;
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
index fb7354d93..a7acf308d 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
@@ -29,12 +29,11 @@ final class InstitutionAuthorizationOption implements JsonSerializable
* will take the current institution into account when returning institutions.
*
* AbstractRoleOption constructor.
- * @param bool $isDefault
*/
private function __construct(
private readonly InstitutionRole $institutionRole,
- private readonly InstitutionSet $institutionSet,
- $isDefault,
+ private readonly InstitutionSet $institutionSet,
+ bool $isDefault,
) {
$this->isDefault = (bool)$isDefault;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
index 145f1785e..27cf86c22 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
@@ -30,7 +30,6 @@ final class InstitutionConfigurationId implements JsonSerializable, Stringable
private readonly string $institutionConfigurationId;
/**
- * @return InstitutionConfigurationId
* @deprecated To be removed in next release; use normalizedFrom method to account for case-(in)sensitivity issues
*
*/
@@ -39,9 +38,6 @@ public static function from(Institution $institution): self
return new self((string)Uuid::uuid5(self::UUID_NAMESPACE, $institution->getInstitution()));
}
- /**
- * @return InstitutionConfigurationId
- */
public static function normalizedFrom(Institution $institution): self
{
return new self((string)Uuid::uuid5(self::UUID_NAMESPACE, strtolower($institution->getInstitution())));
@@ -68,9 +64,6 @@ public function __construct($institutionConfigurationId)
$this->institutionConfigurationId = $institutionConfigurationId;
}
- /**
- * @return bool
- */
public function equals(InstitutionConfigurationId $otherInstitutionConfigurationId): bool
{
return $this->institutionConfigurationId === $otherInstitutionConfigurationId->institutionConfigurationId;
@@ -79,7 +72,7 @@ public function equals(InstitutionConfigurationId $otherInstitutionConfiguration
/**
* @return string
*/
- public function getInstitutionConfigurationId()
+ public function getInstitutionConfigurationId(): string
{
return $this->institutionConfigurationId;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
index 8e702ed6b..e528ca3b3 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
@@ -36,7 +36,7 @@ final class InstitutionRole implements JsonSerializable, Stringable
/**
* @var string
*/
- private $type;
+ private string $type;
/**
* InstitutionRole constructor.
@@ -75,9 +75,6 @@ public static function selectRaa(): self
return new self(self::ROLE_SELECT_RAA);
}
- /**
- * @return bool
- */
public function equals(InstitutionRole $role): bool
{
return $this->type == $role->getType();
@@ -86,7 +83,7 @@ public function equals(InstitutionRole $role): bool
/**
* @return string
*/
- public function getType()
+ public function getType(): string
{
return $this->type;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/Location.php b/src/Surfnet/Stepup/Configuration/Value/Location.php
index c06997195..55f35b5c8 100644
--- a/src/Surfnet/Stepup/Configuration/Value/Location.php
+++ b/src/Surfnet/Stepup/Configuration/Value/Location.php
@@ -1,5 +1,7 @@
location = trim($location);
}
- /**
- * @return bool
- */
public function equals(Location $otherLocation): bool
{
return $this->location === $otherLocation->location;
@@ -49,7 +48,7 @@ public function equals(Location $otherLocation): bool
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->location;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php b/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
index 6f367f205..d19b18632 100644
--- a/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
@@ -25,10 +25,7 @@ class NumberOfTokensPerIdentityOption implements JsonSerializable
{
public const DISABLED = 0;
- /**
- * @var int
- */
- private $numberOfTokensPerIdentity;
+ private int $numberOfTokensPerIdentity;
public static function getDefault(): self
{
@@ -48,9 +45,6 @@ public function __construct($numberOfTokensPerIdentity)
$this->numberOfTokensPerIdentity = $numberOfTokensPerIdentity;
}
- /**
- * @return bool
- */
public function equals(NumberOfTokensPerIdentityOption $other): bool
{
return $this->numberOfTokensPerIdentity === $other->numberOfTokensPerIdentity;
@@ -64,10 +58,7 @@ public function isEnabled(): bool
return $this->numberOfTokensPerIdentity > self::DISABLED;
}
- /**
- * @return int
- */
- public function getNumberOfTokensPerIdentity()
+ public function getNumberOfTokensPerIdentity(): int
{
return $this->numberOfTokensPerIdentity;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
index ffaa36baa..798873c5a 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
@@ -1,5 +1,7 @@
raLocationId = $raLocationId;
}
- /**
- * @return bool
- */
public function equals(RaLocationId $otherRaLocationId): bool
{
return $this->raLocationId === $otherRaLocationId->raLocationId;
@@ -62,7 +61,7 @@ public function equals(RaLocationId $otherRaLocationId): bool
/**
* @return string
*/
- public function getRaLocationId()
+ public function getRaLocationId(): string
{
return $this->raLocationId;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
index b1444a644..0a092ec52 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
@@ -29,7 +29,7 @@ final class RaLocationList implements IteratorAggregate
/**
* @var RaLocation[]
*/
- private $raLocations = [];
+ private array $raLocations = [];
public function __construct(array $raLocations)
{
@@ -38,9 +38,6 @@ public function __construct(array $raLocations)
}
}
- /**
- * @return bool
- */
public function containsWithId(RaLocationId $raLocationId): bool
{
foreach ($this->raLocations as $raLocation) {
@@ -85,10 +82,7 @@ public function removeWithId(RaLocationId $raLocationId): void
);
}
- /**
- * @return RaLocation
- */
- public function getById(RaLocationId $raLocationId)
+ public function getById(RaLocationId $raLocationId): RaLocation
{
foreach ($this->raLocations as $raLocation) {
if ($raLocation->hasId($raLocationId)) {
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
index 58a292a0e..c44f371e5 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
@@ -1,5 +1,7 @@
raLocationName = $raLocationName;
}
- /**
- * @return bool
- */
public function equals(RaLocationName $otherRaLocationName): bool
{
return $this->raLocationName === $otherRaLocationName->raLocationName;
@@ -49,7 +45,7 @@ public function equals(RaLocationName $otherRaLocationName): bool
/**
* @return string
*/
- public function getRaLocationName()
+ public function getRaLocationName(): string
{
return $this->raLocationName;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php b/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
index cf1658081..15ced7e13 100644
--- a/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
@@ -43,9 +43,6 @@ public function __construct($showRaaContactInformationOption)
$this->showRaaContactInformationOption = $showRaaContactInformationOption;
}
- /**
- * @return bool
- */
public function equals(ShowRaaContactInformationOption $other): bool
{
return $this->showRaaContactInformationOption === $other->showRaaContactInformationOption;
@@ -54,7 +51,7 @@ public function equals(ShowRaaContactInformationOption $other): bool
/**
* @return boolean
*/
- public function isEnabled()
+ public function isEnabled(): bool
{
return $this->showRaaContactInformationOption;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php b/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
index 264e24fad..e785c06a7 100644
--- a/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
@@ -46,9 +46,6 @@ public function __construct($useRaLocationsOption)
$this->useRaLocationsOption = $useRaLocationsOption;
}
- /**
- * @return bool
- */
public function equals(UseRaLocationsOption $other): bool
{
return $this->useRaLocationsOption === $other->useRaLocationsOption;
@@ -57,7 +54,7 @@ public function equals(UseRaLocationsOption $other): bool
/**
* @return boolean
*/
- public function isEnabled()
+ public function isEnabled(): bool
{
return $this->useRaLocationsOption;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php b/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
index fa55f97b8..f42f613dd 100644
--- a/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
@@ -43,9 +43,6 @@ public function __construct($verifyEmailOption)
$this->verifyEmailOption = $verifyEmailOption;
}
- /**
- * @return bool
- */
public function equals(VerifyEmailOption $other): bool
{
return $this->verifyEmailOption === $other->verifyEmailOption;
@@ -54,7 +51,7 @@ public function equals(VerifyEmailOption $other): bool
/**
* @return boolean
*/
- public function isEnabled()
+ public function isEnabled(): bool
{
return $this->verifyEmailOption;
}
diff --git a/src/Surfnet/Stepup/DateTime/DateTime.php b/src/Surfnet/Stepup/DateTime/DateTime.php
index 6a049f7e1..77556611d 100644
--- a/src/Surfnet/Stepup/DateTime/DateTime.php
+++ b/src/Surfnet/Stepup/DateTime/DateTime.php
@@ -40,14 +40,14 @@ class DateTime implements Stringable
*
* @var self|null
*/
- private static $now;
+ private static ?DateTime $now;
private readonly CoreDateTime $dateTime;
/**
* @return self
*/
- public static function now()
+ public static function now(): DateTime
{
return self::$now ?: new self(new CoreDateTime);
}
@@ -56,7 +56,7 @@ public static function now()
* @param string $string A date-time string formatted using `self::FORMAT` (eg. '2014-11-26T15:20:43+01:00').
* @return self
*/
- public static function fromString($string): self
+ public static function fromString(string $string): self
{
if (!is_string($string)) {
InvalidArgumentException::invalidType('string', 'dateTime', $string);
@@ -79,9 +79,6 @@ public function __construct(CoreDateTime $dateTime = null)
$this->dateTime = $dateTime ?: new CoreDateTime();
}
- /**
- * @return DateTime
- */
public function add(DateInterval $interval): self
{
$dateTime = clone $this->dateTime;
@@ -90,9 +87,6 @@ public function add(DateInterval $interval): self
return new self($dateTime);
}
- /**
- * @return DateTime
- */
public function sub(DateInterval $interval): self
{
$dateTime = clone $this->dateTime;
@@ -112,33 +106,23 @@ public function endOfDay(): self
return new self($dateTime);
}
- /**
- * @return boolean
- */
public function comesBefore(DateTime $dateTime): bool
{
return $this->dateTime < $dateTime->dateTime;
}
- /**
- * @return boolean
- */
public function comesBeforeOrIsEqual(DateTime $dateTime): bool
{
return $this->dateTime <= $dateTime->dateTime;
}
- /**
- * @return boolean
- */
public function comesAfter(DateTime $dateTime): bool
{
- return $this->dateTime > $dateTime->dateTime;
+ $end = $this->dateTime->getTimestamp();
+ $start = $dateTime->dateTime->getTimestamp();
+ return $end > $start;
}
- /**
- * @return boolean
- */
public function comesAfterOrIsEqual(DateTime $dateTime): bool
{
return $this->dateTime >= $dateTime->dateTime;
@@ -148,7 +132,7 @@ public function comesAfterOrIsEqual(DateTime $dateTime): bool
* @param $format
* @return string
*/
- public function format($format)
+ public function format($format): string
{
$formatted = $this->dateTime->format($format);
diff --git a/src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php b/src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php
index 88dc162ea..8d89048fd 100644
--- a/src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php
+++ b/src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php
@@ -38,9 +38,6 @@ public function __construct(
$this->skipProvePossessionSecondFactorTypes = $skipProvePossessionSecondFactorTypes;
}
- /**
- * @return bool
- */
public function canSkipProvePossession(SecondFactorType $secondFactorType): bool
{
return in_array($secondFactorType->getSecondFactorType(), $this->skipProvePossessionSecondFactorTypes);
diff --git a/src/Surfnet/Stepup/Identity/Api/Id.php b/src/Surfnet/Stepup/Identity/Api/Id.php
index a499f933a..09aad9efc 100644
--- a/src/Surfnet/Stepup/Identity/Api/Id.php
+++ b/src/Surfnet/Stepup/Identity/Api/Id.php
@@ -32,8 +32,5 @@ public function __construct(mixed $value);
*/
public function __toString();
- /**
- * @return bool
- */
- public function equals(Id $other);
+ public function equals(Id $other): bool;
}
diff --git a/src/Surfnet/Stepup/Identity/Api/Identity.php b/src/Surfnet/Stepup/Identity/Api/Identity.php
index ef806d8bc..e79547d1e 100644
--- a/src/Surfnet/Stepup/Identity/Api/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Api/Identity.php
@@ -51,9 +51,6 @@
interface Identity extends AggregateRoot
{
- /**
- * @return Identity
- */
public static function create(
IdentityId $id,
Institution $institution,
@@ -61,115 +58,87 @@ public static function create(
CommonName $commonName,
Email $email,
Locale $preferredLocale,
- );
+ ): Identity;
/**
* Construct a new aggregate root. Aggregate roots can only be affected by events, so no parameters are allowed.
*/
public function __construct();
- /**
- * @return void
- */
- public function rename(CommonName $commonName);
+ public function rename(CommonName $commonName): void;
- /**
- * @return void
- */
- public function changeEmail(Email $email);
+ public function changeEmail(Email $email): void;
- /**
- * @param int $maxNumberOfTokens
- * @return void
- */
public function bootstrapYubikeySecondFactor(
- SecondFactorId $secondFactorId,
+ SecondFactorId $secondFactorId,
YubikeyPublicId $yubikeyPublicId,
- $maxNumberOfTokens,
- );
+ int $maxNumberOfTokens,
+ ): void;
- /**
- * @param bool $emailVerificationRequired
- * @param int $maxNumberOfTokens
- * @return void
- */
public function provePossessionOfYubikey(
- SecondFactorId $secondFactorId,
- YubikeyPublicId $yubikeyPublicId,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ YubikeyPublicId $yubikeyPublicId,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
- );
+ int $maxNumberOfTokens,
+ ): void;
- /**
- * @param bool $emailVerificationRequired
- * @param int $maxNumberOfTokens
- * @return void
- */
public function provePossessionOfPhone(
- SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ PhoneNumber $phoneNumber,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
- );
+ int $maxNumberOfTokens,
+ ): void;
/**
- * @param bool $emailVerificationRequired
* @parame int $maxNumberOfTokens
- * @return void
*/
public function provePossessionOfGssf(
- SecondFactorId $secondFactorId,
- StepupProvider $provider,
- GssfId $gssfId,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ StepupProvider $provider,
+ GssfId $gssfId,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
- );
+ $maxNumberOfTokens,
+ ): void;
/**
- * @param bool $emailVerificationRequired
* @parame int $maxNumberOfTokens
- * @return void
* @deprecated Built in U2F support is dropped from StepUp, this was not removed to support event replay
*/
public function provePossessionOfU2fDevice(
- SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ U2fKeyHandle $keyHandle,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
- );
+ $maxNumberOfTokens,
+ ): void;
/**
* @param string $verificationNonce
* @return void
*/
- public function verifyEmail($verificationNonce);
+ public function verifyEmail(string $verificationNonce): void;
/**
* Attempts to vet another identity's verified second factor.
*
- * @param string $registrationCode
- * @param bool $identityVerified
- * @param bool $provePossessionSkipped
- * @return void
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function vetSecondFactor(
- Identity $registrant,
- SecondFactorId $registrantsSecondFactorId,
- SecondFactorType $registrantsSecondFactorType,
- SecondFactorIdentifier $registrantsSecondFactorIdentifier,
- $registrationCode,
- DocumentNumber $documentNumber,
- $identityVerified,
- SecondFactorTypeService $secondFactorTypeService,
+ Identity $registrant,
+ SecondFactorId $registrantsSecondFactorId,
+ SecondFactorType $registrantsSecondFactorType,
+ SecondFactorIdentifier $registrantsSecondFactorIdentifier,
+ string $registrationCode,
+ DocumentNumber $documentNumber,
+ bool $identityVerified,
+ SecondFactorTypeService $secondFactorTypeService,
SecondFactorProvePossessionHelper $secondFactorProvePossessionHelper,
- $provePossessionSkipped,
- );
+ bool $provePossessionSkipped,
+ ): void;
/**
* Self vetting, is when the user uses its own token to vet another.
@@ -208,29 +177,20 @@ public function migrateVettedSecondFactor(
/**
* Makes the identity comply with an authority's vetting of a verified second factor.
*
- * @param string $registrationCode
- * @param bool $provePossessionSkipped
- * @return void
* @throws DomainException
*/
public function complyWithVettingOfSecondFactor(
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
+ SecondFactorId $secondFactorId,
+ SecondFactorType $secondFactorType,
SecondFactorIdentifier $secondFactorIdentifier,
- $registrationCode,
- DocumentNumber $documentNumber,
- $provePossessionSkipped,
- );
+ string $registrationCode,
+ DocumentNumber $documentNumber,
+ bool $provePossessionSkipped,
+ ): void;
- /**
- * @return void
- */
- public function revokeSecondFactor(SecondFactorId $secondFactorId);
+ public function revokeSecondFactor(SecondFactorId $secondFactorId): void;
- /**
- * @return void
- */
- public function complyWithSecondFactorRevocation(SecondFactorId $secondFactorId, IdentityId $authorityId);
+ public function complyWithSecondFactorRevocation(SecondFactorId $secondFactorId, IdentityId $authorityId): void;
/**
* From SelfService, an Identity is allowed to revoke a recovery token
@@ -243,88 +203,67 @@ public function revokeRecoveryToken(RecoveryTokenId $recoveryTokenId): void;
*/
public function complyWithRecoveryTokenRevocation(RecoveryTokenId $recoveryTokenId, IdentityId $authorityId): void;
- /**
- * @return void
- */
public function accreditWith(
RegistrationAuthorityRole $role,
Institution $institution,
Location $location,
ContactInformation $contactInformation,
InstitutionConfiguration $institutionConfiguration,
- );
+ ): void;
- /**
- * @return void
- */
public function appointAs(
Institution $institution,
RegistrationAuthorityRole $role,
InstitutionConfiguration $institutionConfiguration,
- );
+ ): void;
- /**
- * @return void
- */
public function amendRegistrationAuthorityInformation(
Institution $institution,
Location $location,
ContactInformation $contactInformation,
- );
+ ): void;
- /**
- * @return void
- */
- public function retractRegistrationAuthority(Institution $institution);
+ public function retractRegistrationAuthority(Institution $institution): void;
- /**
- * @return void
- */
- public function expressPreferredLocale(Locale $preferredLocale);
+ public function expressPreferredLocale(Locale $preferredLocale): void;
/**
* @return void
*/
- public function forget();
+ public function forget(): void;
/**
* @return IdentityId
*/
- public function getId();
+ public function getId(): IdentityId;
/**
* @return NameId
*/
- public function getNameId();
+ public function getNameId(): NameId;
/**
* @return Institution
*/
- public function getInstitution();
+ public function getInstitution(): Institution;
/**
* @return CommonName
*/
- public function getCommonName();
+ public function getCommonName(): CommonName;
/**
* @return Email
*/
- public function getEmail();
+ public function getEmail(): Email;
/**
* @return Locale
*/
- public function getPreferredLocale();
+ public function getPreferredLocale(): Locale;
- /**
- * @return VerifiedSecondFactor|null
- */
- public function getVerifiedSecondFactor(SecondFactorId $secondFactorId);
+ public function getVerifiedSecondFactor(SecondFactorId $secondFactorId): ?VerifiedSecondFactor;
- /**
- * @return VettedSecondFactor|null
- */
public function getVettedSecondFactorById(SecondFactorId $secondFactorId): ?VettedSecondFactor;
/**
diff --git a/src/Surfnet/Stepup/Identity/Api/Whitelist.php b/src/Surfnet/Stepup/Identity/Api/Whitelist.php
index a1098ac92..40a9097c0 100644
--- a/src/Surfnet/Stepup/Identity/Api/Whitelist.php
+++ b/src/Surfnet/Stepup/Identity/Api/Whitelist.php
@@ -29,29 +29,21 @@ public function __construct();
/**
* Create a new Whitelist instance with the institutions that are on the initial whitelist
- *
- * @return Whitelist
*/
- public static function create(InstitutionCollection $institutionCollection);
+ public static function create(InstitutionCollection $institutionCollection): Whitelist;
/**
* Replace all institutions on the whitelist with the institutions in the given collection
- *
- * @return void
*/
- public function replaceAll(InstitutionCollection $institutionCollection);
+ public function replaceAll(InstitutionCollection $institutionCollection): void;
/**
* Add the institutions in the given collection to the whitelist
- *
- * @return void
*/
- public function add(InstitutionCollection $institutionCollection);
+ public function add(InstitutionCollection $institutionCollection): void;
/**
* Remove the institutions in the given collection from the whitelist
- *
- * @return mixed
*/
- public function remove(InstitutionCollection $institutionCollection);
+ public function remove(InstitutionCollection $institutionCollection): void;
}
diff --git a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
index 2d574164e..1435235ad 100644
--- a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
+++ b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
@@ -32,43 +32,43 @@ final class Metadata
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var Institution
*/
- public $identityInstitution;
+ public Institution $identityInstitution;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @var SecondFactorId|null
*/
- public $secondFactorId;
+ public ?SecondFactorId $secondFactorId;
/**
* @var SecondFactorType|null
*/
- public $secondFactorType;
+ public ?SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier|null
*/
- public $secondFactorIdentifier;
+ public ?SecondFactorIdentifier $secondFactorIdentifier;
/** @var VettingType */
- public $vettingType;
+ public VettingType $vettingType;
/**
* @var RecoveryTokenId
*/
- public $recoveryTokenId;
+ public RecoveryTokenId $recoveryTokenId;
/**
* @var RecoveryTokenType
*/
- public $recoveryTokenType;
+ public RecoveryTokenType $recoveryTokenType;
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php b/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
index 629e8a809..3ebab62d6 100644
--- a/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
+++ b/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
@@ -18,6 +18,7 @@
namespace Surfnet\Stepup\Identity\Entity;
+use Exception;
use Surfnet\Stepup\DateTime\DateTime;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\EmailVerificationWindow;
@@ -57,6 +58,8 @@ private function __construct(
* @param int $emailVerificationTimeFrame positive integer
* @param string[] $locales
* @return ConfigurableSettings
+ * @throws Exception
+ * @throws Exception
*/
public static function create($emailVerificationTimeFrame, array $locales): self
{
@@ -72,7 +75,7 @@ public static function create($emailVerificationTimeFrame, array $locales): self
/**
* @return EmailVerificationWindow
*/
- public function createNewEmailVerificationWindow()
+ public function createNewEmailVerificationWindow(): EmailVerificationWindow
{
return EmailVerificationWindow::createFromTimeFrameStartingAt(
$this->emailVerificationTimeFrame,
@@ -80,9 +83,6 @@ public function createNewEmailVerificationWindow()
);
}
- /**
- * @return bool
- */
public function isSupportedLocale(Locale $locale): bool
{
return array_reduce(
diff --git a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
index af33f6018..3b319bb15 100644
--- a/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
+++ b/src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
@@ -23,7 +23,7 @@
final class InstitutionCollection
{
- private $institutions = [];
+ private array $institutions = [];
public function set(Institution $institution): void
{
diff --git a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
index c5d1903d7..87dbc7c11 100644
--- a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
+++ b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
@@ -37,9 +37,6 @@ final class RegistrationAuthority extends SimpleEventSourcedEntity
private ?Institution $institution = null;
- /**
- * @return RegistrationAuthority
- */
public static function accreditWith(
RegistrationAuthorityRole $role,
Location $location,
@@ -61,26 +58,17 @@ public function amendInformation(Location $location, ContactInformation $contact
$this->contactInformation = $contactInformation;
}
- /**
- * @return void
- */
public function appointAs(RegistrationAuthorityRole $role): void
{
$this->role = $role;
}
- /**
- * @return bool
- */
- public function isAppointedAs(RegistrationAuthorityRole $role)
+ public function isAppointedAs(RegistrationAuthorityRole $role): bool
{
return $this->role->equals($role);
}
- /**
- * @return RegistrationAuthorityRole
- */
- public function getRole()
+ public function getRole(): ?RegistrationAuthorityRole
{
return $this->role;
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php b/src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
index 47f6d8306..750cd99b4 100644
--- a/src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
+++ b/src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
@@ -26,10 +26,7 @@
final class SecondFactorCollection extends ArrayCollection
{
- /**
- * @return null|SecondFactor
- */
- public function getSecondFactorWithHighestLoa(SecondFactorTypeService $service)
+ public function getSecondFactorWithHighestLoa(SecondFactorTypeService $service): ?SecondFactor
{
// We can only get the highest loa'ed second factor when we have a collection of
// VettedSecondFactors. The because that is the only SF type that has a vetting
diff --git a/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
index 401c438fe..51c35f40c 100644
--- a/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
+++ b/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
@@ -49,24 +49,19 @@ class UnverifiedSecondFactor extends AbstractSecondFactor
/**
* @var SecondFactorIdentifier
*/
- private $secondFactorIdentifier;
+ private SecondFactorIdentifier $secondFactorIdentifier;
private ?EmailVerificationWindow $verificationWindow = null;
private ?string $verificationNonce = null;
- /**
- * @param SecondFactorIdentifier $secondFactorIdentifier
- * @param string $verificationNonce
- * @return UnverifiedSecondFactor
- */
public static function create(
- SecondFactorId $id,
- Identity $identity,
- SecondFactorType $type,
- $secondFactorIdentifier,
+ SecondFactorId $id,
+ Identity $identity,
+ SecondFactorType $type,
+ SecondFactorIdentifier $secondFactorIdentifier,
EmailVerificationWindow $emailVerificationWindow,
- $verificationNonce,
+ string $verificationNonce,
): self {
if (!is_string($verificationNonce)) {
throw InvalidArgumentException::invalidType('string', 'verificationNonce', $verificationNonce);
@@ -91,10 +86,7 @@ final public function __construct()
{
}
- /**
- * @return SecondFactorId
- */
- public function getId()
+ public function getId(): ?SecondFactorId
{
return $this->id;
}
@@ -103,7 +95,7 @@ public function getId()
* @param string $verificationNonce
* @return bool
*/
- public function hasNonce($verificationNonce): bool
+ public function hasNonce(string $verificationNonce): bool
{
return $this->verificationNonce === $verificationNonce;
}
@@ -111,7 +103,7 @@ public function hasNonce($verificationNonce): bool
/**
* @return bool
*/
- public function canBeVerifiedNow()
+ public function canBeVerifiedNow(): bool
{
return $this->verificationWindow->isOpen();
}
@@ -161,11 +153,7 @@ public function complyWithRevocation(IdentityId $authorityId): void
);
}
- /**
- * @param string $registrationCode
- * @return VerifiedSecondFactor
- */
- public function asVerified(DateTime $registrationRequestedAt, $registrationCode)
+ public function asVerified(DateTime $registrationRequestedAt, string $registrationCode): VerifiedSecondFactor
{
return VerifiedSecondFactor::create(
$this->id,
@@ -177,7 +165,7 @@ public function asVerified(DateTime $registrationRequestedAt, $registrationCode)
);
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$secondFactorIdentifierClass = $this->secondFactorIdentifier::class;
diff --git a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
index 2efd55641..2e7043d1c 100644
--- a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
+++ b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
@@ -53,23 +53,19 @@ class VerifiedSecondFactor extends AbstractSecondFactor
/**
* @var SecondFactorIdentifier
*/
- private $secondFactorIdentifier;
+ private SecondFactorIdentifier $secondFactorIdentifier;
private ?DateTime $registrationRequestedAt = null;
private ?string $registrationCode = null;
- /**
- * @param string $registrationCode
- * @return self
- */
public static function create(
- SecondFactorId $id,
- Identity $identity,
- SecondFactorType $type,
+ SecondFactorId $id,
+ Identity $identity,
+ SecondFactorType $type,
SecondFactorIdentifier $secondFactorIdentifier,
- DateTime $registrationRequestedAt,
- $registrationCode,
+ DateTime $registrationRequestedAt,
+ string $registrationCode,
): self {
if (!is_string($registrationCode)) {
throw InvalidArgumentException::invalidType('string', 'registrationCode', $registrationCode);
@@ -90,20 +86,13 @@ final private function __construct()
{
}
- /**
- * @return SecondFactorId
- */
- public function getId()
+ public function getId(): ?SecondFactorId
{
return $this->id;
}
- /**
- * @param string $registrationCode
- * @return bool
- */
public function hasRegistrationCodeAndIdentifier(
- $registrationCode,
+ string $registrationCode,
SecondFactorIdentifier $secondFactorIdentifier,
): bool {
return strcasecmp($registrationCode, (string)$this->registrationCode) === 0
@@ -185,10 +174,7 @@ public function complyWithRevocation(IdentityId $authorityId): void
);
}
- /**
- * @return VettedSecondFactor
- */
- public function asVetted(VettingType $vettingType)
+ public function asVetted(VettingType $vettingType): VettedSecondFactor
{
return VettedSecondFactor::create(
$this->id,
@@ -199,16 +185,18 @@ public function asVetted(VettingType $vettingType)
);
}
- public function getLoaLevel(SecondFactorTypeService $secondFactorTypeService): int
+ public function getLoaLevel(SecondFactorTypeService $secondFactorTypeService): float
{
return $secondFactorTypeService->getLevel($this->type, new StepupVettingType(VettingType::TYPE_UNKNOWN));
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$secondFactorIdentifierClass = $this->secondFactorIdentifier::class;
- $this->secondFactorIdentifier = $secondFactorIdentifierClass::unknown();
+ $identifier = $secondFactorIdentifierClass::unknown();
+ assert($identifier instanceof SecondFactorIdentifier);
+ $this->secondFactorIdentifier = $identifier;
}
public function getType(): SecondFactorType
diff --git a/src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
index 6c88ce893..107a84adc 100644
--- a/src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
+++ b/src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
@@ -44,13 +44,10 @@ class VettedSecondFactor extends AbstractSecondFactor
/**
* @var SecondFactorIdentifier
*/
- private $secondFactorIdentifier;
+ private SecondFactorIdentifier $secondFactorIdentifier;
private ?VettingType $vettingType = null;
- /**
- * @return VettedSecondFactor
- */
public static function create(
SecondFactorId $id,
Identity $identity,
@@ -72,10 +69,7 @@ final public function __construct()
{
}
- /**
- * @return SecondFactorId
- */
- public function getId()
+ public function getId(): ?SecondFactorId
{
return $this->id;
}
@@ -112,7 +106,7 @@ public function vettingType(): VettingType
return $this->vettingType;
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$secondFactorIdentifierClass = $this->secondFactorIdentifier::class;
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
index a1ba0e6be..a1f9b27f8 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
@@ -36,12 +36,12 @@ class AppointedAsRaForInstitutionEvent extends IdentityEvent implements RightToO
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
public function __construct(
IdentityId $identityId,
diff --git a/src/Surfnet/Stepup/Identity/Event/AuditableEvent.php b/src/Surfnet/Stepup/Identity/Event/AuditableEvent.php
index 5c6937309..e62f58111 100644
--- a/src/Surfnet/Stepup/Identity/Event/AuditableEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AuditableEvent.php
@@ -25,5 +25,5 @@ interface AuditableEvent
/**
* @return Metadata
*/
- public function getAuditLogMetadata();
+ public function getAuditLogMetadata(): Metadata;
}
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
index d63016883..631d76ce4 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
@@ -30,15 +30,15 @@ class CompliedWithRecoveryCodeRevocationEvent extends IdentityEvent implements R
/**
* @var IdentityId
*/
- public $authorityId;
+ public IdentityId $authorityId;
/**
* @var RecoveryTokenId
*/
- public $recoveryTokenId;
+ public RecoveryTokenId $recoveryTokenId;
/**
* @var RecoveryTokenType
*/
- public $recoveryTokenType;
+ public RecoveryTokenType $recoveryTokenType;
private array $allowlist = [
'identity_id',
'identity_institution',
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
index 16388457d..e79aa3fa2 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
@@ -42,22 +42,22 @@ abstract class CompliedWithRevocationEvent extends IdentityEvent implements Forg
/**
* @var IdentityId
*/
- public $authorityId;
+ public IdentityId $authorityId;
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
final public function __construct(
IdentityId $identityId,
@@ -115,7 +115,7 @@ final public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withSecondFactorIdentifier($this->secondFactorIdentifier, $this->secondFactorType);
diff --git a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
index 9245cfdc9..618fef8b3 100644
--- a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
@@ -53,32 +53,32 @@ class EmailVerifiedEvent extends IdentityEvent implements
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var DateTime
*/
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @param IdentityId $identityId
@@ -95,16 +95,16 @@ class EmailVerifiedEvent extends IdentityEvent implements
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
+ IdentityId $identityId,
+ Institution $identityInstitution,
+ SecondFactorId $secondFactorId,
+ SecondFactorType $secondFactorType,
private SecondFactorIdentifier $secondFactorIdentifier,
- DateTime $registrationRequestedAt,
- public $registrationCode,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ DateTime $registrationRequestedAt,
+ public string $registrationCode,
+ CommonName $commonName,
+ Email $email,
+ Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
@@ -162,7 +162,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
index b76a4c9f0..da6455bc0 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
@@ -53,37 +53,37 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var StepupProvider
*/
- public $stepupProvider;
+ public StepupProvider $stepupProvider;
/**
* @var GssfId
*/
- public $gssfId;
+ public GssfId $gssfId;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @var DateTime
*/
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
/**
* @param IdentityId $identityId
@@ -100,16 +100,16 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
+ IdentityId $identityId,
+ Institution $identityInstitution,
SecondFactorId $secondFactorId,
StepupProvider $stepupProvider,
- GssfId $gssfId,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
- public $registrationCode,
+ GssfId $gssfId,
+ CommonName $commonName,
+ Email $email,
+ Locale $locale,
+ DateTime $registrationRequestedAt,
+ public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
@@ -171,7 +171,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -181,7 +181,9 @@ public function getSensitiveData()
public function setSensitiveData(SensitiveData $sensitiveData): void
{
- $this->gssfId = $sensitiveData->getSecondFactorIdentifier();
+ $gssfId = $sensitiveData->getSecondFactorIdentifier();
+ assert($gssfId instanceof GssfId);
+ $this->gssfId = $gssfId;
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
}
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
index ba3a0f742..c8244c0f2 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
@@ -49,65 +49,53 @@ class GssfPossessionProvenEvent extends IdentityEvent implements Forgettable, Ri
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var StepupProvider
*/
- public $stepupProvider;
+ public StepupProvider $stepupProvider;
/**
* @var GssfId
*/
- public $gssfId;
+ public GssfId $gssfId;
/**
* @var EmailVerificationWindow
*/
- public $emailVerificationWindow;
+ public EmailVerificationWindow $emailVerificationWindow;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
- *
- * @param IdentityId $identityId
- * @param Institution $identityInstitution
- * @param SecondFactorId $secondFactorId
- * @param StepupProvider $stepupProvider
- * @param GssfId $gssfId
- * @param bool $emailVerificationRequired
- * @param EmailVerificationWindow $emailVerificationWindow
- * @param string $emailVerificationNonce
- * @param CommonName $commonName
- * @param Email $email
- * @param Locale $preferredLocale
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- StepupProvider $stepupProvider,
- GssfId $gssfId,
- public $emailVerificationRequired,
+ IdentityId $identityId,
+ Institution $identityInstitution,
+ SecondFactorId $secondFactorId,
+ StepupProvider $stepupProvider,
+ GssfId $gssfId,
+ public bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- public $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public string $emailVerificationNonce,
+ CommonName $commonName,
+ Email $email,
+ Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
@@ -163,14 +151,14 @@ public function serialize(): array
'identity_institution' => (string)$this->identityInstitution,
'second_factor_id' => (string)$this->secondFactorId,
'stepup_provider' => (string)$this->stepupProvider,
- 'email_verification_required' => (bool)$this->emailVerificationRequired,
+ 'email_verification_required' => $this->emailVerificationRequired,
'email_verification_window' => $this->emailVerificationWindow->serialize(),
- 'email_verification_nonce' => (string)$this->emailVerificationNonce,
+ 'email_verification_nonce' => $this->emailVerificationNonce,
'preferred_locale' => (string)$this->preferredLocale,
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -182,7 +170,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->gssfId = $sensitiveData->getSecondFactorIdentifier();
+ $gssfId = $sensitiveData->getSecondFactorIdentifier();
+ assert($gssfId instanceof GssfId);
+ $this->gssfId = $gssfId;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
index 14f399325..f236f3c60 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
@@ -44,22 +44,22 @@ class IdentityAccreditedAsRaEvent extends IdentityEvent implements RightToObtain
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var RegistrationAuthorityRole
*/
- public $registrationAuthorityRole;
+ public RegistrationAuthorityRole $registrationAuthorityRole;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
index a2da435c5..36235b5fe 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
@@ -42,27 +42,27 @@ class IdentityAccreditedAsRaForInstitutionEvent extends IdentityEvent implements
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var RegistrationAuthorityRole
*/
- public $registrationAuthorityRole;
+ public RegistrationAuthorityRole $registrationAuthorityRole;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
index da99be275..3eee576bc 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
@@ -44,22 +44,22 @@ class IdentityAccreditedAsRaaEvent extends IdentityEvent implements RightToObtai
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var RegistrationAuthorityRole
*/
- public $registrationAuthorityRole;
+ public RegistrationAuthorityRole $registrationAuthorityRole;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
index 15165bfcf..775bdb563 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
@@ -42,26 +42,26 @@ class IdentityAccreditedAsRaaForInstitutionEvent extends IdentityEvent implement
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var RegistrationAuthorityRole
*/
- public $registrationAuthorityRole;
+ public RegistrationAuthorityRole $registrationAuthorityRole;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
index 859dccf48..f80c42663 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
@@ -43,22 +43,22 @@ class IdentityCreatedEvent extends IdentityEvent implements Forgettable, RightTo
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
public function __construct(
IdentityId $id,
@@ -110,7 +110,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
index 739d5a27b..154bf73cb 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
@@ -37,7 +37,7 @@ class IdentityEmailChangedEvent extends IdentityEvent implements Forgettable, Ri
/**
* @var Email
*/
- public $email;
+ public Email $email;
public function __construct(IdentityId $identityId, Institution $institution, Email $email)
{
@@ -79,7 +79,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withEmail($this->email);
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
index 315d92f3c..8856dab21 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
@@ -30,12 +30,12 @@ abstract class IdentityEvent implements AuditableEvent, SerializableInterface
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var Institution
*/
- public $identityInstitution;
+ public Institution $identityInstitution;
public function __construct(IdentityId $identityId, Institution $identityInstitution)
{
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
index 3073aacff..71a017159 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
@@ -37,7 +37,7 @@ class IdentityRenamedEvent extends IdentityEvent implements Forgettable, RightTo
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
public function __construct(IdentityId $id, Institution $institution, CommonName $commonName)
{
@@ -79,7 +79,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName);
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
index 35928a83b..d9d7fc7a5 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
@@ -25,7 +25,7 @@ class InstitutionsAddedToWhitelistEvent implements WhitelistEvent
/**
* @var InstitutionCollection
*/
- public $addedInstitutions;
+ public InstitutionCollection $addedInstitutions;
public function __construct(InstitutionCollection $addedInstitutions)
{
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
index 031faa6af..f69fc1957 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
@@ -25,7 +25,7 @@ class InstitutionsRemovedFromWhitelistEvent implements WhitelistEvent
/**
* @var InstitutionCollection
*/
- public $removedInstitutions;
+ public InstitutionCollection $removedInstitutions;
public function __construct(InstitutionCollection $removedInstitutions)
{
diff --git a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
index 82fa4b3d9..e17d2ddc6 100644
--- a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
@@ -35,7 +35,7 @@ class LocalePreferenceExpressedEvent extends IdentityEvent implements RightToObt
/**
* @var Locale
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @param IdentityId $id
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
index 68ccba346..4ac4ea094 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
@@ -52,32 +52,32 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var PhoneNumber
*/
- public $phoneNumber;
+ public PhoneNumber $phoneNumber;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @var DateTime
*/
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
/**
* @param IdentityId $identityId
@@ -91,15 +91,15 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param string $registrationCode
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
+ IdentityId $identityId,
+ Institution $identityInstitution,
SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
- public $registrationCode,
+ PhoneNumber $phoneNumber,
+ CommonName $commonName,
+ Email $email,
+ Locale $locale,
+ DateTime $registrationRequestedAt,
+ public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
@@ -158,7 +158,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -168,7 +168,9 @@ public function getSensitiveData()
public function setSensitiveData(SensitiveData $sensitiveData): void
{
- $this->phoneNumber = $sensitiveData->getSecondFactorIdentifier();
+ $phoneNumber = $sensitiveData->getSecondFactorIdentifier();
+ assert($phoneNumber instanceof PhoneNumber);
+ $this->phoneNumber = $phoneNumber;
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
}
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
index 9aed2bdec..904709ed6 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
@@ -48,32 +48,32 @@ class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, R
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var PhoneNumber
*/
- public $phoneNumber;
+ public PhoneNumber $phoneNumber;
/**
* @var EmailVerificationWindow
*/
- public $emailVerificationWindow;
+ public EmailVerificationWindow $emailVerificationWindow;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @param IdentityId $identityId
@@ -90,16 +90,16 @@ class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, R
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
- public $emailVerificationRequired,
+ IdentityId $identityId,
+ Institution $identityInstitution,
+ SecondFactorId $secondFactorId,
+ PhoneNumber $phoneNumber,
+ public bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- public $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public string $emailVerificationNonce,
+ CommonName $commonName,
+ Email $email,
+ Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
@@ -152,14 +152,14 @@ public function serialize(): array
'identity_id' => (string)$this->identityId,
'identity_institution' => (string)$this->identityInstitution,
'second_factor_id' => (string)$this->secondFactorId,
- 'email_verification_required' => (bool)$this->emailVerificationRequired,
+ 'email_verification_required' => $this->emailVerificationRequired,
'email_verification_window' => $this->emailVerificationWindow->serialize(),
- 'email_verification_nonce' => (string)$this->emailVerificationNonce,
+ 'email_verification_nonce' => $this->emailVerificationNonce,
'preferred_locale' => (string)$this->preferredLocale,
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -171,7 +171,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->phoneNumber = $sensitiveData->getSecondFactorIdentifier();
+ $phoneNumber = $sensitiveData->getSecondFactorIdentifier();
+ assert($phoneNumber instanceof PhoneNumber);
+ $this->phoneNumber = $phoneNumber;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
index 62ec91f87..328baaeaa 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
@@ -51,27 +51,27 @@ class PhoneRecoveryTokenPossessionProvenEvent extends IdentityEvent implements F
/**
* @var RecoveryTokenId
*/
- public $recoveryTokenId;
+ public RecoveryTokenId $recoveryTokenId;
/**
* @var PhoneNumber
*/
- public $phoneNumber;
+ public PhoneNumber $phoneNumber;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
public function __construct(
IdentityId $identityId,
@@ -96,8 +96,8 @@ public function getAuditLogMetadata(): Metadata
$metadata = new Metadata();
$metadata->identityId = $this->identityId;
$metadata->identityInstitution = $this->identityInstitution;
- $metadata->recoveryTokenId = (string)$this->phoneNumber;
- $metadata->recoveryTokenType = RecoveryTokenType::TYPE_SMS;
+ $metadata->recoveryTokenId = new RecoveryTokenId((string) $this->phoneNumber);
+ $metadata->recoveryTokenType = RecoveryTokenType::sms();
return $metadata;
}
@@ -140,7 +140,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->phoneNumber = $sensitiveData->getRecoveryTokenIdentifier();
+ $phoneNumber = $sensitiveData->getRecoveryTokenIdentifier();
+ assert($phoneNumber instanceof PhoneNumber);
+ $this->phoneNumber = $phoneNumber;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
index 3f7cb3c8d..e1cf90c80 100644
--- a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
@@ -30,11 +30,11 @@ class RecoveryTokenRevokedEvent extends IdentityEvent implements RightToObtainDa
/**
* @var RecoveryTokenId
*/
- public $recoveryTokenId;
+ public RecoveryTokenId $recoveryTokenId;
/**
* @var RecoveryTokenType
*/
- public $recoveryTokenType;
+ public RecoveryTokenType $recoveryTokenType;
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
index 161ab0977..38fc00ae6 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
@@ -42,17 +42,17 @@ class RegistrationAuthorityInformationAmendedEvent extends IdentityEvent impleme
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
index 74d7892d7..e23ab8f21 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
@@ -41,22 +41,22 @@ class RegistrationAuthorityInformationAmendedForInstitutionEvent extends Identit
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var Location
*/
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
- public $contactInformation;
+ public ContactInformation $contactInformation;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @param IdentityId $identityId
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
index 8dc615ba3..922a751a8 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
@@ -44,17 +44,17 @@ class RegistrationAuthorityRetractedEvent extends IdentityEvent implements Forge
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
public function __construct(
IdentityId $identityId,
@@ -99,7 +99,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
index 3fea29a7c..b2613861a 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
@@ -44,22 +44,22 @@ class RegistrationAuthorityRetractedForInstitutionEvent extends IdentityEvent im
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Institution
*/
- public $raInstitution;
+ public Institution $raInstitution;
public function __construct(
IdentityId $identityId,
@@ -111,7 +111,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
diff --git a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
index fd661d78b..78b77587e 100644
--- a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
@@ -85,8 +85,8 @@ public function getAuditLogMetadata(): Metadata
$metadata->identityId = $this->identityId;
$metadata->identityInstitution = $this->identityInstitution;
// In the audit log we do not show the secret (hashed)
- $metadata->recoveryTokenId = (string)SafeStore::hidden();
- $metadata->recoveryTokenType = RecoveryTokenType::TYPE_SAFE_STORE;
+ $metadata->recoveryTokenId = new RecoveryTokenId((string) SafeStore::hidden());
+ $metadata->recoveryTokenType = RecoveryTokenType::safeStore();
return $metadata;
}
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
index 25e6d6fa2..72652f4d5 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
@@ -59,45 +59,45 @@ class SecondFactorMigratedEvent extends IdentityEvent implements Forgettable, Ri
/**
* @var NameId
*/
- public $targetNameId;
+ public NameId $targetNameId;
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorId
*/
- public $newSecondFactorId;
+ public SecondFactorId $newSecondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @var VettingType
*/
- public $vettingType;
+ public VettingType $vettingType;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -184,7 +184,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
index 8bc4f1759..c3159993d 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
@@ -47,27 +47,27 @@ class SecondFactorMigratedToEvent extends IdentityEvent implements Forgettable,
/**
* @var Institution
*/
- public $targetInstitution;
+ public Institution $targetInstitution;
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorId
*/
- public $targetSecondFactorId;
+ public SecondFactorId $targetSecondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -131,7 +131,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withSecondFactorIdentifier($this->secondFactorIdentifier, $this->secondFactorType);
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
index 35f39979a..add677c7f 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
@@ -42,17 +42,17 @@ abstract class SecondFactorRevokedEvent extends IdentityEvent implements Forgett
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
final public function __construct(
IdentityId $identityId,
@@ -106,7 +106,7 @@ final public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withSecondFactorIdentifier($this->secondFactorIdentifier, $this->secondFactorType);
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
index 8f9316498..b1b9aa517 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
@@ -56,40 +56,40 @@ class SecondFactorVettedEvent extends IdentityEvent implements Forgettable, Righ
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/** @var VettingType */
- public $vettingType;
+ public VettingType $vettingType;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
index 3057fb84f..81d819c64 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
@@ -59,45 +59,45 @@ class SecondFactorVettedWithoutTokenProofOfPossession extends IdentityEvent impl
/**
* @var NameId
*/
- public $nameId;
+ public NameId $nameId;
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var SecondFactorType
*/
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
/**
* @var SecondFactorIdentifier
*/
- public $secondFactorIdentifier;
+ public SecondFactorIdentifier $secondFactorIdentifier;
/**
* @var DocumentNumber
*/
- public $documentNumber;
+ public DocumentNumber $documentNumber;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/** @var VettingType */
- public $vettingType;
+ public VettingType $vettingType;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
index 952be5472..4d0c689e9 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
@@ -55,32 +55,32 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var U2fKeyHandle
*/
- public $keyHandle;
+ public U2fKeyHandle $keyHandle;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @var DateTime
*/
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
/**
* @param IdentityId $identityId
@@ -94,15 +94,15 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param string $registrationCode
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
+ IdentityId $identityId,
+ Institution $identityInstitution,
SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
- public $registrationCode,
+ U2fKeyHandle $keyHandle,
+ CommonName $commonName,
+ Email $email,
+ Locale $locale,
+ DateTime $registrationRequestedAt,
+ public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
@@ -161,7 +161,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -171,7 +171,9 @@ public function getSensitiveData()
public function setSensitiveData(SensitiveData $sensitiveData): void
{
- $this->keyHandle = $sensitiveData->getSecondFactorIdentifier();
+ $keyHandle = $sensitiveData->getSecondFactorIdentifier();
+ assert($keyHandle instanceof U2fKeyHandle);
+ $this->keyHandle = $keyHandle;
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
}
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
index c16bb4327..e137c3aeb 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
@@ -51,32 +51,32 @@ class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettabl
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* @var U2fKeyHandle
*/
- public $keyHandle;
+ public U2fKeyHandle $keyHandle;
/**
* @var EmailVerificationWindow
*/
- public $emailVerificationWindow;
+ public EmailVerificationWindow $emailVerificationWindow;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @param IdentityId $identityId
@@ -93,16 +93,16 @@ class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettabl
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- IdentityId $identityId,
- Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
- public $emailVerificationRequired,
+ IdentityId $identityId,
+ Institution $identityInstitution,
+ SecondFactorId $secondFactorId,
+ U2fKeyHandle $keyHandle,
+ public bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- public $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public string $emailVerificationNonce,
+ CommonName $commonName,
+ Email $email,
+ Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
@@ -155,14 +155,14 @@ public function serialize(): array
'identity_id' => (string)$this->identityId,
'identity_institution' => (string)$this->identityInstitution,
'second_factor_id' => (string)$this->secondFactorId,
- 'email_verification_required' => (bool)$this->emailVerificationRequired,
+ 'email_verification_required' => $this->emailVerificationRequired,
'email_verification_window' => $this->emailVerificationWindow->serialize(),
- 'email_verification_nonce' => (string)$this->emailVerificationNonce,
+ 'email_verification_nonce' => $this->emailVerificationNonce,
'preferred_locale' => (string)$this->preferredLocale,
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -174,7 +174,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->keyHandle = $sensitiveData->getSecondFactorIdentifier();
+ $keyHandle = $sensitiveData->getSecondFactorIdentifier();
+ assert($keyHandle instanceof U2fKeyHandle);
+ $this->keyHandle = $keyHandle;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
index 94188c638..6a06de510 100644
--- a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
@@ -36,12 +36,12 @@ class VettingTypeHintsSavedEvent extends IdentityEvent implements RightToObtainD
/**
* @var VettingTypeHintCollection
*/
- public $hints;
+ public VettingTypeHintCollection $hints;
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
public function __construct(
IdentityId $identityId,
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
index 59473df60..16a7a1634 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
@@ -25,7 +25,7 @@ class WhitelistCreatedEvent implements WhitelistEvent
/**
* @var InstitutionCollection
*/
- public $whitelistedInstitutions;
+ public InstitutionCollection $whitelistedInstitutions;
public function __construct(InstitutionCollection $institutionCollection)
{
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
index a5ae233b8..4f5a2e3f1 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
@@ -25,7 +25,7 @@ class WhitelistReplacedEvent implements WhitelistEvent
/**
* @var InstitutionCollection
*/
- public $whitelistedInstitutions;
+ public InstitutionCollection $whitelistedInstitutions;
public function __construct(InstitutionCollection $whitelistedInstitutions)
{
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
index 497bf6e2f..ddfbed24b 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
@@ -52,34 +52,34 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* The Yubikey's public ID.
*
* @var YubikeyPublicId
*/
- public $yubikeyPublicId;
+ public YubikeyPublicId $yubikeyPublicId;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
* @var DateTime
*/
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
/**
* @param IdentityId $identityId
@@ -93,15 +93,15 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param string $registrationCode
*/
public function __construct(
- IdentityId $identityId,
- Institution $institution,
- SecondFactorId $secondFactorId,
+ IdentityId $identityId,
+ Institution $institution,
+ SecondFactorId $secondFactorId,
YubikeyPublicId $yubikeyPublicId,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
- public $registrationCode,
+ CommonName $commonName,
+ Email $email,
+ Locale $locale,
+ DateTime $registrationRequestedAt,
+ public string $registrationCode,
) {
parent::__construct($identityId, $institution);
@@ -160,7 +160,7 @@ public function serialize(): array
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -170,7 +170,10 @@ public function getSensitiveData()
public function setSensitiveData(SensitiveData $sensitiveData): void
{
- $this->yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ $yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ assert($yubikeyPublicId instanceof YubikeyPublicId);
+ $this->yubikeyPublicId = $yubikeyPublicId;
+
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
}
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
index 50dcfd178..e9046f985 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
@@ -49,56 +49,54 @@ class YubikeyPossessionProvenEvent extends IdentityEvent implements Forgettable,
/**
* @var SecondFactorId
*/
- public $secondFactorId;
+ public SecondFactorId $secondFactorId;
/**
* The Yubikey's public ID.
*
* @var YubikeyPublicId
*/
- public $yubikeyPublicId;
+ public YubikeyPublicId $yubikeyPublicId;
/**
* @var DateTime
*/
- public $emailVerificationRequestedAt;
+ public DateTime $emailVerificationRequestedAt;
/**
* @var EmailVerificationWindow
*/
- public $emailVerificationWindow;
+ public EmailVerificationWindow $emailVerificationWindow;
/**
* @var CommonName
*/
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
- public $email;
+ public Email $email;
/**
* @var Locale Eg. "en_GB"
*/
- public $preferredLocale;
+ public Locale $preferredLocale;
/**
- * @param bool $emailVerificationRequired
- * @param string $emailVerificationNonce
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- IdentityId $identityId,
- Institution $institution,
- SecondFactorId $secondFactorId,
- YubikeyPublicId $yubikeyPublicId,
- public $emailVerificationRequired,
+ IdentityId $identityId,
+ Institution $institution,
+ SecondFactorId $secondFactorId,
+ YubikeyPublicId $yubikeyPublicId,
+ public bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- public $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public string $emailVerificationNonce,
+ CommonName $commonName,
+ Email $email,
+ Locale $preferredLocale,
) {
parent::__construct($identityId, $institution);
@@ -151,14 +149,14 @@ public function serialize(): array
'identity_id' => (string)$this->identityId,
'identity_institution' => (string)$this->identityInstitution,
'second_factor_id' => (string)$this->secondFactorId,
- 'email_verification_required' => (bool)$this->emailVerificationRequired,
+ 'email_verification_required' => $this->emailVerificationRequired,
'email_verification_window' => $this->emailVerificationWindow->serialize(),
- 'email_verification_nonce' => (string)$this->emailVerificationNonce,
+ 'email_verification_nonce' => $this->emailVerificationNonce,
'preferred_locale' => (string)$this->preferredLocale,
];
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -170,7 +168,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ $yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ assert($yubikeyPublicId instanceof YubikeyPublicId);
+ $this->yubikeyPublicId = $yubikeyPublicId;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
index 2a9334a77..e986550a7 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
@@ -51,7 +51,7 @@ final class YubikeySecondFactorBootstrappedEvent extends IdentityEvent implement
/**
* @var Institution
*/
- public $institution;
+ public Institution $institution;
public function __construct(
IdentityId $identityId,
@@ -107,7 +107,7 @@ public static function deserialize(array $data): self
);
}
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return (new SensitiveData)
->withCommonName($this->commonName)
@@ -119,7 +119,9 @@ public function setSensitiveData(SensitiveData $sensitiveData): void
{
$this->email = $sensitiveData->getEmail();
$this->commonName = $sensitiveData->getCommonName();
- $this->yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ $yubikeyPublicId = $sensitiveData->getSecondFactorIdentifier();
+ assert($yubikeyPublicId instanceof YubikeyPublicId);
+ $this->yubikeyPublicId = $yubikeyPublicId;
}
public function obtainUserData(): array
diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php
index 83e17ab97..d3da0c230 100644
--- a/src/Surfnet/Stepup/Identity/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Identity.php
@@ -121,41 +121,32 @@ class Identity extends EventSourcedAggregateRoot implements IdentityApi
/**
* @var IdentityId
*/
- private $id;
+ private IdentityId $id;
/**
* @var Institution
*/
- private $institution;
+ private Institution $institution;
/**
* @var NameId
*/
- private $nameId;
+ private NameId $nameId;
/**
* @var CommonName
*/
- private $commonName;
+ private CommonName $commonName;
/**
* @var Email
*/
- private $email;
+ private Email $email;
- /**
- * @var SecondFactorCollection|UnverifiedSecondFactor[]
- */
private ?SecondFactorCollection $unverifiedSecondFactors = null;
- /**
- * @var SecondFactorCollection|VerifiedSecondFactor[]
- */
private ?SecondFactorCollection $verifiedSecondFactors = null;
- /**
- * @var SecondFactorCollection|VettedSecondFactor[]
- */
private ?SecondFactorCollection $vettedSecondFactors = null;
private ?RegistrationAuthorityCollection $registrationAuthorities = null;
@@ -163,7 +154,7 @@ class Identity extends EventSourcedAggregateRoot implements IdentityApi
/**
* @var Locale
*/
- private $preferredLocale;
+ private Locale $preferredLocale;
private ?bool $forgotten = null;
@@ -212,9 +203,9 @@ public function changeEmail(Email $email): void
}
public function bootstrapYubikeySecondFactor(
- SecondFactorId $secondFactorId,
+ SecondFactorId $secondFactorId,
YubikeyPublicId $yubikeyPublicId,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -234,11 +225,11 @@ public function bootstrapYubikeySecondFactor(
}
public function provePossessionOfYubikey(
- SecondFactorId $secondFactorId,
- YubikeyPublicId $yubikeyPublicId,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ YubikeyPublicId $yubikeyPublicId,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -278,11 +269,11 @@ public function provePossessionOfYubikey(
}
public function provePossessionOfPhone(
- SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ PhoneNumber $phoneNumber,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -372,12 +363,12 @@ public function saveVettingTypeHints(Institution $institution, VettingTypeHintCo
}
public function provePossessionOfGssf(
- SecondFactorId $secondFactorId,
- StepupProvider $provider,
- GssfId $gssfId,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ StepupProvider $provider,
+ GssfId $gssfId,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -422,11 +413,11 @@ public function provePossessionOfGssf(
* @deprecated Built in U2F support is dropped from StepUp, this was not removed to support event replay
*/
public function provePossessionOfU2fDevice(
- SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
- $emailVerificationRequired,
+ SecondFactorId $secondFactorId,
+ U2fKeyHandle $keyHandle,
+ bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -465,7 +456,7 @@ public function provePossessionOfU2fDevice(
}
}
- public function verifyEmail($verificationNonce): void
+ public function verifyEmail(string $verificationNonce): void
{
$this->assertNotForgotten();
@@ -495,16 +486,16 @@ public function verifyEmail($verificationNonce): void
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function vetSecondFactor(
- IdentityApi $registrant,
- SecondFactorId $registrantsSecondFactorId,
- SecondFactorType $registrantsSecondFactorType,
- SecondFactorIdentifier $registrantsSecondFactorIdentifier,
- $registrationCode,
- DocumentNumber $documentNumber,
- $identityVerified,
- SecondFactorTypeService $secondFactorTypeService,
+ IdentityApi $registrant,
+ SecondFactorId $registrantsSecondFactorId,
+ SecondFactorType $registrantsSecondFactorType,
+ SecondFactorIdentifier $registrantsSecondFactorIdentifier,
+ string $registrationCode,
+ DocumentNumber $documentNumber,
+ bool $identityVerified,
+ SecondFactorTypeService $secondFactorTypeService,
SecondFactorProvePossessionHelper $secondFactorProvePossessionHelper,
- $provePossessionSkipped,
+ bool $provePossessionSkipped,
): void {
$this->assertNotForgotten();
@@ -728,12 +719,12 @@ public function migrateVettedSecondFactor(
}
public function complyWithVettingOfSecondFactor(
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
+ SecondFactorId $secondFactorId,
+ SecondFactorType $secondFactorType,
SecondFactorIdentifier $secondFactorIdentifier,
- $registrationCode,
- DocumentNumber $documentNumber,
- $provePossessionSkipped,
+ string $registrationCode,
+ DocumentNumber $documentNumber,
+ bool $provePossessionSkipped,
): void {
$this->assertNotForgotten();
@@ -1029,7 +1020,7 @@ public function allVettedSecondFactorsRemoved(): void
);
}
- protected function applyIdentityCreatedEvent(IdentityCreatedEvent $event)
+ protected function applyIdentityCreatedEvent(IdentityCreatedEvent $event): void
{
$this->id = $event->identityId;
$this->institution = $event->identityInstitution;
@@ -1056,7 +1047,7 @@ public function applyIdentityEmailChangedEvent(IdentityEmailChangedEvent $event)
$this->email = $event->email;
}
- protected function applyYubikeySecondFactorBootstrappedEvent(YubikeySecondFactorBootstrappedEvent $event)
+ protected function applyYubikeySecondFactorBootstrappedEvent(YubikeySecondFactorBootstrappedEvent $event): void
{
$secondFactor = VettedSecondFactor::create(
$event->secondFactorId,
@@ -1069,7 +1060,7 @@ protected function applyYubikeySecondFactorBootstrappedEvent(YubikeySecondFactor
$this->vettedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyYubikeyPossessionProvenEvent(YubikeyPossessionProvenEvent $event)
+ protected function applyYubikeyPossessionProvenEvent(YubikeyPossessionProvenEvent $event): void
{
$secondFactor = UnverifiedSecondFactor::create(
$event->secondFactorId,
@@ -1083,7 +1074,7 @@ protected function applyYubikeyPossessionProvenEvent(YubikeyPossessionProvenEven
$this->unverifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyYubikeyPossessionProvenAndVerifiedEvent(YubikeyPossessionProvenAndVerifiedEvent $event)
+ protected function applyYubikeyPossessionProvenAndVerifiedEvent(YubikeyPossessionProvenAndVerifiedEvent $event): void
{
$secondFactor = VerifiedSecondFactor::create(
$event->secondFactorId,
@@ -1097,7 +1088,7 @@ protected function applyYubikeyPossessionProvenAndVerifiedEvent(YubikeyPossessio
$this->verifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyPhonePossessionProvenEvent(PhonePossessionProvenEvent $event)
+ protected function applyPhonePossessionProvenEvent(PhonePossessionProvenEvent $event): void
{
$secondFactor = UnverifiedSecondFactor::create(
$event->secondFactorId,
@@ -1111,7 +1102,7 @@ protected function applyPhonePossessionProvenEvent(PhonePossessionProvenEvent $e
$this->unverifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyPhonePossessionProvenAndVerifiedEvent(PhonePossessionProvenAndVerifiedEvent $event)
+ protected function applyPhonePossessionProvenAndVerifiedEvent(PhonePossessionProvenAndVerifiedEvent $event): void
{
$secondFactor = VerifiedSecondFactor::create(
$event->secondFactorId,
@@ -1125,7 +1116,7 @@ protected function applyPhonePossessionProvenAndVerifiedEvent(PhonePossessionPro
$this->verifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyGssfPossessionProvenEvent(GssfPossessionProvenEvent $event)
+ protected function applyGssfPossessionProvenEvent(GssfPossessionProvenEvent $event): void
{
$secondFactor = UnverifiedSecondFactor::create(
$event->secondFactorId,
@@ -1139,7 +1130,7 @@ protected function applyGssfPossessionProvenEvent(GssfPossessionProvenEvent $eve
$this->unverifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyGssfPossessionProvenAndVerifiedEvent(GssfPossessionProvenAndVerifiedEvent $event)
+ protected function applyGssfPossessionProvenAndVerifiedEvent(GssfPossessionProvenAndVerifiedEvent $event): void
{
$secondFactor = VerifiedSecondFactor::create(
$event->secondFactorId,
@@ -1153,7 +1144,7 @@ protected function applyGssfPossessionProvenAndVerifiedEvent(GssfPossessionProve
$this->verifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyU2fDevicePossessionProvenEvent(U2fDevicePossessionProvenEvent $event)
+ protected function applyU2fDevicePossessionProvenEvent(U2fDevicePossessionProvenEvent $event): void
{
$secondFactor = UnverifiedSecondFactor::create(
$event->secondFactorId,
@@ -1167,7 +1158,7 @@ protected function applyU2fDevicePossessionProvenEvent(U2fDevicePossessionProven
$this->unverifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyU2fDevicePossessionProvenAndVerifiedEvent(U2fDevicePossessionProvenAndVerifiedEvent $event)
+ protected function applyU2fDevicePossessionProvenAndVerifiedEvent(U2fDevicePossessionProvenAndVerifiedEvent $event): void
{
$secondFactor = VerifiedSecondFactor::create(
$event->secondFactorId,
@@ -1181,7 +1172,7 @@ protected function applyU2fDevicePossessionProvenAndVerifiedEvent(U2fDevicePosse
$this->verifiedSecondFactors->set((string)$secondFactor->getId(), $secondFactor);
}
- protected function applyPhoneRecoveryTokenPossessionProvenEvent(PhoneRecoveryTokenPossessionProvenEvent $event)
+ protected function applyPhoneRecoveryTokenPossessionProvenEvent(PhoneRecoveryTokenPossessionProvenEvent $event): void
{
$recoveryToken = RecoveryTokenEntity::create($event->recoveryTokenId, RecoveryTokenType::sms(), $this);
@@ -1190,13 +1181,14 @@ protected function applyPhoneRecoveryTokenPossessionProvenEvent(PhoneRecoveryTok
protected function applySafeStoreSecretRecoveryTokenPossessionPromisedEvent(
SafeStoreSecretRecoveryTokenPossessionPromisedEvent $event,
- ) {
+ ): void
+ {
$recoveryToken = RecoveryTokenEntity::create($event->recoveryTokenId, RecoveryTokenType::safeStore(), $this);
$this->recoveryTokens->set($recoveryToken);
}
- protected function applyEmailVerifiedEvent(EmailVerifiedEvent $event)
+ protected function applyEmailVerifiedEvent(EmailVerifiedEvent $event): void
{
$secondFactorId = (string)$event->secondFactorId;
@@ -1226,7 +1218,7 @@ public function applySecondFactorMigratedEvent(SecondFactorMigratedEvent $event)
$this->vettedSecondFactors->set($secondFactorId, $vetted);
}
- protected function applySecondFactorVettedEvent(SecondFactorVettedEvent $event)
+ protected function applySecondFactorVettedEvent(SecondFactorVettedEvent $event): void
{
$secondFactorId = (string)$event->secondFactorId;
$verified = $this->verifiedSecondFactors->get($secondFactorId);
@@ -1237,7 +1229,8 @@ protected function applySecondFactorVettedEvent(SecondFactorVettedEvent $event)
protected function applySecondFactorVettedWithoutTokenProofOfPossession(
SecondFactorVettedWithoutTokenProofOfPossession $event,
- ) {
+ ): void
+ {
$secondFactorId = (string)$event->secondFactorId;
/** @var VerifiedSecondFactor $verified */
@@ -1248,50 +1241,53 @@ protected function applySecondFactorVettedWithoutTokenProofOfPossession(
$this->vettedSecondFactors->set($secondFactorId, $vetted);
}
- protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event)
+ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event): void
{
$this->unverifiedSecondFactors->remove((string)$event->secondFactorId);
}
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->unverifiedSecondFactors->remove((string)$event->secondFactorId);
}
- protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event)
+ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event): void
{
$this->verifiedSecondFactors->remove((string)$event->secondFactorId);
}
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->verifiedSecondFactors->remove((string)$event->secondFactorId);
}
- protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event)
+ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event): void
{
$this->vettedSecondFactors->remove((string)$event->secondFactorId);
}
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->vettedSecondFactors->remove((string)$event->secondFactorId);
}
- protected function applyCompliedWithRecoveryCodeRevocationEvent(CompliedWithRecoveryCodeRevocationEvent $event)
+ protected function applyCompliedWithRecoveryCodeRevocationEvent(CompliedWithRecoveryCodeRevocationEvent $event): void
{
$this->recoveryTokens->remove($event->recoveryTokenId);
}
- protected function applyRecoveryTokenRevokedEvent(RecoveryTokenRevokedEvent $event)
+ protected function applyRecoveryTokenRevokedEvent(RecoveryTokenRevokedEvent $event): void
{
$this->recoveryTokens->remove($event->recoveryTokenId);
}
- protected function applyIdentityAccreditedAsRaForInstitutionEvent(IdentityAccreditedAsRaForInstitutionEvent $event)
+ protected function applyIdentityAccreditedAsRaForInstitutionEvent(IdentityAccreditedAsRaForInstitutionEvent $event): void
{
$this->registrationAuthorities->set(
$event->raInstitution,
@@ -1304,7 +1300,7 @@ protected function applyIdentityAccreditedAsRaForInstitutionEvent(IdentityAccred
);
}
- protected function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccreditedAsRaaForInstitutionEvent $event,)
+ protected function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccreditedAsRaaForInstitutionEvent $event,): void
{
$this->registrationAuthorities->set(
$event->raInstitution,
@@ -1319,14 +1315,15 @@ protected function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccre
protected function applyRegistrationAuthorityInformationAmendedForInstitutionEvent(
RegistrationAuthorityInformationAmendedForInstitutionEvent $event,
- ) {
+ ): void
+ {
$this->registrationAuthorities->get($event->raInstitution)->amendInformation(
$event->location,
$event->contactInformation,
);
}
- protected function applyAppointedAsRaaForInstitutionEvent(AppointedAsRaaForInstitutionEvent $event)
+ protected function applyAppointedAsRaaForInstitutionEvent(AppointedAsRaaForInstitutionEvent $event): void
{
$this->registrationAuthorities->get($event->raInstitution)->appointAs(
new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA),
@@ -1335,16 +1332,17 @@ protected function applyAppointedAsRaaForInstitutionEvent(AppointedAsRaaForInsti
protected function applyRegistrationAuthorityRetractedForInstitutionEvent(
RegistrationAuthorityRetractedForInstitutionEvent $event,
- ) {
+ ): void
+ {
$this->registrationAuthorities->remove($event->raInstitution);
}
- protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event)
+ protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event): void
{
$this->preferredLocale = $event->preferredLocale;
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->commonName = CommonName::unknown();
$this->email = Email::unknown();
@@ -1354,7 +1352,7 @@ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
/**
* This method is kept to be backwards compatible for changes before FGA
*/
- protected function applyAppointedAsRaEvent(AppointedAsRaEvent $event)
+ protected function applyAppointedAsRaEvent(AppointedAsRaEvent $event): void
{
$this->registrationAuthorities->get($event->identityInstitution)
->appointAs(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA));
@@ -1363,7 +1361,7 @@ protected function applyAppointedAsRaEvent(AppointedAsRaEvent $event)
/**
* This method is kept to be backwards compatible for changes before FGA
*/
- protected function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event)
+ protected function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event): void
{
$this->registrationAuthorities->get($event->identityInstitution)
->appointAs(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA));
@@ -1388,7 +1386,7 @@ protected function applyIdentityAccreditedAsRaEvent(IdentityAccreditedAsRaEvent
/**
* This method is kept to be backwards compatible for changes before FGA
*/
- protected function applyIdentityAccreditedAsRaaEvent(IdentityAccreditedAsRaaEvent $event)
+ protected function applyIdentityAccreditedAsRaaEvent(IdentityAccreditedAsRaaEvent $event): void
{
$this->registrationAuthorities->set(
$event->identityInstitution,
@@ -1404,7 +1402,7 @@ protected function applyIdentityAccreditedAsRaaEvent(IdentityAccreditedAsRaaEven
/**
* This method is kept to be backwards compatible for changes before FGA
*/
- protected function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitutionEvent $event)
+ protected function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitutionEvent $event): void
{
$this->registrationAuthorities->get($event->identityInstitution)
->appointAs(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA));
@@ -1415,7 +1413,8 @@ protected function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitu
*/
protected function applyRegistrationAuthorityInformationAmendedEvent(
RegistrationAuthorityInformationAmendedEvent $event,
- ) {
+ ): void
+ {
$this->registrationAuthorities->get($event->identityInstitution)->amendInformation(
$event->location,
$event->contactInformation,
@@ -1425,7 +1424,7 @@ protected function applyRegistrationAuthorityInformationAmendedEvent(
/**
* This method is kept to be backwards compatible for changes before FGA
*/
- protected function applyRegistrationAuthorityRetractedEvent(RegistrationAuthorityRetractedEvent $event)
+ protected function applyRegistrationAuthorityRetractedEvent(RegistrationAuthorityRetractedEvent $event): void
{
$this->registrationAuthorities->remove($event->identityInstitution);
}
@@ -1481,7 +1480,7 @@ private function assertUserMayAddRecoveryToken(RecoveryTokenType $recoveryTokenT
}
}
- public function getId()
+ public function getId(): IdentityId
{
return $this->id;
}
@@ -1489,7 +1488,7 @@ public function getId()
/**
* @return NameId
*/
- public function getNameId()
+ public function getNameId(): NameId
{
return $this->nameId;
}
@@ -1497,22 +1496,22 @@ public function getNameId()
/**
* @return Institution
*/
- public function getInstitution()
+ public function getInstitution(): Institution
{
return $this->institution;
}
- public function getCommonName()
+ public function getCommonName(): CommonName
{
return $this->commonName;
}
- public function getEmail()
+ public function getEmail(): Email
{
return $this->email;
}
- public function getPreferredLocale()
+ public function getPreferredLocale(): Locale
{
return $this->preferredLocale;
}
@@ -1561,7 +1560,7 @@ private function assertSelfAssertedTokenRegistrationAllowed(): void
/**
* Verify that every vetted second factor is self-asserted
*/
- private function assertAllVettedTokensAreSelfAsserted(): bool
+ private function assertAllVettedTokensAreSelfAsserted(): void
{
/** @var VettedSecondFactor $vettedSecondFactor */
foreach ($this->vettedSecondFactors as $vettedSecondFactor) {
@@ -1571,6 +1570,5 @@ private function assertAllVettedTokensAreSelfAsserted(): bool
);
}
}
- return true;
}
}
diff --git a/src/Surfnet/Stepup/Identity/Value/CommonName.php b/src/Surfnet/Stepup/Identity/Value/CommonName.php
index 5451c47e7..c6aa01297 100644
--- a/src/Surfnet/Stepup/Identity/Value/CommonName.php
+++ b/src/Surfnet/Stepup/Identity/Value/CommonName.php
@@ -1,5 +1,7 @@
commonName;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/ContactInformation.php b/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
index 6a4be94a9..d8e762e99 100644
--- a/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
+++ b/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
@@ -1,5 +1,7 @@
contactInformation = trim($contactInformation);
}
- /**
- * @return bool
- */
public function equals(ContactInformation $otherContactInformation): bool
{
return $this->contactInformation === $otherContactInformation->contactInformation;
@@ -49,7 +44,7 @@ public function equals(ContactInformation $otherContactInformation): bool
/**
* @return string
*/
- public function getContactInformation()
+ public function getContactInformation(): string
{
return $this->contactInformation;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/DocumentNumber.php b/src/Surfnet/Stepup/Identity/Value/DocumentNumber.php
index 57b60dbfa..178e2dd11 100644
--- a/src/Surfnet/Stepup/Identity/Value/DocumentNumber.php
+++ b/src/Surfnet/Stepup/Identity/Value/DocumentNumber.php
@@ -1,5 +1,7 @@
documentNumber;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/Email.php b/src/Surfnet/Stepup/Identity/Value/Email.php
index 4d92edf03..0c96c80a6 100644
--- a/src/Surfnet/Stepup/Identity/Value/Email.php
+++ b/src/Surfnet/Stepup/Identity/Value/Email.php
@@ -1,5 +1,7 @@
email;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php b/src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
index 9d1153d75..4614b589a 100644
--- a/src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+++ b/src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
@@ -31,17 +31,11 @@ private function __construct(
) {
}
- /**
- * @return EmailVerificationWindow
- */
public static function createFromTimeFrameStartingAt(TimeFrame $timeFrame, DateTime $start): EmailVerificationWindow
{
return new EmailVerificationWindow($start, $timeFrame->getEndWhenStartingAt($start));
}
- /**
- * @return EmailVerificationWindow
- */
public static function createWindowFromTill(DateTime $start, DateTime $end): EmailVerificationWindow
{
if (!$end->comesAfter($start)) {
@@ -71,14 +65,11 @@ public function isOpen(): bool
/**
* @return DateTime
*/
- public function openUntil()
+ public function openUntil(): DateTime
{
return $this->end;
}
- /**
- * @return bool
- */
public function equals(EmailVerificationWindow $other): bool
{
return $this->start == $other->start && $this->end == $other->end;
diff --git a/src/Surfnet/Stepup/Identity/Value/GssfId.php b/src/Surfnet/Stepup/Identity/Value/GssfId.php
index d4b63944b..00d434a10 100644
--- a/src/Surfnet/Stepup/Identity/Value/GssfId.php
+++ b/src/Surfnet/Stepup/Identity/Value/GssfId.php
@@ -24,7 +24,7 @@ final class GssfId implements SecondFactorIdentifier
{
private readonly string $gssfId;
- public static function unknown(): self
+ public static function unknown(): static
{
return new self('—');
}
@@ -38,7 +38,7 @@ public function __construct($gssfId)
$this->gssfId = trim($gssfId);
}
- public function getValue()
+ public function getValue(): string
{
return $this->gssfId;
}
@@ -48,7 +48,7 @@ public function __toString(): string
return $this->gssfId;
}
- public function equals($other): bool
+ public function equals(SecondFactorIdentifier $other): bool
{
return $other instanceof self && $this->gssfId === $other->gssfId;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/IdentityId.php b/src/Surfnet/Stepup/Identity/Value/IdentityId.php
index 1ba4b8f50..3da3b04f4 100644
--- a/src/Surfnet/Stepup/Identity/Value/IdentityId.php
+++ b/src/Surfnet/Stepup/Identity/Value/IdentityId.php
@@ -38,7 +38,7 @@ public function __construct($value)
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/Institution.php b/src/Surfnet/Stepup/Identity/Value/Institution.php
index 848383319..f824cd4fa 100644
--- a/src/Surfnet/Stepup/Identity/Value/Institution.php
+++ b/src/Surfnet/Stepup/Identity/Value/Institution.php
@@ -1,5 +1,7 @@
institution;
}
- /**
- * @return bool
- */
public function equals(Institution $otherInstitution): bool
{
return $this->institution === $otherInstitution->institution;
diff --git a/src/Surfnet/Stepup/Identity/Value/Locale.php b/src/Surfnet/Stepup/Identity/Value/Locale.php
index ac30d0efd..7c0f57d12 100644
--- a/src/Surfnet/Stepup/Identity/Value/Locale.php
+++ b/src/Surfnet/Stepup/Identity/Value/Locale.php
@@ -29,7 +29,7 @@ final class Locale implements JsonSerializable, Stringable
/**
* @param string $locale
*/
- public function __construct($locale)
+ public function __construct(string $locale)
{
if (!is_string($locale)) {
throw InvalidArgumentException::invalidType('string', 'locale', $locale);
@@ -38,9 +38,6 @@ public function __construct($locale)
$this->locale = $locale;
}
- /**
- * @return bool
- */
public function equals(Locale $other): bool
{
return $this == $other;
@@ -49,7 +46,7 @@ public function equals(Locale $other): bool
/**
* @return string
*/
- public function getLocale()
+ public function getLocale(): string
{
return $this->locale;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/Location.php b/src/Surfnet/Stepup/Identity/Value/Location.php
index 395fdd6e2..bce97e6d7 100644
--- a/src/Surfnet/Stepup/Identity/Value/Location.php
+++ b/src/Surfnet/Stepup/Identity/Value/Location.php
@@ -1,5 +1,7 @@
location = trim($location);
}
- /**
- * @return bool
- */
public function equals(Location $otherLocation): bool
{
return $this->location === $otherLocation->location;
@@ -49,7 +44,7 @@ public function equals(Location $otherLocation): bool
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->location;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/NameId.php b/src/Surfnet/Stepup/Identity/Value/NameId.php
index 8a29ea6a9..84859431d 100644
--- a/src/Surfnet/Stepup/Identity/Value/NameId.php
+++ b/src/Surfnet/Stepup/Identity/Value/NameId.php
@@ -55,7 +55,7 @@ public function __construct($value)
/**
* @return string
*/
- public function getNameId()
+ public function getNameId(): string
{
return $this->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php b/src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
index be152f43c..c971fe4d2 100644
--- a/src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+++ b/src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
@@ -23,7 +23,7 @@ class OnPremiseVettingType implements VettingType
/**
* @var string
*/
- protected $type = VettingType::TYPE_ON_PREMISE;
+ protected string $type = VettingType::TYPE_ON_PREMISE;
public function __construct(private readonly DocumentNumber $documentNumber)
{
diff --git a/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php b/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
index f81cb6b39..6608ce7d9 100644
--- a/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
+++ b/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
@@ -24,7 +24,7 @@ final class PhoneNumber implements SecondFactorIdentifier, RecoveryTokenIdentifi
{
private readonly string $phoneNumber;
- public static function unknown(): self
+ public static function unknown(): static
{
return new self('+0 (0) 000000000');
}
@@ -48,12 +48,12 @@ public function __construct($phoneNumber)
$this->phoneNumber = $phoneNumber;
}
- public function getValue()
+ public function getValue(): string
{
return $this->phoneNumber;
}
- public function equals($other): bool
+ public function equals(mixed $other): bool
{
return $other instanceof self && $this->phoneNumber === $other->phoneNumber;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
index c171289f7..90ad910fc 100644
--- a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
+++ b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
@@ -37,7 +37,7 @@ public function __construct($value)
/**
* @return string
*/
- public function getRecoveryTokenId()
+ public function getRecoveryTokenId(): string
{
return $this->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
index 55cffa241..dc3437dd9 100644
--- a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
+++ b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
@@ -66,7 +66,7 @@ public function isSafeStore(): bool
/**
* @return string
*/
- public function getType()
+ public function getType(): string
{
return $this->type;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
index 576474a19..25d8b2bdf 100644
--- a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+++ b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
@@ -1,5 +1,7 @@
role === $role->role;
@@ -74,7 +73,7 @@ public function isRaa(): bool
return $this->role === self::ROLE_RAA;
}
- public function jsonSerialize(): string
+ public function jsonSerialize(): int
{
return $this->role;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php b/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
index fb2ab51ec..023158b17 100644
--- a/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
+++ b/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
@@ -37,7 +37,7 @@ public function __construct($value)
/**
* @return string
*/
- public function getSecondFactorId()
+ public function getSecondFactorId(): string
{
return $this->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php b/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
index 10f135cc3..65c8557be 100644
--- a/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
+++ b/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
@@ -25,20 +25,20 @@ interface SecondFactorIdentifier extends JsonSerializable
/**
* @return static
*/
- public static function unknown();
+ public static function unknown(): static;
/**
* Return a string representation of the value of this value object.
*
* @return string
*/
- public function getValue();
+ public function getValue(): string;
/**
* @param self $other
* @return bool
*/
- public function equals($other): bool;
+ public function equals(SecondFactorIdentifier $other): bool;
/**
* @return string
diff --git a/src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php b/src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
index 4bc220cf1..fae3a8677 100644
--- a/src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+++ b/src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
@@ -23,7 +23,7 @@ class SelfAssertedRegistrationVettingType implements VettingType
/**
* @var string
*/
- protected $type = VettingType::TYPE_SELF_ASSERTED_REGISTRATION;
+ protected string $type = VettingType::TYPE_SELF_ASSERTED_REGISTRATION;
public function __construct(protected RecoveryTokenId $authoringRecoveryToken)
{
diff --git a/src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php b/src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
index 96bf87d83..12569eda6 100644
--- a/src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+++ b/src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
@@ -25,7 +25,7 @@ class SelfVetVettingType implements VettingType
/**
* @var string
*/
- protected $type = VettingType::TYPE_SELF_VET;
+ protected string $type = VettingType::TYPE_SELF_VET;
public function __construct(private readonly Loa $authoringLoa)
{
diff --git a/src/Surfnet/Stepup/Identity/Value/StepupProvider.php b/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
index 9cdbc809b..6cbab7517 100644
--- a/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
+++ b/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
@@ -37,7 +37,7 @@ public function __construct($provider)
/**
* @return string
*/
- public function getStepupProvider()
+ public function getStepupProvider(): string
{
return $this->provider;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/TimeFrame.php b/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
index f91de8f7a..62994a3a3 100644
--- a/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
+++ b/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
@@ -1,5 +1,6 @@
add($this->timeFrame);
}
- /**
- * @return bool
- */
public function equals(TimeFrame $other): bool
{
return $this->timeFrame->s === $other->timeFrame->s;
diff --git a/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php b/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
index 95e0809e5..a88b8ada9 100644
--- a/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
+++ b/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
@@ -32,7 +32,7 @@ final class U2fKeyHandle implements SecondFactorIdentifier
/**
* @return static
*/
- public static function unknown(): self
+ public static function unknown(): static
{
return new self(self::UNKNOWN);
}
@@ -55,7 +55,7 @@ public function __construct($value)
$this->value = $value;
}
- public function getValue()
+ public function getValue(): string
{
return $this->value;
}
@@ -65,7 +65,7 @@ public function __toString(): string
return $this->value;
}
- public function equals($other): bool
+ public function equals(SecondFactorIdentifier $other): bool
{
return $other instanceof self && $this->value === $other->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/UnhashedSecret.php b/src/Surfnet/Stepup/Identity/Value/UnhashedSecret.php
index 6e2b876b4..da0fa4422 100644
--- a/src/Surfnet/Stepup/Identity/Value/UnhashedSecret.php
+++ b/src/Surfnet/Stepup/Identity/Value/UnhashedSecret.php
@@ -41,7 +41,7 @@ class UnhashedSecret implements HashableSecret
*/
private const ALGORITHM = PASSWORD_BCRYPT;
- public function hashSecret(): Secret
+ public function hashSecret(): HashedSecret
{
$hashedSecret = password_hash(
$this->secret,
diff --git a/src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php b/src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
index 91eb89b96..9b3cdc1cf 100644
--- a/src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
+++ b/src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
@@ -23,7 +23,7 @@ class UnknownVettingType implements VettingType
/**
* @var string
*/
- protected $type = VettingType::TYPE_UNKNOWN;
+ protected string $type = VettingType::TYPE_UNKNOWN;
public function __construct()
{
diff --git a/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php b/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
index f6978cc9b..5d62301f0 100644
--- a/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
+++ b/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
@@ -26,7 +26,7 @@ final class YubikeyPublicId implements SecondFactorIdentifier
private string $value;
- public static function unknown(): self
+ public static function unknown(): static
{
return new self(self::UNKNOWN);
}
@@ -62,7 +62,7 @@ public function __construct($value)
$this->value = $value;
}
- public function getValue()
+ public function getValue(): string
{
return $this->value;
}
@@ -72,7 +72,7 @@ public function __toString(): string
return $this->value;
}
- public function equals($other): bool
+ public function equals(SecondFactorIdentifier $other): bool
{
return $other instanceof self && $this->value === $other->value;
}
diff --git a/src/Surfnet/Stepup/Identity/Whitelist.php b/src/Surfnet/Stepup/Identity/Whitelist.php
index 87dbcc7d9..08dd4aa27 100644
--- a/src/Surfnet/Stepup/Identity/Whitelist.php
+++ b/src/Surfnet/Stepup/Identity/Whitelist.php
@@ -34,9 +34,6 @@ final class Whitelist extends EventSourcedAggregateRoot implements WhitelistApi
*/
public const WHITELIST_AGGREGATE_ID = '125ccee5-d650-437a-a0b0-6bf17c8188fa';
- /**
- * @var InstitutionCollection The collection of institutions currently on the whitelist
- */
private ?InstitutionCollection $whitelist = null;
public function __construct()
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
index bcdbae7ce..1aadeaef4 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
@@ -78,9 +78,6 @@ public function an_event_should_be_the_same_after_serialization_and_deserializat
$this->assertEquals($unserializedEvent, $deserializedEvent);
}
- /**
- * @return SerializableInterface[]
- */
public function institutionConfigurationEventsProvider(): array
{
$institution = new Institution('A test institution');
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
index aed427340..115931adf 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
@@ -184,7 +184,7 @@ public function allowed_second_factor_lists_with_the_same_elements_are_considere
$this->assertTrue($base->equals($other));
}
- public function differentAllowedSecondFactorListsProvider()
+ public function differentAllowedSecondFactorListsProvider(): array
{
return [
'Different second factor types' => [
@@ -206,7 +206,7 @@ public function differentAllowedSecondFactorListsProvider()
];
}
- public function sameAllowedSecondFactorListsProvider()
+ public function sameAllowedSecondFactorListsProvider(): array
{
return [
'Same second factor types' => [
@@ -228,7 +228,7 @@ public function sameAllowedSecondFactorListsProvider()
];
}
- public function availableSecondFactorTypeProvider()
+ public function availableSecondFactorTypeProvider(): array
{
$service = new SecondFactorTypeService([
'biometric' => ['loa' => 3],
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
index 36d7ffb18..8d538678f 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
+ $this->expectException(TypeError::class);
new ContactInformation($invalidValue);
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
index 7da9a0465..1b513f315 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
@@ -139,7 +139,7 @@ public function should_be_set_to_default_if_created_with_own_institution_as_inst
);
$this->assertEquals([$this->institution], $option->getInstitutions($this->institution));
- $this->assertEquals(true, $option->isDefault());
+ $this->assertTrue($option->isDefault());
$this->assertEquals([], $option->getInstitutionSet()->toScalarArray());
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
index d9a8a50ca..c8220e100 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
@@ -46,7 +46,6 @@ public function two_institution_configuration_ids_created_for_the_different_inst
* @group domain
*
* @dataProvider nonStringOrEmptyStringProvider
- * @param $nonStringOrEmptyString
*/
public function an_institution_configuration_id_cannot_be_created_from_something_other_than_a_string(
string|int|float|StdClass|array $nonStringOrEmptyString,
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
index 94e31cd06..185d2fc1d 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new Institution($invalidValue);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider nonStringOrNonEmptyStringProviderTypeError
+ */
+ public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
+ int|float|StdClass|array $invalidValue,
+ ): void {
+ $this->expectException(TypeError::class);
+ new Institution($invalidValue);
+ }
+
/**
* @test
* @group domain
@@ -61,6 +76,12 @@ public function nonStringOrNonEmptyStringProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
+ ];
+ }
+
+ public function nonStringOrNonEmptyStringProviderTypeError(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
index 5286f29e3..0f23c8686 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
+ $this->expectException(TypeError::class);
new Location($nonString);
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
index 3a0198fc3..fa1287ce0 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new RaLocationId($nonStringOrEmptyString);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider nonStringOrEmptyStringProviderTypeError
+ */
+ public function an_ra_location_id_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
+ int|float|StdClass|array $errorValue,
+ ): void {
+ $this->expectException(TypeError::class);
+
+ new RaLocationId($errorValue);
+ }
+
/**
* @test
* @group domain
@@ -86,6 +102,12 @@ public function nonStringOrEmptyStringProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
+ ];
+ }
+
+ public function nonStringOrEmptyStringProviderTypeError(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
index a7805c7ec..5c46c6aa4 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new RaLocationName($nonStringOrEmptyString);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider nonStringOrEmptyStringProviderTypeError
+ */
+ public function an_ra_location_name_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
+ int|float|StdClass|array $error,
+ ): void {
+ $this->expectException(TypeError::class);
+
+ new RaLocationName($error);
+ }
+
/**
* @test
* @group domain
@@ -70,6 +86,12 @@ public function nonStringOrEmptyStringProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
+ ];
+ }
+
+ public function nonStringOrEmptyStringProviderTypeError(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php b/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
index 90e3a1238..f60ae4497 100644
--- a/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
+++ b/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
@@ -34,7 +34,6 @@ class JsonHelperTest extends TestCase
* @group json
*
* @dataProvider nonStringProvider
- * @param $nonString
*/
public function json_helper_can_only_decode_strings(bool|int|float|StdClass|array $nonString): void
{
diff --git a/src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php b/src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
index 141ab0776..0241bcc53 100644
--- a/src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
+++ b/src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
@@ -18,6 +18,7 @@
namespace Surfnet\Stepup\Tests\Helper;
+use DateTime as CoreDateTime;
use Generator;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
@@ -117,7 +118,7 @@ public function provideEvents(): Generator
new SecondFactorId("52"),
new PhoneNumber("+0 (0) 000000000"),
true,
- emailVerificationWindow::createWindowFromTill(new DateTime(), new DateTime()),
+ EmailVerificationWindow::createWindowFromTill(new DateTime(), new DateTime(new CoreDateTime('+5 minute'))),
"30c0fcb136bf324eea652d5b86c1a08c",
new CommonName("commonname"),
new Email("test@example.com"),
diff --git a/src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php b/src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
index c5d1fbd74..fbd4f5e00 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
@@ -172,7 +172,7 @@ public function multiple_institutions_can_be_removed(): void
/**
* @return array
*/
- private function getInstitutions()
+ private function getInstitutions(): array
{
static $institutions;
diff --git a/src/Surfnet/Stepup/Tests/Identity/Entity/SecondFactorCollectionTest.php b/src/Surfnet/Stepup/Tests/Identity/Entity/SecondFactorCollectionTest.php
index 8576c929e..e74740015 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Entity/SecondFactorCollectionTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Entity/SecondFactorCollectionTest.php
@@ -52,10 +52,7 @@ public function collection_can_return_second_factor_with_highest_loa(): void
$this->assertTrue($secondFactor->getType()->isYubikey(), 'Expected yubikey since it has a higher LoA than sms');
}
- /**
- * @return SecondFactor
- */
- private function mockVettedSecondFactor(string $type)
+ private function mockVettedSecondFactor(string $type): SecondFactor
{
$mock = m::mock(VettedSecondFactor::class);
$mock->shouldReceive('getType')
diff --git a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
index ec2b3c0bd..5df9935ee 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
@@ -21,6 +21,7 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
+use ReflectionException;
use Surfnet\Stepup\Identity\Event\CompliedWithRevocationEvent;
use Surfnet\Stepup\Identity\Event\CompliedWithUnverifiedSecondFactorRevocationEvent;
use Surfnet\Stepup\Identity\Event\CompliedWithVerifiedSecondFactorRevocationEvent;
@@ -113,6 +114,8 @@ public function certain_events_are_forgettable_events_and_others_are_not(): void
/**
* @return string[]
+ * @throws ReflectionException
+ * @throws ReflectionException
*/
private function getConcreteIdentityEventFqcns(): array
{
diff --git a/src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php b/src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
index 2d33f7ac2..ca587a765 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
@@ -65,7 +65,7 @@ public function eventProvider(): array
/**
* @return InstitutionCollection
*/
- private function getInstitutionCollection()
+ private function getInstitutionCollection(): InstitutionCollection
{
static $institutionCollection;
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
index 2dfd33973..b48fe4d70 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new CommonName($invalidValue);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider invalidArgumentProviderTypeError
+ */
+ public function the_common_name_address_must_be_a_non_empty_string_type_error(int|float|StdClass|array $invalidValue): void
+ {
+ $this->expectException(TypeError::class);
+
+ new CommonName($invalidValue);
+ }
+
/**
* @test
* @group domain
@@ -56,14 +71,17 @@ public function two_common_names_with_the_same_value_are_equal(): void
$this->assertFalse($commonName->equals($unknown));
}
- /**
- * provider for {@see the_common_name_address_must_be_a_non_empty_string()}
- */
public function invalidArgumentProvider(): array
{
return [
'empty string' => [''],
'blank string' => [' '],
+ ];
+ }
+
+ public function invalidArgumentProviderTypeError(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
index d00ff196e..0af33851f 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
+ $this->expectException(TypeError::class);
new ContactInformation($invalidValue);
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
index d957f1a47..e9904c7e1 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new DocumentNumber($invalidValue);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider invalidArgumentProviderTypeError
+ */
+ public function the_document_number_must_be_a_non_empty_string_type_error(int|float|StdClass|array $invalidValue): void
+ {
+ $this->expectException(TypeError::class);
+ new DocumentNumber($invalidValue);
+ }
+
/**
* @test
* @group domain
@@ -55,13 +69,16 @@ public function two_document_numbers_with_the_same_value_are_equal(): void
$this->assertFalse($commonName->equals($unknown));
}
- /**
- * provider for {@see the_document_number_address_must_be_a_non_empty_string()}
- */
public function invalidArgumentProvider(): array
{
return [
'empty string' => [''],
+ ];
+ }
+
+ public function invalidArgumentProviderTypeError(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
index daf63f21d..1bd8dfbbd 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
new Email($invalidValue);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider invalidArgumentProviderTypeErrors
+ */
+ public function the_email_address_must_be_a_non_empty_string_invalid_types(int|float|StdClass|array $invalidValue): void
+ {
+ $this->expectException(TypeError::class);
+ new Email($invalidValue);
+ }
+
/**
* @test
* @group domain
* @dataProvider invalidEmailProvider
- * @param $invalidValue
*/
public function the_email_address_given_must_be_rfc_822_compliant(string $invalidValue): void
{
@@ -68,14 +81,17 @@ public function two_emails_with_the_same_value_are_equal(): void
$this->assertFalse($email->equals($unknown));
}
- /**
- * provider for {@see the_email_address_must_be_a_non_empty_string()}
- */
public function invalidArgumentProvider(): array
{
return [
'empty string' => [''],
'blank string' => [' '],
+ ];
+ }
+
+ public function invalidArgumentProviderTypeErrors(): array
+ {
+ return [
'array' => [[]],
'integer' => [1],
'float' => [1.2],
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/EmailVerificationWindowTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/EmailVerificationWindowTest.php
index 861e18d3b..630d0c72f 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/EmailVerificationWindowTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/EmailVerificationWindowTest.php
@@ -20,6 +20,7 @@
use DateInterval;
use DateTime as CoreDateTime;
+use Exception;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
use Surfnet\Stepup\DateTime\DateTime;
@@ -118,9 +119,10 @@ public function the_window_correctly_calculates_the_end_datetime(): void
* Helper method for easy EmailVerificationWindow creation
*
* @param string|null $startTimeOffset
- * @return EmailVerificationWindow
+ * @throws Exception
+ * @throws Exception
*/
- private function newEmailVerificationWindow(int $timeFrameSeconds, $startTimeOffset = null)
+ private function newEmailVerificationWindow(int $timeFrameSeconds, string $startTimeOffset = null): EmailVerificationWindow
{
$start = DateTime::now();
if ($startTimeOffset) {
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
index bcfd7a01d..e03ba36df 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
@@ -1,5 +1,7 @@
expectException(TypeError::class);
+ new Institution($invalidValue);
+ }
+ /**
+ * @test
+ * @group domain
+ * @dataProvider invalidValueProviderInvalidString
+ */
+ public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(string $invalidValue): void {
$this->expectException(InvalidArgumentException::class);
-
new Institution($invalidValue);
}
@@ -63,12 +74,21 @@ public function two_institutions_with_the_same_value_are_equal(): void
public function invalidValueProvider(): array
{
return [
- 'empty string' => [''],
- 'blank string' => [' '],
'array' => [[]],
'integer' => [1],
'float' => [1.2],
'object' => [new StdClass()],
];
}
+
+ /**
+ * dataprovider
+ */
+ public function invalidValueProviderInvalidString(): array
+ {
+ return [
+ 'empty string' => [''],
+ 'blank string' => [' '],
+ ];
+ }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
index 05837f4d6..55844f2f6 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
-
+ $this->expectException(TypeError::class);
new Location($invalidValue);
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
index 4a4573a97..ea612aa2b 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
+ $this->expectException(TypeError::class);
new RegistrationAuthorityRole($invalidValue);
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
index 992035120..fc868f883 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
TimeFrame::ofSeconds($invalidValue);
}
+ /**
+ * @test
+ * @group domain
+ * @dataProvider invalidValueProviderOtherTypes
+ */
+ public function it_cannot_be_given_an_non_positive_amount_of_secondsOtherTypes(string|float|StdClass|array $invalidValue): void
+ {
+ $this->expectException(TypeError::class);
+
+ TimeFrame::ofSeconds($invalidValue);
+ }
+
/**
* @test
* @group domain
@@ -60,15 +76,24 @@ public function to_string_output_matches_amount_of_seconds_as_string(): void
/**
* dataprovider
*/
- public function invalidValueProvider(): array
+ public function invalidValueProviderInt(): array
+ {
+ return [
+ 'zero' => [0],
+ 'negative int' => [-1],
+ ];
+ }
+
+ /**
+ * dataprovider
+ */
+ public function invalidValueProviderOtherTypes(): array
{
return [
'empty string' => [''],
'string' => ['abc'],
'array' => [[]],
- 'float' => [2.718],
- 'zero' => [0],
- 'negative int' => [-1],
+ 'float' => [2.123],
'object' => [new StdClass()],
];
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
index a8b2ba0a4..46d32d1bd 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
@@ -23,6 +23,7 @@
use Doctrine\DBAL\Types\Type;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\CommonName;
+use TypeError;
/**
* Custom Type for the CommonName Value Object
@@ -53,7 +54,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform): ?CommonNa
try {
$commonName = new CommonName($value);
- } catch (InvalidArgumentException $e) {
+ } catch (InvalidArgumentException|TypeError $e) {
// get nice standard message, so we can throw it keeping the exception chain
$doctrineExceptionMessage = ConversionException::conversionFailed(
$value,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
index 17ed944e8..08fc37f3b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
@@ -1,5 +1,7 @@
'recovery_token_revoked',
];
- /**
- *
- * @var string
- */
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
- /**
- * @var string|null
- */
#[ORM\Column(length: 36, nullable: true)]
- public $actorId;
+ public ?string $actorId;
- /**
- * @var CommonName
- */
#[ORM\Column(type: 'stepup_common_name', nullable: true)]
- public $actorCommonName;
+ public CommonName $actorCommonName;
- /**
- * @var Institution|null
- */
#[ORM\Column(type: 'institution', nullable: true)]
- public $actorInstitution;
+ public ?Institution $actorInstitution;
/**
* Only in certain situations will this field be filled, It represents the RA institution the
* event log entry is targeted at. For example. John Doe is accredited to become RA by Joe from
* institution-a. The actual institution John is appointed RA for is stored in this field.
- *
- *
- * @var string|null
*/
#[ORM\Column(length: 255, nullable: true)]
- public $raInstitution;
+ public ?string $raInstitution;
- /**
- * @var string
- */
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
- /**
- * @var Institution
- */
#[ORM\Column(type: 'institution')]
- public $identityInstitution;
+ public Institution $identityInstitution;
- /**
- * @var string|null
- */
#[ORM\Column(length: 36, nullable: true)]
- public $secondFactorId;
+ public ?string $secondFactorId;
- /**
- * @var string
- */
#[ORM\Column(length: 255, nullable: true)]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
- /**
- * @var string|null
- */
#[ORM\Column(length: 36, nullable: true)]
- public $secondFactorType;
+ public ?string $secondFactorType;
- /**
- * @var string
- */
#[ORM\Column(length: 255, nullable: true)]
- public $recoveryTokenIdentifier;
+ public string $recoveryTokenIdentifier;
- /**
- * @var string|null
- */
#[ORM\Column(length: 36, nullable: true)]
- public $recoveryTokenType;
+ public ?string $recoveryTokenType;
- /**
- * @var string
- */
#[ORM\Column(length: 255)]
- public $event;
+ public string $event;
- /**
- * @var DateTime
- */
#[ORM\Column(type: 'stepup_datetime')]
- public $recordedOn;
+ public DateTime $recordedOn;
public function jsonSerialize(): array
{
@@ -232,7 +189,7 @@ public function jsonSerialize(): array
* @param string $event Event FQCN
* @return string Action name
*/
- private function mapEventToAction($event)
+ private function mapEventToAction(string $event): string
{
if (!isset($this->eventActionMap[$event])) {
throw new LogicException(sprintf("Action name for event '%s' not registered", $event));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
index f60a13eb3..57cfbd94b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
@@ -34,43 +34,24 @@
#[ORM\Entity(repositoryClass: IdentityRepository::class)]
class Identity implements JsonSerializable
{
- /**
- *
- * @var string
- */
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
- /**
- * @var NameId
- */
#[ORM\Column(type: 'stepup_name_id')]
- public $nameId;
+ public NameId $nameId;
- /**
- * @var CommonName
- */
#[ORM\Column(type: 'stepup_common_name')]
- public $commonName;
+ public CommonName $commonName;
- /**
- * @var Institution
- */
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
- /**
- * @var Email
- */
#[ORM\Column(type: 'stepup_email')]
- public $email;
+ public Email $email;
- /**
- * @var Locale
- */
#[ORM\Column(type: 'stepup_locale')]
- public $preferredLocale;
+ public Locale $preferredLocale;
public ?bool $possessedSelfAssertedToken;
public static function create(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
index 3fe930bc5..7b571d144 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
@@ -32,7 +32,7 @@ class IdentitySelfAssertedTokenOptions implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $identityId;
+ public IdentityId $identityId;
/**
* In order to determine if the user is allowed to register
@@ -42,7 +42,7 @@ class IdentitySelfAssertedTokenOptions implements JsonSerializable
* @var bool
*/
#[ORM\Column(type: 'boolean')]
- public $possessedToken = false;
+ public bool $possessedToken = false;
/**
* Indicator if Identity is allowed to work with Recovery Tokens
@@ -54,7 +54,7 @@ class IdentitySelfAssertedTokenOptions implements JsonSerializable
* @var bool
*/
#[ORM\Column(type: 'boolean')]
- public $possessedSelfAssertedToken;
+ public bool $possessedSelfAssertedToken;
public static function create(
IdentityId $identityId,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
index ed8ef6e30..6355ef219 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
@@ -32,7 +32,7 @@ class InstitutionListing implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
public static function createFrom(Institution $institution): self
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
index 764222a52..3c4f9fb54 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
@@ -39,7 +39,7 @@ class RaCandidate implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
/**
*
@@ -47,31 +47,31 @@ class RaCandidate implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(type: 'institution')]
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
/**
* @var NameId
*/
#[ORM\Column(type: 'stepup_name_id')]
- public $nameId;
+ public NameId $nameId;
/**
* @var CommonName
*/
#[ORM\Column(type: 'stepup_common_name')]
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
#[ORM\Column(type: 'stepup_email')]
- public $email;
+ public Email $email;
private function __construct()
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
index 51aced080..75c5cbabe 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
@@ -43,55 +43,55 @@ class RaListing implements JsonSerializable
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue]
- public $id;
+ public int $id;
/**
* @var string
*/
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
/**
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $raInstitution;
+ public Institution $raInstitution;
/**
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
/**
* @var CommonName
*/
#[ORM\Column(type: 'stepup_common_name')]
- public $commonName;
+ public CommonName $commonName;
/**
* @var Email
*/
#[ORM\Column(type: 'stepup_email')]
- public $email;
+ public Email $email;
/**
* @var AuthorityRole
*/
#[ORM\Column(type: 'authority_role')]
- public $role;
+ public AuthorityRole $role;
/**
* @var Location
*/
#[ORM\Column(type: 'stepup_location', nullable: true)]
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
#[ORM\Column(type: 'stepup_contact_information', nullable: true)]
- public $contactInformation;
+ public ContactInformation $contactInformation;
public static function create(
$identityId,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
index e7d6be771..ac0a833db 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
@@ -44,7 +44,7 @@ class RaSecondFactor implements JsonSerializable
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
/**
* The name of the registrant.
@@ -53,7 +53,7 @@ class RaSecondFactor implements JsonSerializable
* @var CommonName
*/
#[ORM\Column(type: 'stepup_common_name')]
- public $name;
+ public CommonName $name;
/**
* The e-mail of the registrant.
@@ -62,19 +62,19 @@ class RaSecondFactor implements JsonSerializable
* @var Email
*/
#[ORM\Column(type: 'stepup_email')]
- public $email;
+ public Email $email;
/**
* @var DocumentNumber
*/
#[ORM\Column(type: 'stepup_document_number', nullable: true)]
- public $documentNumber;
+ public ?DocumentNumber $documentNumber;
/**
* @var SecondFactorStatus
*/
#[ORM\Column(type: 'stepup_second_factor_status')]
- public $status;
+ public SecondFactorStatus $status;
/**
* @param string $id
@@ -86,16 +86,16 @@ class RaSecondFactor implements JsonSerializable
public function __construct(
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id,
+ public string $id,
#[ORM\Column(length: 16)]
- public $type,
+ public string $type,
#[ORM\Column(length: 255)]
- public $secondFactorId,
+ public string $secondFactorId,
#[ORM\Column(length: 36)]
- public $identityId,
- Institution $institution,
- CommonName $name,
- Email $email,
+ public string $identityId,
+ Institution $institution,
+ CommonName $name,
+ Email $email,
DocumentNumber $documentNumber = null,
) {
$this->institution = $institution;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
index bd8b89802..04ca1f144 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
@@ -33,51 +33,51 @@ class RecoveryToken implements JsonSerializable
{
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
/**
* @var string
*/
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[ORM\Column(length: 16)]
- public $type;
+ public string $type;
/**
* @var RecoveryTokenStatus
*/
#[ORM\Column(type: 'stepup_recovery_token_status')]
- public $status;
+ public RecoveryTokenStatus $status;
/**
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
/**
* The name of the registrant.
* @var CommonName
*/
#[ORM\Column(type: 'stepup_common_name')]
- public $name;
+ public CommonName $name;
/**
* The e-mail of the registrant.
* @var Email
*/
#[ORM\Column(type: 'stepup_email')]
- public $email;
+ public Email $email;
/**
* @var string
*/
#[ORM\Column(length: 255)]
- public $recoveryMethodIdentifier;
+ public string $recoveryMethodIdentifier;
public function jsonSerialize(): array
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
index b4bd1d9ab..ad0a00935 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
@@ -33,29 +33,29 @@ class SecondFactorRevocation
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
/**
* @var Institution
*/
#[ORM\Column(type: 'institution')]
- public $institution;
+ public Institution $institution;
/**
* @var string|null
*/
#[ORM\Column(length: 36, nullable: true)]
- public $secondFactorType;
+ public ?string $secondFactorType;
/**
* @var string
*/
#[ORM\Column]
- public $revokedBy;
+ public string $revokedBy;
/**
* @var DateTime
*/
#[ORM\Column(type: 'stepup_datetime')]
- public $recordedOn;
+ public DateTime $recordedOn;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
index 898f02176..fa45af37f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
@@ -31,32 +31,32 @@ class UnverifiedSecondFactor implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
/**
* @var string
*/
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[ORM\Column(length: 16)]
- public $type;
+ public string $type;
/**
* The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
* @var string
*/
#[ORM\Column(length: 255)]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
/**
* @var string
*/
#[ORM\Column(length: 32)]
- public $verificationNonce;
+ public string $verificationNonce;
public function jsonSerialize(): array
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
index 5089db855..b8ac78aab 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
@@ -18,9 +18,9 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Entity;
-use DateTime;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
+use Surfnet\Stepup\DateTime\DateTime;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VerifiedSecondFactorRepository;
#[ORM\Table]
@@ -28,55 +28,33 @@
#[ORM\Entity(repositoryClass: VerifiedSecondFactorRepository::class)]
class VerifiedSecondFactor implements JsonSerializable
{
- /**
- * @var string
- */
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
- /**
- * @var string
- */
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
- /**
- * @var string
- */
#[ORM\Column]
- public $institution;
+ public string $institution;
- /**
- * @var string
- */
#[ORM\Column]
- public $commonName;
+ public string $commonName;
- /**
- * @var string
- */
#[ORM\Column(length: 16)]
- public $type;
+ public string $type;
/**
* The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
- * @var string
*/
#[ORM\Column(length: 255)]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
- /**
- * @var string
- */
#[ORM\Column(length: 8)]
- public $registrationCode;
+ public string $registrationCode;
- /**
- * @var DateTime
- */
#[ORM\Column(type: 'stepup_datetime')]
- public $registrationRequestedAt;
+ public DateTime $registrationRequestedAt;
public function jsonSerialize(): array
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
index 12e6386ce..58e91b756 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
@@ -34,32 +34,32 @@ class VettedSecondFactor implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
/**
* @var string
*/
#[ORM\Column(length: 36)]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[ORM\Column(length: 16)]
- public $type;
+ public string $type;
/**
* The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
* @var string
*/
#[ORM\Column(length: 255)]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
/**
* @var string
*/
#[ORM\Column(length: 255, nullable: true)]
- public $vettingType;
+ public string $vettingType;
/**
* @return bool
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
index e3b56ceb2..11ebe9274 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
@@ -161,7 +161,9 @@ private function applyIdentityForgottenEvent(IdentityForgottenEvent $event): voi
private function augmentActorCommonName(AuditLogEntry $entry, Metadata $auditLogMetadata): void
{
if (property_exists($auditLogMetadata, 'vettingType') && !is_null($auditLogMetadata->vettingType)) {
- $entry->actorCommonName .= $auditLogMetadata->vettingType->auditLog();
+ $entry->actorCommonName = new CommonName(
+ $entry->actorCommonName->getCommonName() . $auditLogMetadata->vettingType->auditLog()
+ );
}
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
index 611a95757..8a5337575 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
@@ -147,7 +147,7 @@ public function applyRegistrationAuthorityRetractedForInstitutionEvent(
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->raListingRepository->removeByIdentityId($event->identityId, $event->identityInstitution);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
index 6e10f20d0..f53847231 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
@@ -224,19 +224,19 @@ public function applyU2fDevicePossessionProvenAndVerifiedEvent(U2fDevicePossessi
* @param DocumentNumber|null $documentNumber
*/
private function saveRaSecondFactor(
- string $identityId,
- string $secondFactorId,
- string $secondFactorType,
- $secondFactorIdentifier,
- CommonName $commonName,
- Email $email,
+ string $identityId,
+ string $secondFactorId,
+ string $secondFactorType,
+ string $secondFactorIdentifier,
+ CommonName $commonName,
+ Email $email,
SecondFactorStatus $status = null,
- DocumentNumber $documentNumber = null,
+ DocumentNumber $documentNumber = null,
): void {
$identity = $this->identityRepository->find($identityId);
$secondFactor = new RaSecondFactor(
- (string)$secondFactorId,
+ $secondFactorId,
$secondFactorType,
$secondFactorIdentifier,
$identity->id,
@@ -302,40 +302,43 @@ public function applySecondFactorVettedWithoutTokenProofOfPossession(
$this->raSecondFactorRepository->save($secondFactor);
}
- protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event)
+ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event): void
{
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
- protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event)
+ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event): void
{
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
- protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event)
+ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event): void
{
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->raSecondFactorRepository->updateStatusByIdentityIdToForgotten($event->identityId);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php
index 326454712..901eca786 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php
@@ -87,7 +87,7 @@ public function applyRecoveryTokenRevokedEvent(RecoveryTokenRevokedEvent $event)
* When Identity is forgotten, the recovery token projections for this identity
* are removed from the recovery_tokens table.
*/
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->recoveryTokenRepository->removeByIdentity($event->identityId);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
index 23b7f1122..42e5c64f0 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
@@ -230,7 +230,7 @@ public function applySecondFactorVettedWithoutTokenProofOfPossession(
$this->verifiedRepository->remove($verified);
}
- protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event)
+ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event): void
{
$this->unverifiedRepository->remove(
$this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId()),
@@ -239,35 +239,38 @@ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFacto
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->unverifiedRepository->remove(
$this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId()),
);
}
- protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event)
+ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event): void
{
$this->verifiedRepository->remove($this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()));
}
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->verifiedRepository->remove($this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()));
}
- protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event)
+ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event): void
{
$this->vettedRepository->remove($this->vettedRepository->find($event->secondFactorId->getSecondFactorId()));
}
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$this->vettedRepository->remove($this->vettedRepository->find($event->secondFactorId->getSecondFactorId()));
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->unverifiedRepository->removeByIdentityId($event->identityId);
$this->verifiedRepository->removeByIdentityId($event->identityId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
index 52dba6b32..87bd40b68 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
@@ -37,7 +37,8 @@ public function __construct(private readonly SecondFactorRevocationRepository $r
protected function applyVettedSecondFactorRevokedEvent(
VettedSecondFactorRevokedEvent $event,
DomainMessage $domainMessage,
- ) {
+ ): void
+ {
$revocation = new SecondFactorRevocation();
$revocation->id = (string)Uuid::uuid4();
$revocation->institution = $event->identityInstitution;
@@ -51,7 +52,8 @@ protected function applyVettedSecondFactorRevokedEvent(
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
DomainMessage $domainMessage,
- ) {
+ ): void
+ {
$revocation = new SecondFactorRevocation();
$revocation->id = (string)Uuid::uuid4();
$revocation->institution = $event->identityInstitution;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php
index cd87bbfad..e08240a44 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php
@@ -32,7 +32,7 @@ public function __construct(private readonly WhitelistEntryRepository $whitelist
{
}
- protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event)
+ protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event): void
{
$whitelistEntries = [];
foreach ($event->whitelistedInstitutions as $institution) {
@@ -42,7 +42,7 @@ protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event)
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
+ protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event): void
{
$this->whitelistEntryRepository->removeAll();
@@ -54,7 +54,7 @@ protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhitelistEvent $event)
+ protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhitelistEvent $event): void
{
$whitelistEntries = [];
foreach ($event->addedInstitutions as $institution) {
@@ -64,7 +64,7 @@ protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhi
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemovedFromWhitelistEvent $event)
+ protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemovedFromWhitelistEvent $event): void
{
$institutions = [];
foreach ($event->removedInstitutions as $institution) {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/AbstractQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/AbstractQuery.php
index 0c23d2da7..f64e21e2e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/AbstractQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/AbstractQuery.php
@@ -23,10 +23,10 @@ abstract class AbstractQuery
/**
* @var int
*/
- public $pageNumber;
+ public int $pageNumber;
/**
* @var int
*/
- public $itemsPerPage = 25;
+ public int $itemsPerPage = 25;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/IdentityQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/IdentityQuery.php
index 49eceac11..9fa598625 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/IdentityQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/IdentityQuery.php
@@ -25,20 +25,20 @@ class IdentityQuery extends AbstractQuery
/**
* @var string
*/
- public $nameId;
+ public string $nameId;
/**
* @var string
*/
- public $commonName;
+ public string $commonName;
/**
* @var string|Institution
*/
- public $institution;
+ public string|Institution $institution;
/**
* @var string
*/
- public $email;
+ public string $email;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaCandidateQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaCandidateQuery.php
index 5251af564..7116e1af2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaCandidateQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaCandidateQuery.php
@@ -26,30 +26,30 @@ class RaCandidateQuery extends AbstractQuery
/**
* @var string|Institution
*/
- public $institution;
+ public string|Institution $institution;
/**
* @var string
*/
- public $commonName;
+ public string $commonName;
/**
* @var string
*/
- public $email;
+ public string $email;
/**
* @var string[]
*/
- public $secondFactorTypes;
+ public array $secondFactorTypes;
/**
* @var string|Institution
*/
- public $raInstitution;
+ public string|Institution $raInstitution;
/**
* @var InstitutionAuthorizationContextInterface
*/
- public $authorizationContext;
+ public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
index 044a2bac1..fbfda7f93 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
@@ -27,45 +27,45 @@ class RaListingQuery extends AbstractQuery
/**
* @var string|Institution
*/
- public $institution;
+ public string|Institution $institution;
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var string|null
*/
- public $name;
+ public ?string $name;
/**
* @var string|null
*/
- public $email;
+ public ?string $email;
/**
* @var string|null
*/
- public $role;
+ public ?string $role;
/**
* @var string|null
*/
- public $raInstitution;
+ public ?string $raInstitution;
/**
* @var string
*/
- public $orderBy;
+ public string $orderBy;
/**
* @var string
*/
- public $orderDirection;
+ public string $orderDirection;
/**
* @var InstitutionAuthorizationContextInterface
*/
- public $authorizationContext;
+ public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
index 050f6d11f..12d2bfaf9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
@@ -25,45 +25,45 @@ final class RaSecondFactorQuery extends AbstractQuery
/**
* @var string|null
*/
- public $name;
+ public ?string $name;
/**
* @var string|null
*/
- public $type;
+ public ?string $type;
/**
* @var string|null The second factor type's ID (eg. Yubikey public ID)
*/
- public $secondFactorId;
+ public ?string $secondFactorId;
/**
* @var string|null
*/
- public $email;
+ public ?string $email;
/**
* @var string|null the filter value, not to be confused with the actorInstitution which is used for authorizations.
*/
- public $institution;
+ public ?string $institution;
/**
* @var string|null One of the ApiBundle\Identity\Entity\RaSecondFactor::STATUS_* constants.
*/
- public $status;
+ public ?string $status;
/**
* @var string|null
*/
- public $orderBy;
+ public ?string $orderBy;
/**
* @var string|null
*/
- public $orderDirection;
+ public ?string $orderDirection;
/**
* @var InstitutionAuthorizationContextInterface
*/
- public $authorizationContext;
+ public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaaQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaaQuery.php
index add5d7c7a..979080cc7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaaQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaaQuery.php
@@ -25,10 +25,10 @@ class RaaQuery extends AbstractQuery
/**
* @var string|Institution
*/
- public $institution;
+ public string|Institution $institution;
/**
* @var string
*/
- public $nameId;
+ public string $nameId;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
index 46dfb981a..450d1e857 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
@@ -26,45 +26,45 @@ class RecoveryTokenQuery extends AbstractQuery
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var string|null
*/
- public $type;
+ public ?string $type;
/**
* @var string|null
*/
- public $status;
+ public ?string $status;
/**
* @var string|null
*/
- public $institution;
+ public ?string $institution;
/**
* @var string|null
*/
- public $name;
+ public ?string $name;
/**
* @var string|null
*/
- public $email;
+ public ?string $email;
/**
* @var string|null
*/
- public $orderBy;
+ public ?string $orderBy;
/**
* @var string|null
*/
- public $orderDirection;
+ public ?string $orderDirection;
/**
* @var InstitutionAuthorizationContextInterface
*/
- public $authorizationContext;
+ public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/SecondFactorAuditLogQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/SecondFactorAuditLogQuery.php
index d03f1ab4f..f7e2fb3ef 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/SecondFactorAuditLogQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/SecondFactorAuditLogQuery.php
@@ -26,20 +26,20 @@ final class SecondFactorAuditLogQuery extends AbstractQuery
/**
* @var Institution
*/
- public $identityInstitution;
+ public Institution $identityInstitution;
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var string
*/
- public $orderBy = 'recordedOn';
+ public string $orderBy = 'recordedOn';
/**
* @var string
*/
- public $orderDirection = 'desc';
+ public string $orderDirection = 'desc';
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
index 59bfb3224..5e43a6caf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
@@ -25,10 +25,10 @@ class UnverifiedSecondFactorQuery extends AbstractQuery
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
/**
* @var string|null
*/
- public $verificationNonce;
+ public ?string $verificationNonce;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
index 42fe3fb56..8a9b3d80c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
@@ -25,5 +25,5 @@ class VerifiedSecondFactorOfIdentityQuery extends AbstractQuery
/**
* @var IdentityId|null
*/
- public $identityId;
+ public ?IdentityId $identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
index bf19570e2..03f0b9e40 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
@@ -27,20 +27,20 @@ class VerifiedSecondFactorQuery extends AbstractQuery
/**
* @var IdentityId|null
*/
- public $identityId;
+ public ?IdentityId $identityId;
/**
* @var SecondFactorId|null
*/
- public $secondFactorId;
+ public ?SecondFactorId $secondFactorId;
/**
* @var string|null
*/
- public $registrationCode;
+ public ?string $registrationCode;
/**
* @var InstitutionAuthorizationContext
*/
- public $authorizationContext;
+ public InstitutionAuthorizationContext $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
index 727e20d3c..4fad4cef3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
@@ -25,5 +25,5 @@ class VettedSecondFactorQuery extends AbstractQuery
/**
* @var IdentityId
*/
- public $identityId;
+ public IdentityId $identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
index f431b6716..00861a154 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
@@ -25,7 +25,6 @@
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
-use Surfnet\StepupMiddleware\ApiBundle\Authorization\Filter\InstitutionAuthorizationRepositoryFilter;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\IdentityQuery;
@@ -33,7 +32,6 @@ class IdentityRepository extends ServiceEntityRepository
{
public function __construct(
ManagerRegistry $registry,
- private readonly InstitutionAuthorizationRepositoryFilter $authorizationRepositoryFilter,
) {
parent::__construct($registry, Identity::class);
}
@@ -92,7 +90,7 @@ public function createSearchQuery(
* @param string[] $nameIds
* @return Identity[] Indexed by NameID.
*/
- public function findByNameIdsIndexed(array $nameIds)
+ public function findByNameIdsIndexed(array $nameIds): array
{
return $this->getEntityManager()->createQueryBuilder()
->select('i')
@@ -124,7 +122,7 @@ public function hasIdentityWithNameIdAndInstitution(NameId $nameId, Institution
/**
* @return Identity
*/
- public function findOneByNameIdAndInstitution(NameId $nameId, Institution $institution)
+ public function findOneByNameIdAndInstitution(NameId $nameId, Institution $institution): Identity
{
return $this->createQueryBuilder('i')
->where('i.nameId = :nameId')
@@ -153,7 +151,7 @@ public function removeByIdentityId(IdentityId $identityId): void
/**
* @return ArrayCollection|Identity[]
*/
- public function findByInstitution(Institution $institution)
+ public function findByInstitution(Institution $institution): ArrayCollection|array
{
return $this->createQueryBuilder('i')
->where('i.institution = :institution')
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
index b1ac17b65..a6009de88 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
@@ -20,14 +20,12 @@
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
-use Surfnet\StepupMiddleware\ApiBundle\Authorization\Filter\InstitutionAuthorizationRepositoryFilter;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\IdentitySelfAssertedTokenOptions;
class IdentitySelfAssertedTokenOptionsRepository extends ServiceEntityRepository
{
public function __construct(
ManagerRegistry $registry,
- private readonly InstitutionAuthorizationRepositoryFilter $authorizationRepositoryFilter,
) {
parent::__construct($registry, IdentitySelfAssertedTokenOptions::class);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
index 0e46f507f..a9c9fed07 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
@@ -131,7 +131,7 @@ public function createOptionsQuery(RaCandidateQuery $query): Query
/**
* @return array|null
*/
- public function findOneByIdentityId(string $identityId)
+ public function findOneByIdentityId(string $identityId): ?array
{
// Finds a single identity by its identity id. Returns the identity as an array
$queryBuilder = $this->getBaseQuery()
@@ -146,7 +146,7 @@ public function findOneByIdentityId(string $identityId)
/**
* @return QueryBuilder
*/
- private function getBaseQuery()
+ private function getBaseQuery(): QueryBuilder
{
// Base query to get all allowed ra candidates
$queryBuilder = $this->getEntityManager()->createQueryBuilder()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
index bf68aa1c2..9a997be5e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
@@ -51,7 +51,7 @@ public function find(mixed $id, $lockMode = null, $lockVersion = null): ?RaSecon
* @param string $identityId
* @return RaSecondFactor[]
*/
- public function findByIdentityId($identityId): array
+ public function findByIdentityId(string $identityId): array
{
return parent::findBy(['identityId' => $identityId]);
}
@@ -61,7 +61,7 @@ public function findByIdentityId($identityId): array
* @param string $institution
* @return RaSecondFactor[]
*/
- public function findByInstitution($institution): array
+ public function findByInstitution(string $institution): array
{
return parent::findBy(['institution' => $institution]);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
index 3555ef02d..00d395564 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
@@ -48,10 +48,10 @@ public function find(mixed $id, $lockMode = null, $lockVersion = null): ?Verifie
/**
* @return VerifiedSecondFactor[]
*/
- public function findByDate(DateTime $requestedAt)
+ public function findByDate(DateTime $requestedAt): array
{
$fromDate = clone $requestedAt;
- $fromDate->setTime(0, 0, 0);
+ $fromDate->setTime(0, 0);
$toDate = clone $requestedAt;
$toDate->setTime(23, 59, 59);
@@ -102,9 +102,6 @@ public function createSearchQuery(VerifiedSecondFactorQuery $query): Query
return $queryBuilder->getQuery();
}
- /**
- * @return Query
- */
public function createSearchForIdentityQuery(VerifiedSecondFactorOfIdentityQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('sf');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
index 053cb4ca2..7f8ca425f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
@@ -35,7 +35,7 @@ public function __construct(ManagerRegistry $registry)
* @param Institution[] $institutions
* @return array
*/
- public function findEntriesByInstitutions(array $institutions)
+ public function findEntriesByInstitutions(array $institutions): array
{
$qb = $this->createQueryBuilder('w');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
index 1820a7e86..add967864 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
@@ -61,7 +61,7 @@ protected function getFilteredQueryOptions(Query $doctrineQuery): array
foreach ($results as $options) {
foreach ($options as $key => $value) {
$val = (string)$value;
- $filters[$key][$val] = (string)$val;
+ $filters[$key][$val] = $val;
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
index 7293317eb..f6e39abb4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
@@ -31,7 +31,7 @@ public function __construct(private readonly AuditLogRepository $repository)
/**
* @return Pagerfanta
*/
- public function searchSecondFactorAuditLog(SecondFactorAuditLogQuery $query)
+ public function searchSecondFactorAuditLog(SecondFactorAuditLogQuery $query): Pagerfanta
{
$doctrineQuery = $this->repository->createSecondFactorSearchQuery($query);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
index 0036ee754..86785487d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
@@ -19,12 +19,10 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Service;
use Iterator;
-use IteratorAggregate;
use Pagerfanta\Pagerfanta;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
-use Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionRoleSet;
use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\IdentitySelfAssertedTokenOptions;
@@ -34,7 +32,6 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RaListingRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\SraaRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials;
-use Traversable;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -115,7 +112,7 @@ public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(
/**
* @return null|RegistrationAuthorityCredentials
*/
- private function findRegistrationAuthorityCredentialsByIdentity(Identity $identity)
+ private function findRegistrationAuthorityCredentialsByIdentity(Identity $identity): ?RegistrationAuthorityCredentials
{
$raListing = $this->raListingRepository->findByIdentityId(new IdentityId($identity->id));
$sraa = $this->sraaRepository->findByNameId($identity->nameId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
index d33bfb444..cfe3b5908 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
@@ -22,14 +22,12 @@
use Surfnet\Stepup\Identity\Value\RegistrationAuthorityRole;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Service\AuthorizationContextService;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
-use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RaListingRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\AuthorizedInstitutionCollection;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\Profile;
class ProfileService extends AbstractSearchService
{
public function __construct(
- private readonly RaListingRepository $raListingRepository,
private readonly IdentityService $identityService,
private readonly AuthorizationContextService $authorizationService,
) {
@@ -51,7 +49,7 @@ public function __construct(
* @param string $identityId
* @return Profile|null
*/
- public function createProfile($identityId): ?Profile
+ public function createProfile(string $identityId): ?Profile
{
$identity = $this->identityService->find($identityId);
if (!$identity instanceof Identity) {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
index aa95d6390..48b0f05a3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
@@ -33,7 +33,7 @@ public function __construct(private readonly RaCandidateRepository $raCandidateR
/**
* @return Pagerfanta
*/
- public function search(RaCandidateQuery $query)
+ public function search(RaCandidateQuery $query): Pagerfanta
{
$doctrineQuery = $this->raCandidateRepository->createSearchQuery($query);
@@ -43,7 +43,7 @@ public function search(RaCandidateQuery $query)
/**
* @return array
*/
- public function getFilterOptions(RaCandidateQuery $query)
+ public function getFilterOptions(RaCandidateQuery $query): array
{
return $this->getFilteredQueryOptions($this->raCandidateRepository->createOptionsQuery($query));
}
@@ -51,7 +51,7 @@ public function getFilterOptions(RaCandidateQuery $query)
/**
* @return null|array
*/
- public function findOneByIdentityId(string $identityId)
+ public function findOneByIdentityId(string $identityId): ?array
{
return $this->raCandidateRepository->findOneByIdentityId($identityId);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
index 333ffa7f5..902d3c134 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
@@ -40,7 +40,8 @@ public function findByIdentityIdAndRaInstitutionWithContext(
IdentityId $identityId,
Institution $raInstitution,
InstitutionAuthorizationContextInterface $authorizationContext,
- ) {
+ ): ?RaListing
+ {
return $this->raListingRepository->findByIdentityIdAndRaInstitutionWithContext(
$identityId,
$raInstitution,
@@ -51,7 +52,7 @@ public function findByIdentityIdAndRaInstitutionWithContext(
/**
* @return Pagerfanta
*/
- public function search(RaListingQuery $query)
+ public function search(RaListingQuery $query): Pagerfanta
{
$doctrineQuery = $this->raListingRepository->createSearchQuery($query);
@@ -61,7 +62,7 @@ public function search(RaListingQuery $query)
/**
* @return array
*/
- public function getFilterOptions(RaListingQuery $query)
+ public function getFilterOptions(RaListingQuery $query): array
{
return $this->getFilteredQueryOptions($this->raListingRepository->createOptionsQuery($query));
}
@@ -69,7 +70,7 @@ public function getFilterOptions(RaListingQuery $query)
/**
* @return RegistrationAuthorityCredentials[]
*/
- public function listRegistrationAuthoritiesFor(Institution $institution)
+ public function listRegistrationAuthoritiesFor(Institution $institution): array
{
$raListings = $this->raListingRepository->listRasFor($institution);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
index fab37d0dc..f58423391 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
@@ -31,7 +31,7 @@ public function __construct(private readonly RaSecondFactorRepository $repositor
/**
* @return Pagerfanta
*/
- public function search(RaSecondFactorQuery $query)
+ public function search(RaSecondFactorQuery $query): Pagerfanta
{
$doctrineQuery = $this->repository->createSearchQuery($query);
@@ -41,7 +41,7 @@ public function search(RaSecondFactorQuery $query)
/**
* @return array
*/
- public function getFilterOptions(RaSecondFactorQuery $query)
+ public function getFilterOptions(RaSecondFactorQuery $query): array
{
return $this->getFilteredQueryOptions($this->repository->createOptionsQuery($query));
}
@@ -49,7 +49,7 @@ public function getFilterOptions(RaSecondFactorQuery $query)
/**
* @return array
*/
- public function searchUnpaginated(RaSecondFactorQuery $query)
+ public function searchUnpaginated(RaSecondFactorQuery $query): array
{
return $this->repository->createSearchQuery($query)->getResult();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
index 00d275ecc..3a3760e9b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
@@ -49,7 +49,7 @@ public function get(RecoveryTokenId $id): RecoveryToken
return $recoveryToken;
}
- public function getFilterOptions(RecoveryTokenQuery $query)
+ public function getFilterOptions(RecoveryTokenQuery $query): array
{
return $this->getFilteredQueryOptions($this->recoveryTokenRepository->createOptionsQuery($query));
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
index 626e7be7e..cb2372df8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
@@ -48,7 +48,7 @@ public function __construct(
/**
* @return Pagerfanta
*/
- public function searchUnverifiedSecondFactors(UnverifiedSecondFactorQuery $query)
+ public function searchUnverifiedSecondFactors(UnverifiedSecondFactorQuery $query): Pagerfanta
{
$doctrineQuery = $this->unverifiedRepository->createSearchQuery($query);
@@ -58,7 +58,7 @@ public function searchUnverifiedSecondFactors(UnverifiedSecondFactorQuery $query
/**
* @return Pagerfanta
*/
- public function searchVerifiedSecondFactors(VerifiedSecondFactorQuery $query)
+ public function searchVerifiedSecondFactors(VerifiedSecondFactorQuery $query): Pagerfanta
{
$doctrineQuery = $this->verifiedRepository->createSearchQuery($query);
@@ -69,7 +69,7 @@ public function searchVerifiedSecondFactors(VerifiedSecondFactorQuery $query)
/**
* @return Pagerfanta
*/
- public function searchVerifiedSecondFactorsOfIdentity(VerifiedSecondFactorOfIdentityQuery $query)
+ public function searchVerifiedSecondFactorsOfIdentity(VerifiedSecondFactorOfIdentityQuery $query): Pagerfanta
{
$doctrineQuery = $this->verifiedRepository->createSearchForIdentityQuery($query);
@@ -79,7 +79,7 @@ public function searchVerifiedSecondFactorsOfIdentity(VerifiedSecondFactorOfIden
/**
* @return Pagerfanta
*/
- public function searchVettedSecondFactors(VettedSecondFactorQuery $query)
+ public function searchVettedSecondFactors(VettedSecondFactorQuery $query): Pagerfanta
{
$doctrineQuery = $this->vettedRepository->createSearchQuery($query);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
index ac620af1f..6a924103d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
@@ -31,7 +31,7 @@ public function __construct(private readonly SraaRepository $sraaRepository)
/**
* @return Sraa|null
*/
- public function findByNameId(NameId $nameId)
+ public function findByNameId(NameId $nameId): ?Sraa
{
return $this->sraaRepository->findByNameId($nameId);
}
@@ -47,7 +47,7 @@ public function findAll(): array
/**
* @return bool
*/
- public function contains(NameId $nameId)
+ public function contains(NameId $nameId): bool
{
return $this->sraaRepository->contains($nameId);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
index 4960b1f12..966deb0e4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
@@ -26,12 +26,12 @@ public function __construct(private readonly WhitelistEntryRepository $whitelist
{
}
- public function isWhitelisted($institution)
+ public function isWhitelisted($institution): bool
{
return $this->whitelistEntryRepository->hasEntryFor($institution);
}
- public function getAllEntries()
+ public function getAllEntries(): \Doctrine\Common\Collections\ArrayCollection
{
return $this->whitelistEntryRepository->getAll();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
index 942f82938..5d7900c57 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
@@ -25,5 +25,5 @@ interface SpecificationInterface
/**
* @return mixed
*/
- public function apply(EntityRepository $entityRepository);
+ public function apply(EntityRepository $entityRepository): mixed;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
index 558ac61d1..6b3ff1ad1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
@@ -32,7 +32,7 @@ class AuthorityRole implements Stringable
/**
* @var string
*/
- private $role;
+ private string $role;
public function __construct($role)
{
@@ -71,7 +71,7 @@ public static function raa(): self
/**
* @return AuthorityRole
*/
- public static function fromRegistrationAuthorityRole(RegistrationAuthorityRole $registrationAuthorityRole)
+ public static function fromRegistrationAuthorityRole(RegistrationAuthorityRole $registrationAuthorityRole): AuthorityRole
{
if ($registrationAuthorityRole->isRa()) {
return static::ra();
@@ -82,7 +82,7 @@ public static function fromRegistrationAuthorityRole(RegistrationAuthorityRole $
throw new RuntimeException(
sprintf(
'AuthorityRole cannot be created from RegistrationAuthorityRole of value "%s"',
- (string)$registrationAuthorityRole,
+ $registrationAuthorityRole,
),
);
}
@@ -98,7 +98,7 @@ public function equals(AuthorityRole $other): bool
/**
* @return string
*/
- public function getRole()
+ public function getRole(): string
{
return $this->role;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
index 50f726894..ea252bff8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
@@ -32,7 +32,7 @@ class AuthorizedInstitutionCollection
* 'institution-3' => [select_raa],
* ]
*
- * @var string[]
+ * @var array>
*/
private array $authorizations = [];
@@ -42,24 +42,26 @@ public static function from(
): self {
$collection = new self();
+ /** @var string $institution */
foreach ($raInstitutions as $institution) {
- $collection->authorizations[(string)$institution][] = (string)AuthorityRole::ROLE_RA;
+ $collection->authorizations[$institution][] = AuthorityRole::ROLE_RA;
}
if ($raaInstitutions instanceof InstitutionCollection) {
+ /** @var string $institution */
foreach ($raaInstitutions as $institution) {
// Override existing lower role
- if (isset($collection->authorizations[(string)$institution])
- && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string)$institution])
+ if (isset($collection->authorizations[$institution])
+ && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[$institution])
) {
- $collection->authorizations[(string)$institution] = [];
+ $collection->authorizations[$institution] = [];
}
- $collection->authorizations[(string)$institution][] = (string)AuthorityRole::ROLE_RAA;
+ $collection->authorizations[$institution][] = AuthorityRole::ROLE_RAA;
}
}
return $collection;
}
- public function getAuthorizations()
+ public function getAuthorizations(): array
{
return $this->authorizations;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
index 69f1de5fa..4b92abc0b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
@@ -28,9 +28,9 @@ class Profile implements JsonSerializable
* @param bool $isSraa
*/
public function __construct(
- private readonly Identity $identity,
+ private readonly Identity $identity,
private readonly AuthorizedInstitutionCollection $authorizedInstitutionCollection,
- private $isSraa,
+ private bool $isSraa,
) {
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
index a56b8b548..3588cd1bc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
@@ -51,7 +51,7 @@ public static function forgotten(): self
* @param string $status
* @return bool
*/
- public static function isValidStatus($status): bool
+ public static function isValidStatus(string $status): bool
{
return in_array($status, ['unverified', 'verified', 'vetted', 'revoked', 'forgotten', true]);
}
@@ -59,7 +59,7 @@ public static function isValidStatus($status): bool
/**
* @param string $status
*/
- private function __construct(private $status)
+ private function __construct(private string $status)
{
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
index eb579f7dd..74690dc45 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
@@ -26,7 +26,7 @@
class CommandParamConverter implements ParamConverterInterface
{
- public function apply(Request $request, ParamConverter $configuration): void
+ public function apply(Request $request, ParamConverter $configuration): bool
{
$data = json_decode($request->getContent(), true);
@@ -49,6 +49,7 @@ public function apply(Request $request, ParamConverter $configuration): void
}
$request->attributes->set('command', $command);
+ return true;
}
public function supports(ParamConverter $configuration): bool
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
index 6a1108876..bc901b901 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
@@ -28,9 +28,10 @@ class ConfigurationInstitutionParamConverter implements ParamConverterInterface
{
public const INSTITUTION = 'institution';
- public function apply(Request $request, ParamConverter $configuration): void
+ public function apply(Request $request, ParamConverter $configuration): bool
{
$request->attributes->set(self::INSTITUTION, new Institution($this->getInstitutionFromRequest($request)));
+ return true;
}
public function supports(ParamConverter $configuration): bool
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
index 5fbba5c92..9f06abeba 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
@@ -26,7 +26,7 @@
class InstitutionParamConverter implements ParamConverterInterface
{
- public function apply(Request $request, ParamConverter $configuration): void
+ public function apply(Request $request, ParamConverter $configuration): bool
{
$query = $request->query;
$institution = $query->get('institution', false);
@@ -38,6 +38,8 @@ public function apply(Request $request, ParamConverter $configuration): void
$query->remove('institution');
$request->attributes->set('institution', new Institution($institution));
+
+ return true;
}
public function supports(ParamConverter $configuration): bool
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php
index 7e1704b75..51d596957 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php
@@ -31,7 +31,7 @@ public function __construct(private readonly ValidatorInterface $validator)
{
}
- public function apply(Request $request, ParamConverter $configuration): void
+ public function apply(Request $request, ParamConverter $configuration): bool
{
$data = json_decode($request->getContent());
@@ -50,6 +50,7 @@ public function apply(Request $request, ParamConverter $configuration): void
}
$request->attributes->set('metadata', $metadata);
+ return true;
}
public function supports(ParamConverter $configuration): bool
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index 2e160c5d6..ff665b3dc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -77,6 +77,7 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\VerifyEmailCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\VetSecondFactorCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Command\FixedUuidStubCommand;
+use function property_exists;
class CommandAuthorizationServiceTest extends TestCase
{
@@ -208,6 +209,9 @@ public function an_identity_should_be_able_to_execute_configured_ra_commands(str
$actorInstitution = new Institution('institution');
$command = m::mock($command);
+ if (property_exists($command, 'identityId')) {
+ $command->identityId = $actorId;
+ }
$command->shouldReceive('getRaInstitution')
->andReturn($actorInstitution->getInstitution());
@@ -391,6 +395,9 @@ public function an_identity_should_be_able_to_execute_unconfigured_ra_commands(s
|| $command instanceof RevokeRegistrantsSecondFactorCommand
|| $command instanceof RevokeRegistrantsRecoveryTokenCommand
) {
+ if (property_exists($command, 'identityId')) {
+ $command->identityId = $actorId;
+ }
$role = RegistrationAuthorityRole::ra();
$mockInstitution = new Institution('mock institution');
$mockIdentity = m::mock(Identity::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
index b546b676d..dbb5fa8dd 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
+ $this->expectException(TypeError::class);
$type = Type::getType(DocumentNumberType::NAME);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
index 384bdaafa..d34e64068 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/LocaleTypeTest.php
@@ -1,5 +1,7 @@
client = static::createClient();
- $this->databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();
+ $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ $this->databaseTool->setRegistry(static::getContainer()->get(ManagerRegistry::class));
+ $this->databaseTool->setObjectManagerName('middleware');
// Initialises schema.
- $this->databaseTool->loadFixtures([]);
+ $this->databaseTool->loadFixtures();
$passwordSs = $this->client->getKernel()->getContainer()->getParameter('selfservice_api_password');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
index ee7e9acbe..56d4d90be 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
@@ -20,6 +20,7 @@
use Generator;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Liip\TestFixturesBundle\Test\FixturesTrait;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\Client;
@@ -40,11 +41,11 @@ class SraaControllerTest extends WebTestCase
private string $endpoint;
- private DatabaseToolCollection $databaseTool;
+ private ORMSqliteDatabaseTool $databaseTool;
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();
+ $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
index 058b76fca..872b910c0 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
@@ -28,6 +28,7 @@
use PHPUnit\Framework\TestCase;
use Surfnet\Stepup\DateTime\DateTime as StepupDateTime;
use Surfnet\Stepup\Identity\AuditLog\Metadata;
+use Surfnet\Stepup\Identity\Value\CommonName;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\SecondFactorId;
@@ -87,8 +88,6 @@ public function auditable_events(): array
$this->createAuditLogMetadata(
new IdentityId('abcd'),
new Institution('efgh'),
- null,
- null,
),
),
BroadwayDateTime::fromString('1970-01-01H00:00:00.000'),
@@ -98,11 +97,6 @@ public function auditable_events(): array
new Institution('efgh'),
EventStub::class,
new StepupDateTime(new CoreDateTime('1970-01-01H00:00:00.000')),
- null,
- null,
- null,
- null,
- null,
),
],
'with actor, with second factor' => [
@@ -153,7 +147,7 @@ public function it_creates_entries_for_auditable_events(DomainMessage $message,
$identityRepository = m::mock(IdentityRepository::class);
$identity = new Identity();
- $identity->commonName = self::$actorCommonName;
+ $identity->commonName = new CommonName(self::$actorCommonName);
$identityRepository->shouldReceive('find')->andReturn($identity);
$projector = new AuditLogProjector($repository, $identityRepository);
@@ -196,13 +190,13 @@ private function createExpectedAuditLogEntry(
$actorCommonName = null,
): AuditLogEntry {
$entry = new AuditLogEntry();
- $entry->actorId = $actorId instanceof IdentityId ? (string)$actorId : null;
- $entry->actorInstitution = $actorInstitution instanceof Institution ? (string)$actorInstitution : null;
- $entry->identityId = (string)$identityId;
+ $entry->actorId = $actorId instanceof IdentityId ? $actorId : null;
+ $entry->actorInstitution = $actorInstitution instanceof Institution ? $actorInstitution : null;
+ $entry->identityId = $identityId;
$entry->identityInstitution = $identityInstitution;
- $entry->secondFactorId = $secondFactorId instanceof SecondFactorId ? (string)$secondFactorId : null;
- $entry->secondFactorType = $secondFactorType instanceof SecondFactorType ? (string)$secondFactorType : null;
- $entry->secondFactorIdentifier = $secondFactorIdentifier instanceof YubikeyPublicId ? (string)$secondFactorIdentifier : null;
+ $entry->secondFactorId = $secondFactorId instanceof SecondFactorId ? $secondFactorId : null;
+ $entry->secondFactorType = $secondFactorType instanceof SecondFactorType ? $secondFactorType : null;
+ $entry->secondFactorIdentifier = $secondFactorIdentifier instanceof YubikeyPublicId ? $secondFactorIdentifier : null;
$entry->event = $event;
$entry->recordedOn = $recordedOn;
$entry->actorCommonName = $actorCommonName;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/Event/EventStub.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/Event/EventStub.php
index 5d1650014..62f74267d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/Event/EventStub.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/Event/EventStub.php
@@ -28,7 +28,7 @@ public function __construct(
) {
}
- public function getAuditLogMetadata()
+ public function getAuditLogMetadata(): Metadata
{
return $this->metadata;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
index 9ef5b6cd6..d5ef74c05 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
@@ -29,7 +29,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Request\CommandParamConverter;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Root\Command\FooBarCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Root\Command\Ns\QuuxCommand;
+use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
class CommandParamConverterTest extends TestCase
{
@@ -68,9 +70,12 @@ public function it_can_convert_command_name_notation($expectedCommandClass, stri
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
- $request->attributes = m::mock()
+
+ /** @var ParameterBag $attributes */
+ $attributes = m::mock()
->shouldReceive('set')->with('command', m::type($expectedCommandClass))
->getMock();
+ $request->attributes = $attributes;
$configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
@@ -87,13 +92,17 @@ public function it_sets_uuid(): void
{
$command = ['command' => ['name' => 'Root:FooBar', 'uuid' => 'abcdef', 'payload' => new stdClass]];
- /** @var Request&MockInterface $request */
+ /** @var Request $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
- $request->attributes = m::mock()
+
+ /** @var ParameterBag $attributes */
+ $attributes = m::mock()
->shouldReceive('set')->with('command', $this->spy($spiedCommand))
->getMock();
+ $request->attributes = $attributes;
+
$configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
@@ -110,13 +119,18 @@ public function it_sets_payload(): void
{
$command = ['command' => ['name' => 'Root:FooBar', 'uuid' => 'abcdef', 'payload' => ['snake_case' => true]]];
- /** @var Request&MockInterface $request */
+ /** @var Request $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
- $request->attributes = m::mock()
+
+ /** @var ParameterBag $attributes */
+ $attributes = m::mock()
->shouldReceive('set')->with('command', $this->spy($spiedCommand))
->getMock();
+
+ $request->attributes = $attributes;
+
$configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
index cc0430ea4..214817674 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
@@ -33,7 +33,7 @@ abstract class AbstractCommand implements Command
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$~i')]
- public $UUID;
+ public string $UUID;
public function __toString(): string
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
index ba3320c69..c1e39f8df 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
@@ -28,11 +28,11 @@ final class Metadata
*/
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$~i')]
- public $actorId;
+ public ?string $actorId;
/**
* @var string|null
*/
#[Assert\Type(type: 'string')]
- public $actorInstitution;
+ public ?string $actorInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/RaExecutable.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/RaExecutable.php
index 8e63188f0..34a500ccd 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/RaExecutable.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/RaExecutable.php
@@ -26,8 +26,6 @@ interface RaExecutable
{
/**
* Returns the actor institution. This is done to be able to validate if we may execute certain commands for authorization purposes
- *
- * @return string|null
*/
- public function getRaInstitution();
+ public function getRaInstitution(): ?string;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/SelfServiceExecutable.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/SelfServiceExecutable.php
index df9794c56..8f13bde0e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/SelfServiceExecutable.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/SelfServiceExecutable.php
@@ -29,5 +29,5 @@ interface SelfServiceExecutable
*
* @return string
*/
- public function getIdentityId();
+ public function getIdentityId(): string;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/AddRaLocationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/AddRaLocationCommand.php
index b63b34ed3..d978a2ee6 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/AddRaLocationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/AddRaLocationCommand.php
@@ -30,7 +30,7 @@ class AddRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raLocationId;
+ public string $raLocationId;
/**
*
@@ -38,7 +38,7 @@ class AddRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
/**
*
@@ -46,7 +46,7 @@ class AddRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raLocationName;
+ public string $raLocationName;
/**
*
@@ -54,18 +54,15 @@ class AddRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $location;
+ public string $location;
/**
* @var string
*/
#[Assert\Type(type: 'string')]
- public $contactInformation;
+ public string $contactInformation;
- /**
- * @inheritDoc
- */
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ChangeRaLocationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ChangeRaLocationCommand.php
index 79d5b8808..2d0d7f94c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ChangeRaLocationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ChangeRaLocationCommand.php
@@ -29,39 +29,39 @@ class ChangeRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raLocationId;
+ public string $raLocationId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raLocationName;
+ public string $raLocationName;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $location;
+ public string $location;
/**
* @var string
*/
#[Assert\Type(type: 'string')]
- public $contactInformation;
+ public string $contactInformation;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/CreateInstitutionConfigurationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/CreateInstitutionConfigurationCommand.php
index 3792b0469..2cf477bed 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/CreateInstitutionConfigurationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/CreateInstitutionConfigurationCommand.php
@@ -29,5 +29,5 @@ class CreateInstitutionConfigurationCommand extends AbstractCommand implements M
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
index 46b4f7f2e..da41ba590 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
@@ -29,32 +29,32 @@ final class ReconfigureInstitutionConfigurationOptionsCommand extends AbstractCo
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
/**
* @var bool
*/
#[Assert\Type(type: 'boolean')]
- public $useRaLocationsOption;
+ public bool $useRaLocationsOption;
/**
* @var bool
*/
#[Assert\Type(type: 'boolean')]
- public $showRaaContactInformationOption;
+ public bool $showRaaContactInformationOption;
/**
* @var bool
*/
#[Assert\Type(type: 'boolean')]
- public $verifyEmailOption;
+ public bool $verifyEmailOption;
/**
* @var int
*/
#[Assert\Type(type: 'integer')]
- public $numberOfTokensPerIdentityOption;
+ public int $numberOfTokensPerIdentityOption;
#[Assert\NotNull]
public $allowedSecondFactors;
@@ -62,30 +62,30 @@ final class ReconfigureInstitutionConfigurationOptionsCommand extends AbstractCo
/**
* @var array|null
*/
- public $useRaOption;
+ public ?array $useRaOption;
/**
* @var array|null
*/
- public $useRaaOption;
+ public ?array $useRaaOption;
/**
* @var array|null
*/
- public $selectRaaOption;
+ public ?array $selectRaaOption;
/**
* @var bool|null
*/
- public $selfVetOption;
+ public ?bool $selfVetOption;
/**
* @var bool|null
*/
- public $selfAssertedTokensOption;
+ public ?bool $selfAssertedTokensOption;
/**
* @var bool|null
*/
- public $ssoOn2faOption;
+ public ?bool $ssoOn2faOption;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveInstitutionConfigurationByUnnormalizedIdCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveInstitutionConfigurationByUnnormalizedIdCommand.php
index c20e7702c..e0c2c42a1 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveInstitutionConfigurationByUnnormalizedIdCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveInstitutionConfigurationByUnnormalizedIdCommand.php
@@ -28,5 +28,5 @@ final class RemoveInstitutionConfigurationByUnnormalizedIdCommand extends Abstra
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveRaLocationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveRaLocationCommand.php
index df380b3e8..329ffef13 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveRaLocationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/RemoveRaLocationCommand.php
@@ -29,19 +29,19 @@ class RemoveRaLocationCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raLocationId;
+ public string $raLocationId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
index 2ca7a5add..bfff29f15 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
@@ -29,5 +29,5 @@ class UpdateConfigurationCommand extends AbstractCommand implements ManagementEx
*
* @ManagementAssert\HasValidConfigurationStructure
*/
- public $configuration;
+ public string $configuration;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
index 49004bdbc..57a64f9d6 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
@@ -19,7 +19,6 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\CommandHandler;
use Broadway\CommandHandling\SimpleCommandHandler;
-use Broadway\Domain\AggregateRoot;
use Broadway\Repository\AggregateNotFoundException;
use Surfnet\Stepup\Configuration\Configuration;
use Surfnet\Stepup\Configuration\EventSourcing\ConfigurationRepository;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Dto/EmailTemplate.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Dto/EmailTemplate.php
index fe6ac0649..4ba5f02ba 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Dto/EmailTemplate.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Dto/EmailTemplate.php
@@ -23,15 +23,15 @@ final class EmailTemplate
/**
* @var string
*/
- public $name;
+ public string $name;
/**
* @var string
*/
- public $locale;
+ public string $locale;
/**
* @var string
*/
- public $htmlContent;
+ public string $htmlContent;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Service/EmailTemplateService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Service/EmailTemplateService.php
index 1f18ade13..08dab4a5c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Service/EmailTemplateService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Service/EmailTemplateService.php
@@ -24,11 +24,7 @@
interface EmailTemplateService
{
/**
- * @param string $name
- * @param string $preferredLocale
- * @param string $fallbackLocale
- * @return EmailTemplate
* @throws RuntimeException
*/
- public function findByName($name, $preferredLocale, $fallbackLocale);
+ public function findByName(string $name, string $preferredLocale, string $fallbackLocale): ?EmailTemplate;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
index dcc458642..e3acc33d9 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
@@ -25,7 +25,7 @@ class VettingLocation
* @param string $location
* @param string $contactInformation
*/
- public function __construct(public $name, public $location, public $contactInformation)
+ public function __construct(public string $name, public string $location, public string $contactInformation)
{
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index 490b21aa6..3ebbe965f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -37,7 +37,7 @@ class BufferedEventBus implements EventBusInterface
/**
* @var DomainMessage[]
*/
- private $buffer = [];
+ private array $buffer = [];
/**
* Flag to ensure only one loop is publishing domain messages from the buffer.
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnricher.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnricher.php
index 1ae4cf7ea..555c9b882 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnricher.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnricher.php
@@ -26,5 +26,5 @@ interface MetadataEnricher
* @param Metadata|null $metadata
* @return void
*/
- public function setMetadata(Metadata $metadata = null);
+ public function setMetadata(Metadata $metadata = null): void;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
index e417659e5..c85f0eb47 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
@@ -25,12 +25,12 @@ class SecondFactorNotAllowedException extends RuntimeException implements Proces
/**
* @var string[]
*/
- private $errors;
+ private array $errors;
/**
* @return string[]
*/
- public function getErrors()
+ public function getErrors(): array
{
return $this->errors;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AccreditIdentityCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AccreditIdentityCommand.php
index d94aa656f..021d9646c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AccreditIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AccreditIdentityCommand.php
@@ -24,58 +24,31 @@
class AccreditIdentityCommand extends AbstractCommand implements RaExecutable
{
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $role;
+ public string $role;
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $location;
+ public string $location;
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $contactInformation;
+ public string $contactInformation;
- /**
- *
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raInstitution;
+ public string $raInstitution;
- /**
- * @inheritDoc
- */
- public function getRaInstitution()
+ public function getRaInstitution(): ?string
{
return $this->raInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AmendRegistrationAuthorityInformationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AmendRegistrationAuthorityInformationCommand.php
index 4d0c05eae..1bd0f6bab 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AmendRegistrationAuthorityInformationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AmendRegistrationAuthorityInformationCommand.php
@@ -30,7 +30,7 @@ class AmendRegistrationAuthorityInformationCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
*
@@ -38,7 +38,7 @@ class AmendRegistrationAuthorityInformationCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $location;
+ public string $location;
/**
*
@@ -46,7 +46,7 @@ class AmendRegistrationAuthorityInformationCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $contactInformation;
+ public string $contactInformation;
/**
*
@@ -54,12 +54,12 @@ class AmendRegistrationAuthorityInformationCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raInstitution;
+ public string $raInstitution;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->raInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
index ad2b99fc2..207f74347 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AppointRoleCommand.php
@@ -29,23 +29,23 @@ class AppointRoleCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $role;
+ public string $role;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raInstitution;
+ public string $raInstitution;
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->raInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index fa6053620..c7c559312 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -29,7 +29,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $identityId;
+ public string $identityId;
/**
*
@@ -37,7 +37,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $nameId;
+ public string $nameId;
/**
*
@@ -45,7 +45,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $institution;
+ public string $institution;
/**
*
@@ -53,7 +53,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $commonName;
+ public string $commonName;
/**
*
@@ -61,7 +61,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Email]
- public $email;
+ public string $email;
/**
*
@@ -69,7 +69,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $preferredLocale;
+ public string $preferredLocale;
/**
*
@@ -77,7 +77,7 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
*
@@ -85,5 +85,5 @@ final class BootstrapIdentityWithYubikeySecondFactorCommand extends AbstractComm
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $yubikeyPublicId;
+ public string $yubikeyPublicId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/CreateIdentityCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/CreateIdentityCommand.php
index fdcaac9fe..cba8a3242 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/CreateIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/CreateIdentityCommand.php
@@ -29,48 +29,48 @@ class CreateIdentityCommand extends AbstractCommand implements SelfServiceExecut
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $id;
+ public string $id;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $nameId;
+ public string $nameId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $email;
+ public string $email;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $commonName;
+ public string $commonName;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $preferredLocale;
+ public string $preferredLocale;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->id;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ExpressLocalePreferenceCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ExpressLocalePreferenceCommand.php
index e058c3716..59f83188b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ExpressLocalePreferenceCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ExpressLocalePreferenceCommand.php
@@ -31,7 +31,7 @@ class ExpressLocalePreferenceCommand extends AbstractCommand implements SelfServ
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
*
@@ -39,12 +39,9 @@ class ExpressLocalePreferenceCommand extends AbstractCommand implements SelfServ
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $preferredLocale;
+ public string $preferredLocale;
- /**
- * @inheritDoc
- */
- public function getRaInstitution()
+ public function getRaInstitution(): null
{
return null;
}
@@ -52,7 +49,7 @@ public function getRaInstitution()
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ForgetIdentityCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ForgetIdentityCommand.php
index bc505e641..8e77903e1 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ForgetIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ForgetIdentityCommand.php
@@ -31,7 +31,7 @@ final class ForgetIdentityCommand extends AbstractCommand implements ManagementE
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $nameId;
+ public string $nameId;
/**
*
@@ -39,5 +39,5 @@ final class ForgetIdentityCommand extends AbstractCommand implements ManagementE
*/
#[Assert\NotBlank]
#[Assert\Type('string')]
- public $institution;
+ public string $institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/MigrateVettedSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/MigrateVettedSecondFactorCommand.php
index 90666331f..e9981d3f4 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/MigrateVettedSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/MigrateVettedSecondFactorCommand.php
@@ -30,7 +30,7 @@ class MigrateVettedSecondFactorCommand extends AbstractCommand
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $sourceIdentityId;
+ public string $sourceIdentityId;
/**
* The UUID of the target identity
@@ -38,7 +38,7 @@ class MigrateVettedSecondFactorCommand extends AbstractCommand
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $targetIdentityId;
+ public string $targetIdentityId;
/**
* The source second factor UUID that is to be moved
@@ -46,7 +46,7 @@ class MigrateVettedSecondFactorCommand extends AbstractCommand
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $sourceSecondFactorId;
+ public string $sourceSecondFactorId;
/**
@@ -55,5 +55,5 @@ class MigrateVettedSecondFactorCommand extends AbstractCommand
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $targetSecondFactorId;
+ public string $targetSecondFactorId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/PromiseSafeStoreSecretTokenPossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/PromiseSafeStoreSecretTokenPossessionCommand.php
index d8277470d..229e8ec99 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/PromiseSafeStoreSecretTokenPossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/PromiseSafeStoreSecretTokenPossessionCommand.php
@@ -31,7 +31,7 @@ class PromiseSafeStoreSecretTokenPossessionCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the recovery code to create.
@@ -39,14 +39,14 @@ class PromiseSafeStoreSecretTokenPossessionCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenId;
+ public string $recoveryTokenId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenType = RecoveryTokenType::TYPE_SAFE_STORE;
+ public string $recoveryTokenType = RecoveryTokenType::TYPE_SAFE_STORE;
/**
* The unhashed password
@@ -54,12 +54,9 @@ class PromiseSafeStoreSecretTokenPossessionCommand extends AbstractCommand imple
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secret;
+ public string $secret;
- /**
- * @return string
- */
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveGssfPossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveGssfPossessionCommand.php
index 1eb5d1587..dff30633f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveGssfPossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveGssfPossessionCommand.php
@@ -30,7 +30,7 @@ class ProveGssfPossessionCommand extends AbstractCommand implements SelfServiceE
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the second factor to create.
@@ -38,7 +38,7 @@ class ProveGssfPossessionCommand extends AbstractCommand implements SelfServiceE
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* The SecondFactorType identifier.
@@ -48,7 +48,7 @@ class ProveGssfPossessionCommand extends AbstractCommand implements SelfServiceE
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $stepupProvider;
+ public string $stepupProvider;
/**
* The identifier of the generic Stepup second factor type
@@ -56,12 +56,12 @@ class ProveGssfPossessionCommand extends AbstractCommand implements SelfServiceE
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $gssfId;
+ public string $gssfId;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhonePossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhonePossessionCommand.php
index d1d6f0d43..5149acbc3 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhonePossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhonePossessionCommand.php
@@ -30,7 +30,7 @@ class ProvePhonePossessionCommand extends AbstractCommand implements SelfService
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the second factor to create.
@@ -38,7 +38,7 @@ class ProvePhonePossessionCommand extends AbstractCommand implements SelfService
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* The phone number
@@ -47,12 +47,12 @@ class ProvePhonePossessionCommand extends AbstractCommand implements SelfService
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^\+[\d\s]+ \(0\) \d+$~')]
- public $phoneNumber;
+ public string $phoneNumber;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhoneRecoveryTokenPossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhoneRecoveryTokenPossessionCommand.php
index 7958d8fe4..bd2ac3ab9 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhoneRecoveryTokenPossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProvePhoneRecoveryTokenPossessionCommand.php
@@ -27,40 +27,31 @@ class ProvePhoneRecoveryTokenPossessionCommand extends AbstractCommand implement
{
/**
* The ID of an existing identity.
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the recovery code to create.
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenId;
+ public string $recoveryTokenId;
- /**
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenType = RecoveryTokenType::TYPE_SMS;
+ public string $recoveryTokenType = RecoveryTokenType::TYPE_SMS;
/**
* The phone number
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^\+[\d\s]+ \(0\) \d+$~')]
- public $phoneNumber;
+ public string $phoneNumber;
- /**
- * @return string
- */
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveU2fDevicePossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveU2fDevicePossessionCommand.php
index c0a6c4a9a..71d76afce 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveU2fDevicePossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveU2fDevicePossessionCommand.php
@@ -30,7 +30,7 @@ class ProveU2fDevicePossessionCommand extends AbstractCommand implements SelfSer
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the second factor to create.
@@ -38,7 +38,7 @@ class ProveU2fDevicePossessionCommand extends AbstractCommand implements SelfSer
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* The key handle issued by the U2F device
@@ -46,12 +46,12 @@ class ProveU2fDevicePossessionCommand extends AbstractCommand implements SelfSer
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $keyHandle;
+ public string $keyHandle;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveYubikeyPossessionCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveYubikeyPossessionCommand.php
index 13cb38f17..6971cf6a8 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveYubikeyPossessionCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ProveYubikeyPossessionCommand.php
@@ -30,7 +30,7 @@ class ProveYubikeyPossessionCommand extends AbstractCommand implements SelfServi
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of the second factor to create.
@@ -38,7 +38,7 @@ class ProveYubikeyPossessionCommand extends AbstractCommand implements SelfServi
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* The Yubikey's public ID.
@@ -46,12 +46,12 @@ class ProveYubikeyPossessionCommand extends AbstractCommand implements SelfServi
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $yubikeyPublicId;
+ public string $yubikeyPublicId;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RegisterSelfAssertedSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RegisterSelfAssertedSecondFactorCommand.php
index 9a1a339fd..397ed94f3 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RegisterSelfAssertedSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RegisterSelfAssertedSecondFactorCommand.php
@@ -31,38 +31,38 @@ class RegisterSelfAssertedSecondFactorCommand extends AbstractCommand implements
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorType;
+ public string $secondFactorType;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $authoringRecoveryTokenId;
+ public string $authoringRecoveryTokenId;
- public function getIdentityId(): void
+ public function getIdentityId(): string
{
- $this->identityId;
+ return $this->identityId;
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RetractRegistrationAuthorityCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RetractRegistrationAuthorityCommand.php
index 1e9d9b24e..b83910e88 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RetractRegistrationAuthorityCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RetractRegistrationAuthorityCommand.php
@@ -29,19 +29,19 @@ class RetractRegistrationAuthorityCommand extends AbstractCommand implements RaE
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $raInstitution;
+ public string $raInstitution;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): string
{
return $this->raInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnRecoveryTokenCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnRecoveryTokenCommand.php
index ccef83ca1..c5762ce99 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnRecoveryTokenCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnRecoveryTokenCommand.php
@@ -33,7 +33,7 @@ class RevokeOwnRecoveryTokenCommand extends AbstractCommand implements SelfServi
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of a recovery token.
@@ -41,12 +41,12 @@ class RevokeOwnRecoveryTokenCommand extends AbstractCommand implements SelfServi
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenId;
+ public string $recoveryTokenId;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnSecondFactorCommand.php
index 8b3fcb471..ebdb0d8ab 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeOwnSecondFactorCommand.php
@@ -33,7 +33,7 @@ class RevokeOwnSecondFactorCommand extends AbstractCommand implements SelfServic
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of a verified or vetted second factor.
@@ -41,12 +41,12 @@ class RevokeOwnSecondFactorCommand extends AbstractCommand implements SelfServic
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsRecoveryTokenCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsRecoveryTokenCommand.php
index 342451014..38c6fb96a 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsRecoveryTokenCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsRecoveryTokenCommand.php
@@ -29,32 +29,29 @@ class RevokeRegistrantsRecoveryTokenCommand extends AbstractCommand implements R
{
/**
* The ID of the identity that has the authority to issue the revocation of a registrant's second factor.
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $authorityId;
+ public string $authorityId;
/**
* The ID of an identity.
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of a recovery token
- * @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $recoveryTokenId;
+ public string $recoveryTokenId;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): ?string
{
// Returning null as opposed to having the institution on this command was done
// because the RA (actor) institution can be loaded from the authorityId
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsSecondFactorCommand.php
index 382e59a02..ef02b8c5e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RevokeRegistrantsSecondFactorCommand.php
@@ -33,7 +33,7 @@ class RevokeRegistrantsSecondFactorCommand extends AbstractCommand implements Ra
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $authorityId;
+ public string $authorityId;
/**
* The ID of an identity.
@@ -41,7 +41,7 @@ class RevokeRegistrantsSecondFactorCommand extends AbstractCommand implements Ra
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of a verified or vetted second factor.
@@ -49,12 +49,12 @@ class RevokeRegistrantsSecondFactorCommand extends AbstractCommand implements Ra
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): ?string
{
// Returning null as opposed to having the institution on this command was done
// because the RA (actor) institution can be loaded from the authorityId
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
index 8ead1d738..8067f44d2 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
@@ -38,14 +38,14 @@ class SaveVettingTypeHintCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $institution;
+ public string $institution;
#[Assert\Type(type: 'array')]
#[Assert\All([
@@ -53,7 +53,7 @@ class SaveVettingTypeHintCommand extends AbstractCommand implements RaExecutable
])]
public array $hints;
- public function getRaInstitution()
+ public function getRaInstitution(): ?string
{
return null;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SelfVetSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SelfVetSecondFactorCommand.php
index 8b14c5ad3..7fc0b4310 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SelfVetSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SelfVetSecondFactorCommand.php
@@ -25,49 +25,30 @@
class SelfVetSecondFactorCommand extends AbstractCommand implements SelfServiceExecutable, SelfAsserted
{
- /**
- * The ID of an existing identity.
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
- /**
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
- /**
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorType;
+ public string $secondFactorType;
- /**
- * @var string
- */
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $registrationCode;
+ public string $registrationCode;
- /**
- * @var string
- */
#[Assert\Type(type: 'string')]
- public $authoringSecondFactorLoa;
+ public string $authoringSecondFactorLoa;
- /**
- * @var string
- */
#[Assert\Type(type: 'string')]
- public $authoringSecondFactorIdentifier;
+ public ?string $authoringSecondFactorIdentifier = null;
- public function getIdentityId(): void
+ public function getIdentityId(): string
{
- $this->identityId;
+ return $this->identityId;
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendSecondFactorRegistrationEmailCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendSecondFactorRegistrationEmailCommand.php
index 034817946..e1f0ace67 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendSecondFactorRegistrationEmailCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendSecondFactorRegistrationEmailCommand.php
@@ -30,7 +30,7 @@ class SendSecondFactorRegistrationEmailCommand extends AbstractCommand implement
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* The ID of a second factor token
@@ -38,9 +38,9 @@ class SendSecondFactorRegistrationEmailCommand extends AbstractCommand implement
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendVerifiedSecondFactorRemindersCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendVerifiedSecondFactorRemindersCommand.php
index e065c67ce..36c59a5db 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendVerifiedSecondFactorRemindersCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SendVerifiedSecondFactorRemindersCommand.php
@@ -26,10 +26,10 @@ class SendVerifiedSecondFactorRemindersCommand extends AbstractCommand
/**
* @var bool
*/
- public $dryRun;
+ public bool $dryRun;
/**
* @var DateTime
*/
- public $requestedAt;
+ public DateTime $requestedAt;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/UpdateIdentityCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/UpdateIdentityCommand.php
index 3fc8c45ee..addd8293c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/UpdateIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/UpdateIdentityCommand.php
@@ -29,26 +29,26 @@ class UpdateIdentityCommand extends AbstractCommand implements SelfServiceExecut
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $id;
+ public string $id;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $email;
+ public string $email;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $commonName;
+ public string $commonName;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->id;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VerifyEmailCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VerifyEmailCommand.php
index 22018b202..4fd703fc1 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VerifyEmailCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VerifyEmailCommand.php
@@ -30,19 +30,19 @@ class VerifyEmailCommand extends AbstractCommand implements SelfServiceExecutabl
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $verificationNonce;
+ public string $verificationNonce;
/**
* @return string
*/
- public function getIdentityId()
+ public function getIdentityId(): string
{
return $this->identityId;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VetSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VetSecondFactorCommand.php
index 83acae82c..a96992d43 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VetSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/VetSecondFactorCommand.php
@@ -29,7 +29,7 @@ class VetSecondFactorCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $authorityId;
+ public string $authorityId;
/**
* The ID of an existing identity.
@@ -37,14 +37,14 @@ class VetSecondFactorCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $identityId;
+ public string $identityId;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorId;
+ public string $secondFactorId;
/**
*
@@ -52,45 +52,45 @@ class VetSecondFactorCommand extends AbstractCommand implements RaExecutable
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $registrationCode;
+ public string $registrationCode;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorType;
+ public string $secondFactorType;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $secondFactorIdentifier;
+ public string $secondFactorIdentifier;
/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
- public $documentNumber;
+ public string $documentNumber;
/**
* @var boolean
*/
#[Assert\EqualTo(value: true)]
- public $identityVerified;
+ public bool $identityVerified;
/**
* @var boolean
*/
#[Assert\Type(type: 'bool')]
- public $provePossessionSkipped;
+ public bool $provePossessionSkipped;
/**
* @inheritDoc
*/
- public function getRaInstitution()
+ public function getRaInstitution(): ?string
{
// Returning null as opposed to having the institution on this command was done
// because the RA (actor) institution can be loaded from the authorityId
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
index 972dbb66b..3bc442271 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
@@ -529,7 +529,7 @@ public function assertSelfAssertedTokensEnabled(Institution $institution): void
/**
* @return bool
*/
- private function emailVerificationIsRequired(IdentityApi $identity)
+ private function emailVerificationIsRequired(IdentityApi $identity): bool
{
$institution = new ConfigurationInstitution(
(string)$identity->getInstitution(),
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
index 0fbb1575c..6b13d8e67 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
@@ -130,7 +130,7 @@ public function handleSaveVettingTypeHintCommand(SaveVettingTypeHintCommand $com
* @param string $commandId
* @return RegistrationAuthorityRole
*/
- private function assertValidRoleAndConvertIfValid($role, $commandId): RegistrationAuthorityRole
+ private function assertValidRoleAndConvertIfValid(string $role, string $commandId): RegistrationAuthorityRole
{
if ($role === 'ra') {
return new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA);
@@ -148,11 +148,9 @@ private function assertValidRoleAndConvertIfValid($role, $commandId): Registrati
}
/**
- * @return InstitutionConfiguration
* @deprecated Should be used until existing institution configurations have been migrated to using normalized ids
- *
*/
- private function loadInstitutionConfigurationFor(Institution $institution)
+ private function loadInstitutionConfigurationFor(Institution $institution): InstitutionConfiguration
{
$institution = new ConfigurationInstitution($institution->getInstitution());
try {
@@ -166,7 +164,7 @@ private function loadInstitutionConfigurationFor(Institution $institution)
$institutionConfigurationId->getInstitutionConfigurationId(),
);
}
-
+ assert($institutionConfiguration instanceof InstitutionConfiguration);
return $institutionConfiguration;
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
index f69e572e3..9ebe2d578 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
@@ -19,7 +19,6 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\CommandHandler;
use Broadway\CommandHandling\SimpleCommandHandler;
-use Broadway\Domain\AggregateRoot;
use Broadway\Repository\AggregateNotFoundException;
use Broadway\Repository\Repository as RepositoryInterface;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection;
@@ -66,13 +65,12 @@ public function handleRemoveFromWhitelistCommand(RemoveFromWhitelistCommand $com
$this->repository->save($whitelist);
}
- /**
- * @return Whitelist
- */
- private function getWhitelist(): AggregateRoot|Whitelist
+ private function getWhitelist(): Whitelist
{
try {
- return $this->repository->load(Whitelist::WHITELIST_AGGREGATE_ID);
+ $whitelist = $this->repository->load(Whitelist::WHITELIST_AGGREGATE_ID);
+ assert($whitelist instanceof Whitelist);
+ return $whitelist;
} catch (AggregateNotFoundException) {
return Whitelist::create(new InstitutionCollection());
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
index bc30b0dc3..b0eec1904 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
@@ -41,7 +41,7 @@ class RecoveryTokenMailService
/**
* @var TranslatorInterface
*/
- private $translator;
+ private TranslatorInterface $translator;
private readonly string $fallbackLocale;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
index 652f28608..37fadf041 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
@@ -42,12 +42,12 @@
*/
class RegistrationMailService
{
- public $institutionConfigurationOptionsService;
+ public InstitutionConfigurationOptionsService $institutionConfigurationOptionsService;
/**
* @var TranslatorInterface
*/
- private $translator;
+ private TranslatorInterface $translator;
private readonly string $fallbackLocale;
@@ -232,7 +232,7 @@ private function sendRegistrationEmailWithRaLocations(
$this->mailer->send($message);
}
- private function getExpirationDateOfRegistration(DateTime $date)
+ private function getExpirationDateOfRegistration(DateTime $date): DateTime
{
return $date->add(
new DateInterval('P14D'),
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
index 8580b5f38..0e556393b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
@@ -42,7 +42,7 @@ final class SecondFactorRevocationMailService
/**
* @var TranslatorInterface
*/
- private $translator;
+ private TranslatorInterface $translator;
private readonly string $fallbackLocale;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
index 03f80c205..815f5f8e0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
@@ -35,7 +35,7 @@ final class SecondFactorVettedMailService
/**
* @var TranslatorInterface
*/
- private $translator;
+ private TranslatorInterface $translator;
private readonly string $fallbackLocale;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
index b6defca0b..f2497e046 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
@@ -19,7 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
use Psr\Log\LoggerInterface;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\DeprovisionExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\ManagementExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\RaExecutable;
@@ -35,7 +35,7 @@ public function __construct(
) {
}
- public function process(Command $command): Command
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(sprintf('Processing authorization for command "%s"', $command));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/DispatchStage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/DispatchStage.php
index 4fef41161..862326fc5 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/DispatchStage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/DispatchStage.php
@@ -20,7 +20,7 @@
use Broadway\CommandHandling\CommandBus;
use Psr\Log\LoggerInterface;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
class DispatchStage implements Stage
{
@@ -30,7 +30,7 @@ public function __construct(
) {
}
- public function process(Command $command): Command
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(sprintf('Dispatching command "%s" for handling', $command));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/EventDispatchingStage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/EventDispatchingStage.php
index c694681e2..b770c6fcf 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/EventDispatchingStage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/EventDispatchingStage.php
@@ -19,7 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
use Psr\Log\LoggerInterface;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
class EventDispatchingStage implements Stage
@@ -30,7 +30,7 @@ public function __construct(
) {
}
- public function process(Command $command): Command
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(sprintf('Dispatching Events for "%s"', $command));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
index c523bce62..b05321c92 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
@@ -45,7 +45,7 @@ public function __construct(array $errors, $code = 0, Exception $previous = null
/**
* @return string[]
*/
- public function getErrors()
+ public function getErrors(): array
{
return $this->errors;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/ProcessingAbortedException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/ProcessingAbortedException.php
index 65f2170fc..e77666126 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/ProcessingAbortedException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/ProcessingAbortedException.php
@@ -23,5 +23,5 @@ interface ProcessingAbortedException
/**
* @return string[]
*/
- public function getErrors();
+ public function getErrors(): array;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Stage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Stage.php
index c96c25dbe..2a55cc749 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Stage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Stage.php
@@ -18,7 +18,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
/**
* A stage is used in context of a pipeline and represents a stage in the processing of a command. Stages may block
@@ -26,8 +26,5 @@
*/
interface Stage
{
- /**
- * @return Command
- */
- public function process(Command $command);
+ public function process(AbstractCommand $command): AbstractCommand;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
index d993c48ec..7930557f6 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/StagedPipeline.php
@@ -20,7 +20,6 @@
use Psr\Log\LoggerInterface;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
class StagedPipeline implements Pipeline
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/ValidationStage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/ValidationStage.php
index 89267cdac..ea17d1f4f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/ValidationStage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/ValidationStage.php
@@ -19,7 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline;
use Psr\Log\LoggerInterface;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Exception\InvalidCommandException;
use Symfony\Component\Validator\Validator\ValidatorInterface;
@@ -31,7 +31,7 @@ public function __construct(
) {
}
- public function process(Command $command): Command
+ public function process(AbstractCommand $command): AbstractCommand
{
$this->logger->debug(sprintf('Processing validation for "%s"', $command));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
index e71080f57..8d0b5e31c 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
@@ -49,7 +49,7 @@ public function forget(): void
/**
* @return IdentityId
*/
- public function getIdentityId()
+ public function getIdentityId(): IdentityId
{
return $this->identityId;
}
@@ -57,7 +57,7 @@ public function getIdentityId()
/**
* @return int
*/
- public function getPlayhead()
+ public function getPlayhead(): int
{
return $this->playhead;
}
@@ -65,7 +65,7 @@ public function getPlayhead()
/**
* @return SensitiveData
*/
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return $this->sensitiveData;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Forgettable.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Forgettable.php
index ac6e0e269..b0dd0c460 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Forgettable.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Forgettable.php
@@ -23,10 +23,10 @@ interface Forgettable
/**
* @return SensitiveData
*/
- public function getSensitiveData();
+ public function getSensitiveData(): SensitiveData;
/**
* @return void
*/
- public function setSensitiveData(SensitiveData $sensitiveData);
+ public function setSensitiveData(SensitiveData $sensitiveData): void;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
index 638e04bcb..95bf88113 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
@@ -39,10 +39,7 @@ class SensitiveData implements SerializableInterface
private ?SecondFactorIdentifier $secondFactorIdentifier = null;
- /**
- * @var SecondFactorType|null
- */
- private $secondFactorType;
+ private ?SecondFactorType $secondFactorType = null;
private ?VettingType $vettingType = null;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Command/FixedUuidStubCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Command/FixedUuidStubCommand.php
index ef9bacda9..ba6da8a52 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Command/FixedUuidStubCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Command/FixedUuidStubCommand.php
@@ -26,5 +26,5 @@ class FixedUuidStubCommand extends AbstractCommand implements Command
/**
* @var string generated using \Ramsey\Uuid\Uuid::uuid4()
*/
- public $UUID = '1e8a8dc6-852e-4df8-ba23-8c18061b7c38';
+ public string $UUID = '1e8a8dc6-852e-4df8-ba23-8c18061b7c38';
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
index 26a8d629a..56aa5d90b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
@@ -19,7 +19,6 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Configuration\CommandHandler;
use Broadway\CommandHandling\CommandHandler;
-use Broadway\CommandHandling\CommandHandlerInterface;
use Broadway\EventHandling\EventBus as EventBusInterface;
use Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory;
use Broadway\EventStore\EventStore as EventStoreInterface;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
index 2618eabc7..01e34a921 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
@@ -20,6 +20,7 @@
use Mockery;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as TestCase;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection;
use Surfnet\Stepup\Identity\Event\IdentityCreatedEvent;
@@ -42,7 +43,7 @@ class InstitutionConfigurationProcessorTest extends TestCase
{
use MockeryPHPUnitIntegration;
- private $pipelineMock;
+ private Pipeline&MockInterface $pipelineMock;
public function setUp(): void
{
@@ -383,7 +384,7 @@ public function no_create_institution_configuration_command_is_created_for_an_al
/**
* @return ContainerInterface
*/
- private function getContainerMock()
+ private function getContainerMock(): ContainerInterface
{
$containerMock = Mockery::mock(ContainerInterface::class);
$containerMock
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
index 9ad95924e..fc4d28f14 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
@@ -26,6 +26,7 @@
use Doctrine\ORM\EntityManagerInterface;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
@@ -131,7 +132,7 @@ private function createDummyDomainMessage(?string $payload): DomainMessage
return new DomainMessage('1', 0, new Metadata(), $payload, DateTime::fromString('1970-01-01H00:00:00.000'));
}
- private function getDummyEntityManager()
+ private function getDummyEntityManager(): EntityManagerInterface&MockInterface
{
return m::mock(EntityManagerInterface::class)->shouldIgnoreMissing(true);
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/RecordEventsAndPublishToBusOnFirstCallEventListener.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/RecordEventsAndPublishToBusOnFirstCallEventListener.php
index bb674c23d..5d3740246 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/RecordEventsAndPublishToBusOnFirstCallEventListener.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/RecordEventsAndPublishToBusOnFirstCallEventListener.php
@@ -56,7 +56,7 @@ public function handle(DomainMessage $domainMessage): void
/**
* @return DomainMessage[]
*/
- public function getRecordedEvents()
+ public function getRecordedEvents(): array
{
return $this->recordedEvents;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
index 3a2e44c48..b379e7eba 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
@@ -23,6 +23,7 @@
use Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Mockery as m;
+use Mockery\MockInterface;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList;
use Surfnet\Stepup\DateTime\DateTime;
@@ -71,25 +72,13 @@ class IdentityCommandHandlerMoveTokenTest extends CommandHandlerTest
{
private static int $window = 3600;
- /**
- * @var AllowedSecondFactorListService|m\MockInterface
- */
- private $allowedSecondFactorListServiceMock;
+ private AllowedSecondFactorListService&MockInterface $allowedSecondFactorListServiceMock;
- /**
- * @var LoaResolutionService
- */
- private $loaResolutionService;
+ private LoaResolutionService&MockInterface $loaResolutionService;
- /**
- * @var m\Mock|InstitutionConfigurationOptionsService
- */
- private $configService;
+ private InstitutionConfigurationOptionsService&MockInterface $configService;
- /**
- * @var IdentityProjectionRepository|m\MockInterface
- */
- private $identityProjectionRepository;
+ private IdentityProjectionRepository&MockInterface $identityProjectionRepository;
public function setUp(): void
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
index 6ad9b6680..b218ad001 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
@@ -93,35 +93,17 @@ class IdentityCommandHandlerSelfAssertedTokensTest extends CommandHandlerTest
{
private static int $window = 3600;
- /**
- * @var AllowedSecondFactorListService|MockInterface
- */
- private $allowedSecondFactorListServiceMock;
+ private AllowedSecondFactorListService&MockInterface $allowedSecondFactorListServiceMock;
- /**
- * @var MockInterface|IdentityProjectionRepository
- */
- private $identityProjectionRepository;
+ private IdentityProjectionRepository&MockInterface $identityProjectionRepository;
- /**
- * @var SecondFactorTypeService|MockInterface
- */
- private $secondFactorTypeService;
+ private SecondFactorTypeService&MockInterface $secondFactorTypeService;
- /**
- * @var SecondFactorProvePossessionHelper|MockInterface
- */
- private $secondFactorProvePossessionHelper;
+ private SecondFactorProvePossessionHelper&MockInterface $secondFactorProvePossessionHelper;
- /**
- * @var InstitutionConfigurationOptionsService|MockInterface
- */
- private $configService;
+ private InstitutionConfigurationOptionsService&MockInterface $configService;
- /**
- * @var LoaResolutionService|MockInterface
- */
- private $loaResolutionService;
+ private LoaResolutionService&MockInterface $loaResolutionService;
/**
* @var IdentityId
@@ -150,7 +132,7 @@ class IdentityCommandHandlerSelfAssertedTokensTest extends CommandHandlerTest
/**
* @var RecoveryTokenSecretHelper|MockInterface
*/
- private $recoveryTokenSecretHelper;
+ private RecoveryTokenSecretHelper|MockInterface $recoveryTokenSecretHelper;
private ?NameId $nameId = null;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
index f98b8717b..5f0fb6de4 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
@@ -25,7 +25,6 @@
use DateTime as CoreDateTime;
use Hamcrest\Matchers;
use Mockery as m;
-use Mockery\Mock;
use Mockery\MockInterface;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList;
@@ -100,40 +99,19 @@ class IdentityCommandHandlerTest extends CommandHandlerTest
{
private static int $window = 3600;
- /**
- * @var AllowedSecondFactorListService|MockInterface
- */
- private $allowedSecondFactorListServiceMock;
+ private AllowedSecondFactorListService&MockInterface $allowedSecondFactorListServiceMock;
- /**
- * @var MockInterface|IdentityProjectionRepository
- */
- private $identityProjectionRepository;
+ private IdentityProjectionRepository&MockInterface $identityProjectionRepository;
- /**
- * @var SecondFactorTypeService|MockInterface
- */
- private $secondFactorTypeService;
+ private SecondFactorTypeService&MockInterface $secondFactorTypeService;
- /**
- * @var SecondFactorProvePossessionHelper|MockInterface
- */
- private $secondFactorProvePossessionHelper;
+ private SecondFactorProvePossessionHelper&MockInterface $secondFactorProvePossessionHelper;
- /**
- * @var InstitutionConfigurationOptionsService|MockInterface $configService
- */
- private $configService;
+ private InstitutionConfigurationOptionsService|MockInterface $configService;
- /**
- * @var LoaResolutionService|MockInterface
- */
- private $loaResolutionService;
+ private LoaResolutionService&MockInterface $loaResolutionService;
- /**
- * @var RegistrationMailService|MockInterface
- */
- private $registrationMailService;
+ private RegistrationMailService|MockInterface $registrationMailService;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityIdEnforcingEventStoreDecorator.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityIdEnforcingEventStoreDecorator.php
index dee6e9864..847d00104 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityIdEnforcingEventStoreDecorator.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityIdEnforcingEventStoreDecorator.php
@@ -24,7 +24,7 @@
use Surfnet\Stepup\Identity\Event\IdentityEvent;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\InvalidArgumentException;
-final readonly class IdentityIdEnforcingEventStoreDecorator implements EventStoreInterface
+final class IdentityIdEnforcingEventStoreDecorator implements EventStoreInterface
{
use MockeryPHPUnitIntegration;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
index c6f7908cc..17449496a 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
@@ -63,15 +63,9 @@
class RegistrationAuthorityCommandHandlerTest extends CommandHandlerTest
{
- /**
- * @var InstitutionConfigurationRepository|MockInterface
- */
- private $institutionConfigurationRepositoryMock;
+ private MockInterface|InstitutionConfigurationRepository $institutionConfigurationRepositoryMock;
- /**
- * @var InstitutionConfiguration|MockInterface
- */
- private $institutionConfiguration;
+ private MockInterface|InstitutionConfiguration $institutionConfiguration;
/**
* Create a command handler for the given scenario test case.
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
index e7698124d..5594f4902 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
@@ -58,13 +58,13 @@
class RightToBeForgottenCommandHandlerTest extends CommandHandlerTest
{
/** @var MockInterface */
- private $apiIdentityRepository;
+ private MockInterface $apiIdentityRepository;
/** @var MockInterface */
- private $sensitiveDataService;
+ private MockInterface $sensitiveDataService;
/** @var MockInterface */
- private $sraaRepository;
+ private MockInterface $sraaRepository;
protected function createCommandHandler(
EventStoreInterface $eventStore,
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
index b464443d9..7b9238f9f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
@@ -35,14 +35,8 @@ class AuthorizingStageTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MockInterface mock of Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
- */
- private $authorizationChecker;
+ private MockInterface&AuthorizationCheckerInterface $authorizationChecker;
- /**
- * @var NullLogger
- */
private NullLogger $logger;
public function setUp(): void
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Processor/RecoveryTokenEmailProcessorTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Processor/RecoveryTokenEmailProcessorTest.php
index 839e358ac..add7b0c48 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Processor/RecoveryTokenEmailProcessorTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Processor/RecoveryTokenEmailProcessorTest.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Processor;
use Mockery;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Surfnet\Stepup\Identity\Event\CompliedWithRecoveryCodeRevocationEvent;
use Surfnet\Stepup\Identity\Event\PhoneRecoveryTokenPossessionProvenEvent;
@@ -38,24 +39,16 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\IdentityService;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Service\RecoveryTokenMailService;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Processor\RecoveryTokenEmailProcessor;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Identity\Processor\InstitutionConfigurationProcessor;
class RecoveryTokenEmailProcessorTest extends TestCase
{
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
- /**
- * @var RecoveryTokenEmailProcessor
- */
private RecoveryTokenEmailProcessor $processor;
- /**
- * @var Mockery\MockInterface|RecoveryTokenMailService
- */
- private $mailService;
- /**
- * @var Mockery\MockInterface|IdentityService
- */
- private $identityService;
+
+ private RecoveryTokenMailService&MockInterface $mailService;
+
+ private IdentityService&MockInterface $identityService;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/ForgettableEventStub.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/ForgettableEventStub.php
index 6c89de3b5..8ba62a886 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/ForgettableEventStub.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/ForgettableEventStub.php
@@ -26,12 +26,12 @@ final class ForgettableEventStub implements Forgettable
/**
* @var SensitiveData
*/
- public $sensitiveData;
+ public SensitiveData $sensitiveData;
/**
* @return SensitiveData
*/
- public function getSensitiveData()
+ public function getSensitiveData(): SensitiveData
{
return $this->sensitiveData;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
index 43577a25b..787dd9234 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
@@ -28,7 +28,7 @@ final class Institution implements Stringable
/**
* @param string $institution may not be an empty string
*/
- public function __construct($institution)
+ public function __construct(string $institution)
{
if (!is_string($institution) || trim($institution) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'institution', $institution);
@@ -40,7 +40,7 @@ public function __construct($institution)
/**
* @return string
*/
- public function getInstitution()
+ public function getInstitution(): string
{
return $this->institution;
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
index b5e49cd92..0eb2fa7c3 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
@@ -37,7 +37,7 @@ public function __construct(
* @param string $fallbackLocale
* @return null|EmailTemplate
*/
- public function findByName($name, $preferredLocale, $fallbackLocale): ?EmailTemplate
+ public function findByName(string $name, string $preferredLocale, string $fallbackLocale): ?EmailTemplate
{
try {
$emailTemplateEntity = $this->repository->findOneByName($name, $preferredLocale, $fallbackLocale);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
index d2afde83e..e64be1f4d 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Tests\Controller;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -40,11 +41,12 @@ class ConfigurationControllerTest extends WebTestCase
*/
private $passwordRo;
- private DatabaseToolCollection $databaseTool;
+ private ORMSqliteDatabaseTool $databaseTool;
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();
+ $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
index bc41ec202..c8fa63ef6 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Tests\Controller;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -40,11 +41,12 @@ class InstitutionConfigurationControllerTest extends WebTestCase
*/
private $passwordRo;
- private DatabaseToolCollection $databaseTool;
+ private ORMSqliteDatabaseTool $databaseTool;
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();
+ $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
index cb7e5614b..de18d2685 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
@@ -62,7 +62,7 @@ protected function configure(): void
->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor');
}
- protected function execute(InputInterface $input, OutputInterface $output): void
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
@@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
- return;
+ return 1;
}
$identity = $this->bootstrapService->getIdentity($nameId, $institution);
$output->writeln(
@@ -154,7 +154,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
$this->transactionHelper->rollback();
- throw $e;
+ return 1;
}
$output->writeln(
sprintf(
@@ -164,5 +164,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$secondFactorId,
),
);
+ return 0;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
index 1db27ff4b..7b8b7e0b6 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
@@ -49,7 +49,7 @@ protected function configure(): void
->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor');
}
- protected function execute(InputInterface $input, OutputInterface $output): void
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$nameId = new NameId($input->getArgument('name-id'));
$institutionText = $input->getArgument('institution');
@@ -70,7 +70,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$institution->getInstitution(),
),
);
- return;
+ return 1;
}
try {
$this->transactionHelper->beginTransaction();
@@ -91,10 +91,12 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
$this->transactionHelper->rollback();
- throw $e;
+ return 1;
}
$output->writeln(
sprintf('Successfully created identity with UUID %s', $identity->id),
);
+
+ return 0;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
index 0e84b0ca1..b79000553 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
@@ -57,7 +57,7 @@ protected function configure(): void
->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor');
}
- protected function execute(InputInterface $input, OutputInterface $output): void
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
@@ -78,7 +78,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
- return;
+ return 1;
}
$identity = $this->bootstrapService->getIdentity($nameId, $institution);
$output->writeln(
@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
$this->transactionHelper->rollback();
- throw $e;
+ return 1;
}
$output->writeln(
sprintf(
@@ -135,5 +135,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$secondFactorId,
),
);
+ return 0;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
index c906949a9..ee35cd331 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
@@ -57,7 +57,7 @@ protected function configure(): void
->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor');
}
- protected function execute(InputInterface $input, OutputInterface $output): void
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$registrationStatus = $input->getArgument('registration-status');
$this->bootstrapService->validRegistrationStatus($registrationStatus);
@@ -79,7 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
- return;
+ return 1;
}
$identity = $this->bootstrapService->getIdentity($nameId, $institution);
$output->writeln(
@@ -128,7 +128,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
$this->transactionHelper->rollback();
- throw $e;
+ return 1;
}
$output->writeln(
sprintf(
@@ -136,5 +136,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$secondFactorId,
),
);
+ return 0;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
index 8ef0bee8d..f4e95ad3b 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
@@ -58,7 +58,7 @@ protected function configure(): void
->addArgument('email', InputArgument::OPTIONAL, 'The e-mail address of the identity to create');
}
- protected function execute(InputInterface $input, OutputInterface $output): void
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$sourceNameId = new NameId($input->getArgument('old-name-id'));
$targetNameId = new NameId($input->getArgument('new-name-id'));
@@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
),
);
$this->transactionHelper->rollback();
- throw $e;
+ return 1;
}
$output->writeln(
sprintf(
@@ -118,6 +118,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void
$targetIdentity->id,
),
);
+ return 0;
}
/**
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
index f4e59a9b7..76cb29d92 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
@@ -23,17 +23,14 @@
use Broadway\Domain\DomainMessage;
use Broadway\Serializer\SimpleInterfaceSerializer;
use Doctrine\DBAL\Connection;
-use Doctrine\DBAL\Driver\Statement;
+use Doctrine\DBAL\Statement;
use PDO;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\Forgettable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\SensitiveData;
class DBALEventHydrator
{
- /**
- * @var Statement
- */
- private $loadStatement = null;
+ private ?Statement $loadStatement = null;
/**
* @param string $eventStreamTableName
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
index d61a2441a..2a8d1fb88 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
@@ -23,12 +23,18 @@
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
+use Surfnet\Stepup\DateTime\DateTime as MiddlewareDateTime;
+use Surfnet\Stepup\Identity\Value\CommonName;
+use Surfnet\Stepup\Identity\Value\Email;
+use Surfnet\Stepup\Identity\Value\Institution;
+use Surfnet\Stepup\Identity\Value\Locale;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VerifiedSecondFactor;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VerifiedSecondFactorRepository;
use Surfnet\StepupMiddleware\MiddlewareBundle\Service\VerifiedSecondFactorReminderMailService;
use Surfnet\StepupMiddleware\MiddlewareBundle\Service\VerifiedSecondFactorReminderService;
+use Symfony\Component\Mailer\Exception\TransportException;
class VerifiedSecondFactorReminderServiceTest extends TestCase
{
@@ -189,7 +195,7 @@ public function test_one_token_reminders_sent_failing_mailer(): void
$this->mailService
->shouldReceive('sendReminder')
->once()
- ->andReturn(0);
+ ->andThrow(TransportException::class);
$this->logger
->shouldReceive('info')
@@ -431,9 +437,9 @@ private function buildVerifiedSecondFactors(int $numberOfResults, DateTime $requ
for ($i = 1; $i <= $numberOfResults; $i++) {
$token = new VerifiedSecondFactor();
$token->id = "fa125c7c-c9ee-11e7-800{$i}-00000000000{$i}";
- $token->identityId = $i;
+ $token->identityId = (string) $i;
$token->registrationCode = "CODE_{$i}";
- $token->registrationRequestedAt = $requestedAt;
+ $token->registrationRequestedAt = new MiddlewareDateTime($requestedAt);
$token->type = 'yubikey';
$token->commonName = "John Doe {$i}";
$collection[] = $token;
@@ -449,10 +455,10 @@ private function buildIdentity(VerifiedSecondFactor $token): Identity
{
$identity = new Identity();
$identity->id = $token->identityId;
- $identity->commonName = "John Doe {$token->identityId}";
- $identity->institution = "Institution {$token->identityId}";
- $identity->preferredLocale = 'nl_NL';
- $identity->email = "mail@example{$token->identityId}.org";
+ $identity->commonName = new CommonName("John Doe {$token->identityId}");
+ $identity->institution = new Institution("Institution {$token->identityId}");
+ $identity->preferredLocale = new Locale('nl_NL');
+ $identity->email = new Email("mail@example{$token->identityId}.org");
return $identity;
}
From 6e97aad840aff9fb27931512fee1d8e98725d91f Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Wed, 20 Mar 2024 09:46:23 +0100
Subject: [PATCH 41/89] Address level 4 PHPStan issues
Doctrine extention was added to the Stan setup. Preventing unused
field warnings.
Three warnings have been ignored. They are regarding a hidden use of
three RegistraoinAuthority fields. Static analysis does not evaluate
that they are written when persisted to db storage
The rest of the fixes are mainly removal of unused code fragments. Or
removal of redundant sections of logical expressions.
---
composer.json | 1 +
composer.lock | 74 ++++++++++++++++++-
src/Surfnet/Stepup/DateTime/DateTime.php | 29 ++------
.../Stepup/Identity/AuditLog/Metadata.php | 24 +-----
.../Identity/Entity/RegistrationAuthority.php | 6 +-
.../Event/SecondFactorVettedEvent.php | 3 +-
...torVettedWithoutTokenProofOfPossession.php | 3 +-
src/Surfnet/Stepup/Identity/Identity.php | 14 ++--
.../Service/AuthorizationService.php | 2 +-
.../InstitutionAuthorizationProjector.php | 1 -
.../Projector/RaLocationProjector.php | 11 +--
...titutionConfigurationOptionsRepository.php | 3 +-
.../Repository/RaLocationRepository.php | 7 +-
.../AllowedSecondFactorListService.php | 2 -
.../Service/RaLocationService.php | 9 +--
.../Controller/IdentityController.php | 9 +--
.../Identity/Entity/VettedSecondFactor.php | 23 +-----
.../Identity/Projector/AuditLogProjector.php | 3 +-
.../Identity/Projector/RaListingProjector.php | 22 ++----
.../Identity/Query/RaListingQuery.php | 37 ++--------
.../Identity/Query/RaSecondFactorQuery.php | 46 ++++--------
.../Identity/Query/RecoveryTokenQuery.php | 45 +++--------
.../Query/UnverifiedSecondFactorQuery.php | 5 +-
.../VerifiedSecondFactorOfIdentityQuery.php | 5 +-
.../Query/VerifiedSecondFactorQuery.php | 15 +---
.../Query/VettedSecondFactorQuery.php | 5 +-
.../Repository/RaSecondFactorRepository.php | 2 +-
.../Repository/RecoveryTokenRepository.php | 2 +-
.../Request/InstitutionParamConverter.php | 3 +-
.../CommandAuthorizationServiceTest.php | 3 -
.../AddPipelineStagesCompilerPass.php | 4 -
.../EventHandling/BufferedEventBus.php | 2 +-
.../SensitiveDataMessageStream.php | 5 +-
.../GatewayBundle/Entity/SecondFactor.php | 25 ++-----
.../InstitutionConfigurationProjector.php | 12 ++-
35 files changed, 170 insertions(+), 292 deletions(-)
diff --git a/composer.json b/composer.json
index 85a565d71..751c9a5cc 100644
--- a/composer.json
+++ b/composer.json
@@ -66,6 +66,7 @@
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.11.x-dev",
+ "phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.5",
diff --git a/composer.lock b/composer.lock
index 5214ee37d..ba29dbfe0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "668bf259b1e063066c54e7be27f14c3c",
+ "content-hash": "d34c31554d9e3de69b068c92584b0496",
"packages": [
{
"name": "beberlei/assert",
@@ -10014,6 +10014,78 @@
],
"time": "2024-03-13T14:17:45+00:00"
},
+ {
+ "name": "phpstan/phpstan-doctrine",
+ "version": "1.3.63",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-doctrine.git",
+ "reference": "6ccde2b243e30ba47f7cd29f87fb752263bcb25c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/6ccde2b243e30ba47f7cd29f87fb752263bcb25c",
+ "reference": "6ccde2b243e30ba47f7cd29f87fb752263bcb25c",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.10.63"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.0",
+ "doctrine/common": "<2.7",
+ "doctrine/mongodb-odm": "<1.2",
+ "doctrine/orm": "<2.5",
+ "doctrine/persistence": "<1.3"
+ },
+ "require-dev": {
+ "cache/array-adapter": "^1.1",
+ "composer/semver": "^3.3.2",
+ "cweagans/composer-patches": "^1.7.3",
+ "doctrine/annotations": "^1.11 || ^2.0",
+ "doctrine/collections": "^1.6 || ^2.1",
+ "doctrine/common": "^2.7 || ^3.0",
+ "doctrine/dbal": "^2.13.8 || ^3.3.3",
+ "doctrine/lexer": "^2.0 || ^3.0",
+ "doctrine/mongodb-odm": "^1.3 || ^2.4.3",
+ "doctrine/orm": "^2.16.0",
+ "doctrine/persistence": "^2.2.1 || ^3.2",
+ "gedmo/doctrine-extensions": "^3.8",
+ "nesbot/carbon": "^2.49",
+ "nikic/php-parser": "^4.13.2",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.3.13",
+ "phpstan/phpstan-strict-rules": "^1.5.1",
+ "phpunit/phpunit": "^9.6.16",
+ "ramsey/uuid": "^4.2",
+ "symfony/cache": "^5.4"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Doctrine extensions for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-doctrine/issues",
+ "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.63"
+ },
+ "time": "2024-03-18T18:05:58+00:00"
+ },
{
"name": "phpstan/phpstan-mockery",
"version": "1.1.2",
diff --git a/src/Surfnet/Stepup/DateTime/DateTime.php b/src/Surfnet/Stepup/DateTime/DateTime.php
index 77556611d..00778cc8c 100644
--- a/src/Surfnet/Stepup/DateTime/DateTime.php
+++ b/src/Surfnet/Stepup/DateTime/DateTime.php
@@ -22,6 +22,7 @@
use DateTime as CoreDateTime;
use Stringable;
use Surfnet\Stepup\Exception\InvalidArgumentException;
+use TypeError;
/**
* @SuppressWarnings(PHPMD.TooManyMethods)
@@ -37,14 +38,15 @@ class DateTime implements Stringable
/**
* Allows for mocking of time.
- *
+ * @see DateTimeHelper::setCurrentTime here you can see how now can be overridden using reflection
* @var self|null
*/
- private static ?DateTime $now;
+ private static ?DateTime $now; // @phpstan-ignore-line PHPStan can not see that the DateTimeHelper is able to set the now value using reflection
private readonly CoreDateTime $dateTime;
/**
+ * @see DateTimeHelper::setCurrentTime here you can see how now can be overridden using reflection
* @return self
*/
public static function now(): DateTime
@@ -118,9 +120,7 @@ public function comesBeforeOrIsEqual(DateTime $dateTime): bool
public function comesAfter(DateTime $dateTime): bool
{
- $end = $this->dateTime->getTimestamp();
- $start = $dateTime->dateTime->getTimestamp();
- return $end > $start;
+ return $this->dateTime > $dateTime->dateTime;
}
public function comesAfterOrIsEqual(DateTime $dateTime): bool
@@ -128,24 +128,9 @@ public function comesAfterOrIsEqual(DateTime $dateTime): bool
return $this->dateTime >= $dateTime->dateTime;
}
- /**
- * @param $format
- * @return string
- */
- public function format($format): string
+ public function format(string $format): string
{
- $formatted = $this->dateTime->format($format);
-
- if ($formatted === false) {
- throw new InvalidArgumentException(
- sprintf(
- 'Given format "%s" is not a valid format for DateTime',
- $format,
- ),
- );
- }
-
- return $formatted;
+ return $this->dateTime->format($format);
}
/**
diff --git a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
index 1435235ad..ebc62e980 100644
--- a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
+++ b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
@@ -39,19 +39,10 @@ final class Metadata
*/
public Institution $identityInstitution;
- /**
- * @var Institution
- */
- public Institution $raInstitution;
+ public ?Institution $raInstitution;
- /**
- * @var SecondFactorId|null
- */
public ?SecondFactorId $secondFactorId;
- /**
- * @var SecondFactorType|null
- */
public ?SecondFactorType $secondFactorType;
/**
@@ -59,16 +50,9 @@ final class Metadata
*/
public ?SecondFactorIdentifier $secondFactorIdentifier;
- /** @var VettingType */
- public VettingType $vettingType;
+ public ?VettingType $vettingType;
- /**
- * @var RecoveryTokenId
- */
- public RecoveryTokenId $recoveryTokenId;
+ public ?RecoveryTokenId $recoveryTokenId;
- /**
- * @var RecoveryTokenType
- */
- public RecoveryTokenType $recoveryTokenType;
+ public ?RecoveryTokenType $recoveryTokenType;
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
index 87dbc7c11..92bdcf620 100644
--- a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
+++ b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
@@ -31,11 +31,11 @@ final class RegistrationAuthority extends SimpleEventSourcedEntity
{
private ?RegistrationAuthorityRole $role = null;
- private ?Location $location = null;
+ private ?Location $location = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
- private ?ContactInformation $contactInformation = null;
+ private ?ContactInformation $contactInformation = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
- private ?Institution $institution = null;
+ private ?Institution $institution = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
public static function accreditWith(
RegistrationAuthorityRole $role,
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
index b1b9aa517..5ed1ac3f7 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
@@ -88,8 +88,7 @@ class SecondFactorVettedEvent extends IdentityEvent implements Forgettable, Righ
*/
public Locale $preferredLocale;
- /** @var VettingType */
- public VettingType $vettingType;
+ public ?VettingType $vettingType;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
index 81d819c64..058b6334e 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
@@ -96,8 +96,7 @@ class SecondFactorVettedWithoutTokenProofOfPossession extends IdentityEvent impl
*/
public Locale $preferredLocale;
- /** @var VettingType */
- public VettingType $vettingType;
+ public ?VettingType $vettingType;
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php
index d3da0c230..8f6dfed00 100644
--- a/src/Surfnet/Stepup/Identity/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Identity.php
@@ -821,9 +821,10 @@ public function complyWithSecondFactorRevocation(SecondFactorId $secondFactorId,
public function revokeRecoveryToken(RecoveryTokenId $recoveryTokenId): void
{
$this->assertNotForgotten();
- $recoveryToken = $this->recoveryTokens->get($recoveryTokenId);
- if (!$recoveryToken) {
- throw new DomainException('Cannot revoke recovery token: no token with given id exists.');
+ try {
+ $recoveryToken = $this->recoveryTokens->get($recoveryTokenId);
+ } catch (DomainException $e) {
+ throw new DomainException('Cannot revoke recovery token: no token with given id exists.', 0, $e);
}
$recoveryToken->revoke();
}
@@ -831,9 +832,10 @@ public function revokeRecoveryToken(RecoveryTokenId $recoveryTokenId): void
public function complyWithRecoveryTokenRevocation(RecoveryTokenId $recoveryTokenId, IdentityId $authorityId): void
{
$this->assertNotForgotten();
- $recoveryToken = $this->recoveryTokens->get($recoveryTokenId);
- if (!$recoveryToken) {
- throw new DomainException('Cannot revoke recovery token: no token with given id exists.');
+ try {
+ $recoveryToken = $this->recoveryTokens->get($recoveryTokenId);
+ } catch (DomainException $e) {
+ throw new DomainException('Cannot revoke recovery token: no token with given id exists.', 0, $e);
}
$recoveryToken->complyWithRevocation($authorityId);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
index c3019a7cb..0b3b96314 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
@@ -96,7 +96,7 @@ public function assertRegistrationOfSelfAssertedTokensIsAllowed(IdentityId $iden
}
// The Identity is not allowed to do a SAT when he had a RT, but lost it. And also currently has no SF
$hasActiveRecoveryToken = $this->recoveryTokenService->identityHasActiveRecoveryToken($identity);
- if ($options->possessedSelfAssertedToken && !$hasActiveRecoveryToken && !$hasVettedSecondFactorToken) {
+ if ($options->possessedSelfAssertedToken && !$hasActiveRecoveryToken) {
return $this->deny('Identity lost both Recovery and Second Factor token, SAT is not allowed');
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php
index 7fd76f770..a13db3a70 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php
@@ -34,7 +34,6 @@ final class InstitutionAuthorizationProjector extends Projector
{
public function __construct(
private readonly InstitutionAuthorizationRepository $institutionAuthorizationRepository,
- private readonly InstitutionConfigurationOptionsRepository $institutionConfigurationOptionsRepository,
) {
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php
index cc308a544..183ec7946 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php
@@ -88,10 +88,7 @@ public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurati
$this->repository->removeRaLocationsFor($event->institution);
}
- /**
- * @return RaLocation
- */
- private function fetchRaLocationById(RaLocationId $raLocationId)
+ private function fetchRaLocationById(RaLocationId $raLocationId): RaLocation
{
$raLocation = $this->repository->findByRaLocationId($raLocationId);
@@ -101,12 +98,6 @@ private function fetchRaLocationById(RaLocationId $raLocationId)
);
}
- if (!$raLocation instanceof RaLocation) {
- throw new RuntimeException(
- 'Tried to update an RA Locations contact information, but location is of the wrong type',
- );
- }
-
return $raLocation;
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
index 7d5beeb97..ba9f5b9d7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
@@ -32,10 +32,9 @@ public function __construct(ManagerRegistry $registry)
}
/**
- * @return InstitutionConfigurationOptions
* @throws NonUniqueResultException
*/
- public function findConfigurationOptionsFor(Institution $institution)
+ public function findConfigurationOptionsFor(Institution $institution): ?InstitutionConfigurationOptions
{
return $this->createQueryBuilder('ico')
->where('ico.institution = :institution')
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
index d659a8032..924a31fad 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
@@ -55,10 +55,7 @@ public function search(RaLocationQuery $query)
->getResult();
}
- /**
- * @return RaLocation[]
- */
- public function findByRaLocationId(RaLocationId $raLocationId)
+ public function findByRaLocationId(RaLocationId $raLocationId): ?RaLocation
{
return $this->createQueryBuilder('rl')
->where('rl.id = :id')
@@ -84,7 +81,7 @@ public function remove(RaLocation $raLocation): void
/**
* @return RaLocation[]
*/
- public function findByInstitution(Institution $institution)
+ public function findByInstitution(Institution $institution): array
{
return $this->createQueryBuilder('rl')
->where('rl.institution = :institution')
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
index 127ab72c1..0f9bfb775 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
@@ -22,13 +22,11 @@
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\AllowedSecondFactor;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Repository\AllowedSecondFactorRepository;
-use Surfnet\StepupMiddleware\ApiBundle\Configuration\Repository\ConfiguredInstitutionRepository;
class AllowedSecondFactorListService
{
public function __construct(
private readonly AllowedSecondFactorRepository $allowedSecondFactorRepository,
- private readonly ConfiguredInstitutionRepository $configuredInstitutionRepository,
) {
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
index 29dc42e14..0100df773 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
@@ -33,15 +33,12 @@ public function __construct(private readonly RaLocationRepository $repository)
/**
* @return null|RaLocation[]
*/
- public function search(RaLocationQuery $query)
+ public function search(RaLocationQuery $query): ?array
{
return $this->repository->search($query);
}
- /**
- * @return RaLocation[]
- */
- public function findByRaLocationId(RaLocationId $raLocationId)
+ public function findByRaLocationId(RaLocationId $raLocationId): ?RaLocation
{
return $this->repository->findByRaLocationId($raLocationId);
}
@@ -50,7 +47,7 @@ public function findByRaLocationId(RaLocationId $raLocationId)
/**
* @return RaLocation[]
*/
- public function listRaLocationsFor(Institution $institution)
+ public function listRaLocationsFor(Institution $institution): ?array
{
return $this->repository->findByInstitution($institution);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
index 1119e39a6..a231c531a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
@@ -18,9 +18,7 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Controller;
-use Surfnet\Stepup\Configuration\Value\InstitutionRole;
use Surfnet\Stepup\Identity\Value\Institution;
-use Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionRoleSet;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\IdentityQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\IdentityService;
@@ -33,14 +31,9 @@
class IdentityController extends AbstractController
{
- private readonly InstitutionRoleSet $roleRequirements;
-
public function __construct(
- private IdentityService $identityService,
+ private readonly IdentityService $identityService,
) {
- $this->roleRequirements = new InstitutionRoleSet(
- [new InstitutionRole(InstitutionRole::ROLE_USE_RA), new InstitutionRole(InstitutionRole::ROLE_USE_RAA)],
- );
}
public function get($id): JsonResponse
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
index 58e91b756..f3ea7d99b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
@@ -29,41 +29,22 @@
#[ORM\Entity(repositoryClass: VettedSecondFactorRepository::class)]
class VettedSecondFactor implements JsonSerializable
{
- /**
- * @var string
- */
#[ORM\Id]
#[ORM\Column(length: 36)]
public string $id;
- /**
- * @var string
- */
#[ORM\Column(length: 36)]
public string $identityId;
- /**
- * @var string
- */
#[ORM\Column(length: 16)]
public string $type;
- /**
- * The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
- * @var string
- */
#[ORM\Column(length: 255)]
public string $secondFactorIdentifier;
- /**
- * @var string
- */
#[ORM\Column(length: 255, nullable: true)]
- public string $vettingType;
+ public ?string $vettingType;
- /**
- * @return bool
- */
public function isEqual(VettedSecondFactor $vettedSecondFactor): bool
{
return $vettedSecondFactor->type == $this->type && $vettedSecondFactor->secondFactorIdentifier == $this->secondFactorIdentifier;
@@ -71,7 +52,7 @@ public function isEqual(VettedSecondFactor $vettedSecondFactor): bool
public function vettingType(): string
{
- if (is_null($this->vettingType)) {
+ if (!$this->vettingType) {
return VettingType::TYPE_ON_PREMISE;
}
return $this->vettingType;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
index 11ebe9274..73babc76e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
@@ -31,6 +31,7 @@
use Surfnet\Stepup\Identity\Value\CommonName;
use Surfnet\Stepup\Identity\Value\RecoveryTokenIdentifierFactory;
use Surfnet\Stepup\Identity\Value\RecoveryTokenType;
+use Surfnet\Stepup\Identity\Value\VettingType;
use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
@@ -160,7 +161,7 @@ private function applyIdentityForgottenEvent(IdentityForgottenEvent $event): voi
private function augmentActorCommonName(AuditLogEntry $entry, Metadata $auditLogMetadata): void
{
- if (property_exists($auditLogMetadata, 'vettingType') && !is_null($auditLogMetadata->vettingType)) {
+ if (property_exists($auditLogMetadata, 'vettingType') && $auditLogMetadata->vettingType instanceof VettingType) {
$entry->actorCommonName = new CommonName(
$entry->actorCommonName->getCommonName() . $auditLogMetadata->vettingType->auditLog()
);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
index 8a5337575..dfaca7205 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
@@ -50,9 +50,6 @@ public function __construct(
) {
}
- /**
- * @return void
- */
public function applyIdentityAccreditedAsRaForInstitutionEvent(IdentityAccreditedAsRaForInstitutionEvent $event,): void
{
$identity = $this->identityRepository->find((string)$event->identityId);
@@ -71,9 +68,6 @@ public function applyIdentityAccreditedAsRaForInstitutionEvent(IdentityAccredite
$this->raListingRepository->save($raListing);
}
- /**
- * @return void
- */
public function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccreditedAsRaaForInstitutionEvent $event,): void
{
$identity = $this->identityRepository->find((string)$event->identityId);
@@ -95,7 +89,6 @@ public function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccredit
public function applyRegistrationAuthorityInformationAmendedForInstitutionEvent(
RegistrationAuthorityInformationAmendedForInstitutionEvent $event,
): void {
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndRaInstitution(
$event->identityId,
$event->raInstitution,
@@ -116,7 +109,6 @@ public function applyRegistrationAuthorityInformationAmendedForInstitutionEvent(
public function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitutionEvent $event): void
{
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndRaInstitution(
$event->identityId,
$event->raInstitution,
@@ -129,7 +121,6 @@ public function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitutio
public function applyAppointedAsRaaForInstitutionEvent(AppointedAsRaaForInstitutionEvent $event): void
{
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndRaInstitution(
$event->identityId,
$event->raInstitution,
@@ -160,7 +151,6 @@ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): v
public function applyIdentityAccreditedAsRaEvent(IdentityAccreditedAsRaEvent $event): void
{
$identity = $this->identityRepository->find((string)$event->identityId);
-
$raListing = RaListing::create(
(string)$event->identityId,
$event->identityInstitution,
@@ -183,7 +173,6 @@ public function applyIdentityAccreditedAsRaEvent(IdentityAccreditedAsRaEvent $ev
public function applyIdentityAccreditedAsRaaEvent(IdentityAccreditedAsRaaEvent $event): void
{
$identity = $this->identityRepository->find((string)$event->identityId);
-
$raListing = RaListing::create(
(string)$event->identityId,
$event->identityInstitution,
@@ -204,7 +193,6 @@ public function applyIdentityAccreditedAsRaaEvent(IdentityAccreditedAsRaaEvent $
public function applyRegistrationAuthorityInformationAmendedEvent(
RegistrationAuthorityInformationAmendedEvent $event,
): void {
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndRaInstitution(
$event->identityId,
$event->identityInstitution,
@@ -228,13 +216,14 @@ public function applyRegistrationAuthorityInformationAmendedEvent(
*/
public function applyAppointedAsRaEvent(AppointedAsRaEvent $event): void
{
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndInstitution(
$event->identityId,
$event->identityInstitution,
);
- $raListing->role = AuthorityRole::ra();
+ foreach ($raListing as $listing) {
+ $listing->role = AuthorityRole::ra();
+ }
$this->raListingRepository->save($raListing);
}
@@ -244,13 +233,14 @@ public function applyAppointedAsRaEvent(AppointedAsRaEvent $event): void
*/
public function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event): void
{
- /** @var RaListing $raListing */
$raListing = $this->raListingRepository->findByIdentityIdAndInstitution(
$event->identityId,
$event->identityInstitution,
);
- $raListing->role = AuthorityRole::raa();
+ foreach ($raListing as $listing) {
+ $listing->role = AuthorityRole::raa();
+ }
$this->raListingRepository->save($raListing);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
index fbfda7f93..4a85b8bf3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaListingQuery.php
@@ -24,48 +24,21 @@
class RaListingQuery extends AbstractQuery
{
- /**
- * @var string|Institution
- */
public string|Institution $institution;
- /**
- * @var IdentityId
- */
- public IdentityId $identityId;
+ public ?IdentityId $identityId = null;
- /**
- * @var string|null
- */
- public ?string $name;
+ public ?string $name = null;
- /**
- * @var string|null
- */
- public ?string $email;
+ public ?string $email = null;
- /**
- * @var string|null
- */
- public ?string $role;
+ public ?string $role = null;
- /**
- * @var string|null
- */
- public ?string $raInstitution;
+ public ?string $raInstitution = null;
- /**
- * @var string
- */
public string $orderBy;
- /**
- * @var string
- */
public string $orderDirection;
- /**
- * @var InstitutionAuthorizationContextInterface
- */
public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
index 12d2bfaf9..7c26d277d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RaSecondFactorQuery.php
@@ -22,48 +22,30 @@
final class RaSecondFactorQuery extends AbstractQuery
{
- /**
- * @var string|null
- */
- public ?string $name;
+ public ?string $name = null;
- /**
- * @var string|null
- */
- public ?string $type;
+ public ?string $type = null;
- /**
- * @var string|null The second factor type's ID (eg. Yubikey public ID)
+ /*
+ * The second factor type's ID (eg. Yubikey public ID)
*/
- public ?string $secondFactorId;
+ public ?string $secondFactorId = null;
- /**
- * @var string|null
- */
- public ?string $email;
+ public ?string $email = null;
- /**
- * @var string|null the filter value, not to be confused with the actorInstitution which is used for authorizations.
+ /*
+ * the filter value, not to be confused with the actorInstitution which is used for authorizations.
*/
- public ?string $institution;
+ public ?string $institution = null;
- /**
- * @var string|null One of the ApiBundle\Identity\Entity\RaSecondFactor::STATUS_* constants.
+ /*
+ * One of the ApiBundle\Identity\Entity\RaSecondFactor::STATUS_* constants.
*/
- public ?string $status;
+ public ?string $status = null;
- /**
- * @var string|null
- */
- public ?string $orderBy;
+ public ?string $orderBy = null;
- /**
- * @var string|null
- */
- public ?string $orderDirection;
+ public ?string $orderDirection = null;
- /**
- * @var InstitutionAuthorizationContextInterface
- */
public InstitutionAuthorizationContextInterface $authorizationContext;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
index 450d1e857..713c64be2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/RecoveryTokenQuery.php
@@ -23,48 +23,21 @@
class RecoveryTokenQuery extends AbstractQuery
{
- /**
- * @var IdentityId
- */
- public IdentityId $identityId;
+ public ?IdentityId $identityId = null;
- /**
- * @var string|null
- */
- public ?string $type;
+ public ?string $type = null;
- /**
- * @var string|null
- */
- public ?string $status;
+ public ?string $status = null;
- /**
- * @var string|null
- */
- public ?string $institution;
+ public ?string $institution = null;
- /**
- * @var string|null
- */
- public ?string $name;
+ public ?string $name = null;
- /**
- * @var string|null
- */
- public ?string $email;
+ public ?string $email = null;
- /**
- * @var string|null
- */
- public ?string $orderBy;
+ public ?string $orderBy = null;
- /**
- * @var string|null
- */
- public ?string $orderDirection;
+ public ?string $orderDirection = null;
- /**
- * @var InstitutionAuthorizationContextInterface
- */
- public InstitutionAuthorizationContextInterface $authorizationContext;
+ public ?InstitutionAuthorizationContextInterface $authorizationContext = null;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
index 5e43a6caf..5bbc0a001 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
@@ -22,10 +22,7 @@
class UnverifiedSecondFactorQuery extends AbstractQuery
{
- /**
- * @var IdentityId
- */
- public IdentityId $identityId;
+ public ?IdentityId $identityId = null;
/**
* @var string|null
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
index 8a9b3d80c..fb5775f15 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorOfIdentityQuery.php
@@ -22,8 +22,5 @@
class VerifiedSecondFactorOfIdentityQuery extends AbstractQuery
{
- /**
- * @var IdentityId|null
- */
- public ?IdentityId $identityId;
+ public ?IdentityId $identityId = null;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
index 03f0b9e40..f8a9b2e1a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VerifiedSecondFactorQuery.php
@@ -24,20 +24,11 @@
class VerifiedSecondFactorQuery extends AbstractQuery
{
- /**
- * @var IdentityId|null
- */
- public ?IdentityId $identityId;
+ public ?IdentityId $identityId = null;
- /**
- * @var SecondFactorId|null
- */
- public ?SecondFactorId $secondFactorId;
+ public ?SecondFactorId $secondFactorId = null;
- /**
- * @var string|null
- */
- public ?string $registrationCode;
+ public ?string $registrationCode = null;
/**
* @var InstitutionAuthorizationContext
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
index 4fad4cef3..d8d1cad7c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/VettedSecondFactorQuery.php
@@ -22,8 +22,5 @@
class VettedSecondFactorQuery extends AbstractQuery
{
- /**
- * @var IdentityId
- */
- public IdentityId $identityId;
+ public ?IdentityId $identityId = null;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
index 9a997be5e..e9bd671dc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
@@ -113,7 +113,7 @@ public function createSearchQuery(RaSecondFactorQuery $query): Query
throw new RuntimeException(
sprintf(
'Received invalid status "%s" in RaSecondFactorRepository::createSearchQuery',
- is_object($stringStatus) ? $stringStatus::class : (string)$stringStatus,
+ $stringStatus,
),
);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
index 050c63281..9923a9a25 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
@@ -86,7 +86,7 @@ public function createSearchQuery(RecoveryTokenQuery $query): Query
throw new RuntimeException(
sprintf(
'Received invalid status "%s" in RecoveryTokenRepository::createSearchQuery',
- is_object($stringStatus) ? $stringStatus::class : (string)$stringStatus,
+ $stringStatus,
),
);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
index 9f06abeba..b4c5d7f74 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
@@ -23,6 +23,7 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Exception\BadApiRequestException;
use Symfony\Component\HttpFoundation\Request;
+use function is_bool;
class InstitutionParamConverter implements ParamConverterInterface
{
@@ -31,7 +32,7 @@ public function apply(Request $request, ParamConverter $configuration): bool
$query = $request->query;
$institution = $query->get('institution', false);
- if ($institution === false) {
+ if (!is_string($institution)) {
throw new BadApiRequestException(['This API-call MUST include the institution as get parameter']);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index ff665b3dc..5d89ca7c1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -83,8 +83,6 @@ class CommandAuthorizationServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- private WhitelistService&MockInterface $whitelistService;
-
private IdentityService&MockInterface $identityService;
private LoggerInterface&MockInterface $logger;
@@ -107,7 +105,6 @@ public function setUp(): void
$authorizationContextService,
);
- $this->whitelistService = $whitelistService;
$this->identityService = $identityService;
$this->logger = $logger;
$this->authorizationContextService = $authorizationContextService;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/CompilerPass/AddPipelineStagesCompilerPass.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/CompilerPass/AddPipelineStagesCompilerPass.php
index f1f95c04c..a43d46fb9 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/CompilerPass/AddPipelineStagesCompilerPass.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/CompilerPass/AddPipelineStagesCompilerPass.php
@@ -53,10 +53,6 @@ public function process(ContainerBuilder $container): void
$prioritized[$priority] = new Reference($stageServiceId);
}
- if (!ksort($prioritized)) {
- throw new RuntimeException('Could not sort stages based on prioritization (ksort failed)');
- }
-
// ksort sorts low -> high, so reversing to get them sorted correctly.
$prioritized = array_reverse($prioritized);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index 3ebbe965f..47e24d705 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -103,7 +103,7 @@ public function flush(): void
unset($buffer);
// if during the handling of events new events have been queued, we need to flush them
- if ($this->buffer !== []) {
+ if (!empty($this->buffer)) {
$this->flush();
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
index fd2183eba..d61b41f25 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
@@ -69,9 +69,6 @@ public function getIterator(): Iterator
return new ArrayIterator($this->messages);
}
- /**
- * @param SensitiveDataMessage|null $sensitiveDataMessage
- */
private function setSensitiveData(
DomainMessage $domainMessage,
SensitiveDataMessage $sensitiveDataMessage = null,
@@ -93,7 +90,7 @@ private function setSensitiveData(
);
}
- if (!$eventIsForgettable && $sensitiveDataMessage) {
+ if (!$eventIsForgettable) {
throw new SensitiveDataApplicationException(
sprintf(
'Encountered sensitive data for event which does not support sensitive data, UUID %s, playhead %d',
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SecondFactor.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SecondFactor.php
index bcc548ff1..de35a6fef 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SecondFactor.php
@@ -37,34 +37,25 @@ class SecondFactor
#[ORM\Column(length: 36)]
private string $id;
- /**
- * @param string $identityId
- * @param string $nameId
- * @param string $institution
- * @param string $displayLocale
- * @param string $secondFactorId
- * @param string $secondFactorType
- * @param string $secondFactorIdentifier
- */
public function __construct(
#[ORM\Id]
#[ORM\Column(length: 36)]
- private $identityId,
+ private string $identityId,
#[ORM\Column(length: 200)]
- private $nameId,
+ private string $nameId,
#[ORM\Column(length: 200)]
- private $institution,
+ private string $institution,
/**
* In which language to display any second factor verification screens.
*/
#[ORM\Column]
- public $displayLocale,
+ public string $displayLocale,
#[ORM\Column(length: 36)]
- private $secondFactorId,
+ private string $secondFactorId,
#[ORM\Column(length: 255)]
- private $secondFactorIdentifier,
+ private string $secondFactorIdentifier,
#[ORM\Column(length: 50)]
- private $secondFactorType,
+ private string $secondFactorType,
/**
* This boolean indicates if the second factor token was vetted
* using one of the vetting types that are considered 'identity-vetted'.
@@ -74,7 +65,7 @@ public function __construct(
* was RA vetted.
*/
#[ORM\Column(type: 'boolean', options: ['default' => '1'])]
- private $identityVetted,
+ private bool $identityVetted,
) {
$this->id = (string)Uuid::uuid4();
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php
index c680a8268..6d4672d8b 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php
@@ -53,13 +53,11 @@ public function applySsoOn2faOptionChangedEvent(SsoOn2faOptionChangedEvent $even
}
// It can happen that the event changed for an institution that already exists, but is not yet projected to
// this projection. In that case we can create it.
- if (!$institutionConfiguration) {
- $institutionConfiguration = new InstitutionConfiguration(
- (string)$event->institution,
- $event->ssoOn2faOption->isEnabled(),
- );
- $this->repository->save($institutionConfiguration);
- }
+ $institutionConfiguration = new InstitutionConfiguration(
+ (string)$event->institution,
+ $event->ssoOn2faOption->isEnabled(),
+ );
+ $this->repository->save($institutionConfiguration);
}
public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void
From d146101e3952991f8efe3c795d5b866aa3667609 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Thu, 21 Mar 2024 10:27:09 +0100
Subject: [PATCH 42/89] Address level 5 PHPStan issues
- Rolled back the tests on TypeErrors in the Idenity/Value tests. They
are not valuable enough, testing PHP's type system is not the sport we
are practicing.
- Added many Mockery MockInterface&ActualClass PHPDoc type hints
- Created the first 3 baseline entries of type hints that are not
fixable in our own code. And one array_map 'strtolower' warning that I
could not comprehend.
---
ci/qa/phpstan-baseline.neon | 9 ++++++
src/Surfnet/Stepup/Identity/Api/Identity.php | 1 +
.../Stepup/Identity/Entity/RecoveryToken.php | 3 +-
.../Value/ContactInformationTest.php | 27 -----------------
.../Configuration/Value/InstitutionTest.php | 24 ---------------
.../Configuration/Value/LocationTest.php | 30 -------------------
.../Configuration/Value/RaLocationIdTest.php | 25 ----------------
.../Value/RaLocationNameTest.php | 25 ----------------
.../Tests/Identity/Value/CommonNameTest.php | 24 ---------------
.../Identity/Value/ContactInformationTest.php | 28 -----------------
.../Identity/Value/DocumentNumberTest.php | 23 --------------
.../Stepup/Tests/Identity/Value/EmailTest.php | 23 --------------
.../Tests/Identity/Value/InstitutionTest.php | 26 ----------------
.../Tests/Identity/Value/LocationTest.php | 27 -----------------
.../Value/RegistrationAuthorityRoleTest.php | 27 -----------------
.../Tests/Identity/Value/TimeFrameTest.php | 29 ------------------
.../Exception/BadApiRequestException.php | 16 ++++------
.../Exception/BadCommandRequestException.php | 20 ++++---------
.../Identity/Projector/RaListingProjector.php | 5 ++--
...ConfigurationInstitutionParamConverter.php | 4 +--
.../Request/InstitutionParamConverter.php | 2 +-
...utionAuthorizationRepositoryFilterTest.php | 4 +--
.../CommandAuthorizationServiceTest.php | 6 ++++
.../Request/CommandParamConverterTest.php | 8 +++--
.../Request/InstitutionParamConverterTest.php | 13 +++-----
.../EventHandling/BufferedEventBusTest.php | 6 ++--
.../IdentityCommandHandlerMoveTokenTest.php | 4 +--
.../Tests/Pipeline/AuthorizingStageTest.php | 29 +++++++++++-------
.../Tests/Pipeline/DispatchStageTest.php | 7 +++--
.../Pipeline/EventDispatchingStageTest.php | 8 +++--
.../Tests/Pipeline/StagedPipelineTest.php | 16 ++++++----
.../Tests/Pipeline/ValidationStageTest.php | 9 ++++--
.../SensitiveDataMessageStreamTest.php | 11 +++----
.../Controller/ConfigurationController.php | 7 ++---
.../InstitutionConfigurationController.php | 4 +--
.../RightToBeForgottenController.php | 7 ++---
.../Controller/WhitelistController.php | 7 ++---
.../Service/TransactionHelper.php | 4 +--
38 files changed, 113 insertions(+), 435 deletions(-)
diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon
index 364905f71..f799efe3b 100644
--- a/ci/qa/phpstan-baseline.neon
+++ b/ci/qa/phpstan-baseline.neon
@@ -1,2 +1,11 @@
parameters:
ignoreErrors:
+ -
+ message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\Institution\\)\\: mixed\\)\\|null, 'strtolower' given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
+
+ -
+ message: "#^Parameter \\#2 \\$criteria of method Doctrine\\\\DBAL\\\\Connection\\:\\:delete\\(\\) expects array\\, array\\ given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
diff --git a/src/Surfnet/Stepup/Identity/Api/Identity.php b/src/Surfnet/Stepup/Identity/Api/Identity.php
index e79547d1e..f49ead61d 100644
--- a/src/Surfnet/Stepup/Identity/Api/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Api/Identity.php
@@ -19,6 +19,7 @@
namespace Surfnet\Stepup\Identity\Api;
use Broadway\Domain\AggregateRoot;
+use Broadway\EventSourcing\EventSourcedAggregateRoot;
use Surfnet\Stepup\Configuration\InstitutionConfiguration;
use Surfnet\Stepup\Exception\DomainException;
use Surfnet\Stepup\Helper\SecondFactorProvePossessionHelper;
diff --git a/src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php b/src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
index 826475928..0790f5096 100644
--- a/src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
+++ b/src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
@@ -18,6 +18,7 @@
namespace Surfnet\Stepup\Identity\Entity;
+use Broadway\EventSourcing\EventSourcedAggregateRoot;
use Broadway\EventSourcing\SimpleEventSourcedEntity;
use Surfnet\Stepup\Identity\Api\Identity;
use Surfnet\Stepup\Identity\Event\CompliedWithRecoveryCodeRevocationEvent;
@@ -37,7 +38,7 @@ final class RecoveryToken extends SimpleEventSourcedEntity
public static function create(
RecoveryTokenId $id,
RecoveryTokenType $type,
- Identity $identity,
+ Identity&EventSourcedAggregateRoot $identity,
): self {
$token = new self;
$token->tokenId = $id;
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
index 8d538678f..c6fac3bf1 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/ContactInformationTest.php
@@ -22,26 +22,12 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Configuration\Value\ContactInformation;
-use Surfnet\Stepup\Exception\InvalidArgumentException;
-use TypeError;
class ContactInformationTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProvider
- */
- public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
- {
- $this->expectException(TypeError::class);
- new ContactInformation($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -57,17 +43,4 @@ public function two_instances_with_the_same_value_are_equal(): void
$this->assertTrue($contactInformation->equals($theSameWithSpaces));
$this->assertFalse($contactInformation->equals($different));
}
-
- /**
- * dataprovider
- */
- public function invalidValueProvider(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
index 185d2fc1d..999341ebb 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
@@ -22,10 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Exception\InvalidArgumentException;
-use TypeError;
class InstitutionTest extends UnitTest
{
@@ -43,18 +41,6 @@ public function an_institution_cannot_be_created_with_anything_but_a_nonempty_st
new Institution($invalidValue);
}
- /**
- * @test
- * @group domain
- * @dataProvider nonStringOrNonEmptyStringProviderTypeError
- */
- public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
- int|float|StdClass|array $invalidValue,
- ): void {
- $this->expectException(TypeError::class);
- new Institution($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -78,14 +64,4 @@ public function nonStringOrNonEmptyStringProvider(): array
'blank string' => [' '],
];
}
-
- public function nonStringOrNonEmptyStringProviderTypeError(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
index 0f23c8686..a85043c1d 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/LocationTest.php
@@ -22,27 +22,12 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use stdClass;
use Surfnet\Stepup\Configuration\Value\Location;
-use Surfnet\Stepup\Exception\InvalidArgumentException;
-use TypeError;
class LocationTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider nonStringProvider
- */
- public function it_cannot_be_created_with_anything_but_a_string(bool|int|float|stdClass|array|null $nonString): void
- {
- $this->expectException(TypeError::class);
-
- new Location($nonString);
- }
-
/**
* @test
* @group domain
@@ -58,19 +43,4 @@ public function two_locations_with_the_same_value_are_equal(): void
$this->assertTrue($location->equals($theSameWithSpaces));
$this->assertFalse($location->equals($different));
}
-
- /**
- * dataprovider
- */
- public function nonStringProvider(): array
- {
- return [
- 'null' => [null],
- 'boolean' => [false],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new stdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
index fa1287ce0..4cc9b255b 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
@@ -23,10 +23,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as TestCase;
use Ramsey\Uuid\Uuid;
-use StdClass;
use Surfnet\Stepup\Configuration\Value\RaLocationId;
use Surfnet\Stepup\Exception\InvalidArgumentException;
-use TypeError;
class RaLocationIdTest extends TestCase
{
@@ -45,19 +43,6 @@ public function an_ra_location_id_cannot_be_created_with_anything_but_a_nonempty
new RaLocationId($nonStringOrEmptyString);
}
- /**
- * @test
- * @group domain
- * @dataProvider nonStringOrEmptyStringProviderTypeError
- */
- public function an_ra_location_id_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
- int|float|StdClass|array $errorValue,
- ): void {
- $this->expectException(TypeError::class);
-
- new RaLocationId($errorValue);
- }
-
/**
* @test
* @group domain
@@ -105,16 +90,6 @@ public function nonStringOrEmptyStringProvider(): array
];
}
- public function nonStringOrEmptyStringProviderTypeError(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
-
private function uuid(): string
{
return (string)Uuid::uuid4();
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
index 5c46c6aa4..5fdf4714c 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
@@ -22,10 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as TestCase;
-use StdClass;
use Surfnet\Stepup\Configuration\Value\RaLocationName;
use Surfnet\Stepup\Exception\InvalidArgumentException;
-use TypeError;
class RaLocationNameTest extends TestCase
{
@@ -44,19 +42,6 @@ public function an_ra_location_name_cannot_be_created_with_anything_but_a_nonemp
new RaLocationName($nonStringOrEmptyString);
}
- /**
- * @test
- * @group domain
- * @dataProvider nonStringOrEmptyStringProviderTypeError
- */
- public function an_ra_location_name_cannot_be_created_with_anything_but_a_nonempty_string_type_errors(
- int|float|StdClass|array $error,
- ): void {
- $this->expectException(TypeError::class);
-
- new RaLocationName($error);
- }
-
/**
* @test
* @group domain
@@ -88,14 +73,4 @@ public function nonStringOrEmptyStringProvider(): array
'blank string' => [' '],
];
}
-
- public function nonStringOrEmptyStringProviderTypeError(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
index b48fe4d70..7ca82305b 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
@@ -22,10 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\CommonName;
-use TypeError;
class CommonNameTest extends UnitTest
{
@@ -43,18 +41,6 @@ public function the_common_name_address_must_be_a_non_empty_string(string $inval
new CommonName($invalidValue);
}
- /**
- * @test
- * @group domain
- * @dataProvider invalidArgumentProviderTypeError
- */
- public function the_common_name_address_must_be_a_non_empty_string_type_error(int|float|StdClass|array $invalidValue): void
- {
- $this->expectException(TypeError::class);
-
- new CommonName($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -78,14 +64,4 @@ public function invalidArgumentProvider(): array
'blank string' => [' '],
];
}
-
- public function invalidArgumentProviderTypeError(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
index 0af33851f..63b0652af 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/ContactInformationTest.php
@@ -22,27 +22,12 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
-use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\ContactInformation;
-use TypeError;
class ContactInformationTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProvider
- */
- public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
- {
- $this->expectException(TypeError::class);
-
- new ContactInformation($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -58,17 +43,4 @@ public function two_instances_with_the_same_value_are_equal(): void
$this->assertTrue($contactInformation->equals($theSameWithSpaces));
$this->assertFalse($contactInformation->equals($different));
}
-
- /**
- * dataprovider
- */
- public function invalidValueProvider(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
index e9904c7e1..83d4e5d9a 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
@@ -22,10 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\DocumentNumber;
-use TypeError;
class DocumentNumberTest extends UnitTest
{
@@ -42,17 +40,6 @@ public function the_document_number_must_be_a_non_empty_string(string $invalidVa
new DocumentNumber($invalidValue);
}
- /**
- * @test
- * @group domain
- * @dataProvider invalidArgumentProviderTypeError
- */
- public function the_document_number_must_be_a_non_empty_string_type_error(int|float|StdClass|array $invalidValue): void
- {
- $this->expectException(TypeError::class);
- new DocumentNumber($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -75,14 +62,4 @@ public function invalidArgumentProvider(): array
'empty string' => [''],
];
}
-
- public function invalidArgumentProviderTypeError(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
index 1bd8dfbbd..14be0428d 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
@@ -22,10 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\Email;
-use TypeError;
class EmailTest extends UnitTest
{
@@ -42,17 +40,6 @@ public function the_email_address_must_be_a_non_empty_string(string $invalidValu
new Email($invalidValue);
}
- /**
- * @test
- * @group domain
- * @dataProvider invalidArgumentProviderTypeErrors
- */
- public function the_email_address_must_be_a_non_empty_string_invalid_types(int|float|StdClass|array $invalidValue): void
- {
- $this->expectException(TypeError::class);
- new Email($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -89,16 +76,6 @@ public function invalidArgumentProvider(): array
];
}
- public function invalidArgumentProviderTypeErrors(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
-
/**
* provider for {@see the_email_address_given_must_be_rfc_822_compliant()}
* This is by no means meant to be an exhaustive provider as we rely on PHP's filter_var for catching the invalid
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
index e03ba36df..3e32aeb58 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
@@ -22,26 +22,13 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\Institution;
-use TypeError;
class InstitutionTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProvider
- */
- public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string(
- int|float|StdClass|array $invalidValue,
- ): void {
- $this->expectException(TypeError::class);
- new Institution($invalidValue);
- }
/**
* @test
* @group domain
@@ -68,19 +55,6 @@ public function two_institutions_with_the_same_value_are_equal(): void
$this->assertTrue($institution->equals($different));
}
- /**
- * dataprovider
- */
- public function invalidValueProvider(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
-
/**
* dataprovider
*/
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
index 55844f2f6..931f9eec8 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/LocationTest.php
@@ -22,26 +22,12 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
-use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\Location;
-use TypeError;
class LocationTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProvider
- */
- public function it_cannot_be_created_with_anything_but_a_nonempty_string(int|float|StdClass|array $invalidValue,): void
- {
- $this->expectException(TypeError::class);
- new Location($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -57,17 +43,4 @@ public function two_locations_with_the_same_value_are_equal(): void
$this->assertTrue($location->equals($theSameWithSpaces));
$this->assertFalse($location->equals($different));
}
-
- /**
- * dataprovider
- */
- public function invalidValueProvider(): array
- {
- return [
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
index ea612aa2b..dad2c5e86 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/RegistrationAuthorityRoleTest.php
@@ -22,27 +22,12 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
-use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\RegistrationAuthorityRole;
-use TypeError;
class RegistrationAuthorityRoleTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProvider
- */
- public function it_cannot_be_created_with_anything_but_a_valid_role(float|StdClass|array $invalidValue): void
- {
- $this->expectException(TypeError::class);
-
- new RegistrationAuthorityRole($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -56,16 +41,4 @@ public function two_roles_with_the_same_value_are_equal(): void
$this->assertTrue($role->equals($theSame));
$this->assertFalse($role->equals($different));
}
-
- /**
- * dataprovider
- */
- public function invalidValueProvider(): array
- {
- return [
- 'array' => [[]],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
index fc868f883..bf137a49a 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
@@ -22,11 +22,8 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\Stepup\Exception\InvalidArgumentException;
use Surfnet\Stepup\Identity\Value\TimeFrame;
-use Throwable;
-use TypeError;
class TimeFrameTest extends UnitTest
{
@@ -44,18 +41,6 @@ public function it_cannot_be_given_an_non_positive_amount_of_seconds(int $invali
TimeFrame::ofSeconds($invalidValue);
}
- /**
- * @test
- * @group domain
- * @dataProvider invalidValueProviderOtherTypes
- */
- public function it_cannot_be_given_an_non_positive_amount_of_secondsOtherTypes(string|float|StdClass|array $invalidValue): void
- {
- $this->expectException(TypeError::class);
-
- TimeFrame::ofSeconds($invalidValue);
- }
-
/**
* @test
* @group domain
@@ -83,18 +68,4 @@ public function invalidValueProviderInt(): array
'negative int' => [-1],
];
}
-
- /**
- * dataprovider
- */
- public function invalidValueProviderOtherTypes(): array
- {
- return [
- 'empty string' => [''],
- 'string' => ['abc'],
- 'array' => [[]],
- 'float' => [2.123],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
index 7d247de8e..ad0e059dc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
@@ -18,22 +18,18 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Exception;
+use Throwable;
+
/**
* Thrown when a client provided invalid command input to the application.
*/
class BadApiRequestException extends RuntimeException
{
- /**
- * @param string[] $errors
- * @param string $message
- * @param int $code
- * @param Exception|null $previous
- */
public function __construct(
private readonly array $errors,
- $message = 'Invalid Request',
- $code = 0,
- Exception $previous = null,
+ string $message = 'Invalid Request',
+ int $code = 0,
+ ?Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
@@ -41,7 +37,7 @@ public function __construct(
/**
* @return string[]
*/
- public function getErrors()
+ public function getErrors(): array
{
return $this->errors;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
index 7a91f3b3a..01450bffb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
@@ -20,17 +20,14 @@
use Symfony\Component\Validator\ConstraintViolationInterface;
use Symfony\Component\Validator\ConstraintViolationListInterface;
+use Throwable;
/**
* Thrown when a client provided invalid command input to the application.
*/
class BadCommandRequestException extends RuntimeException
{
- /**
- * @param string $message
- * @return self
- */
- public static function withViolations($message, ConstraintViolationListInterface $violations): self
+ public static function withViolations(string $message, ConstraintViolationListInterface $violations): self
{
$violationStrings = self::convertViolationsToStrings($violations);
$message = sprintf('%s (%s)', $message, implode('; ', $violationStrings));
@@ -53,16 +50,11 @@ private static function convertViolationsToStrings(ConstraintViolationListInterf
return $violationStrings;
}
- /**
- * @param string[] $errors
- * @param string $message
- * @param int $code
- */
public function __construct(
private readonly array $errors,
- $message = 'JSON could not be reconstituted into valid object.',
- $code = 0,
- Exception $previous = null,
+ string $message = 'JSON could not be reconstituted into valid object.',
+ int $code = 0,
+ ?Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
@@ -70,7 +62,7 @@ public function __construct(
/**
* @return string[]
*/
- public function getErrors()
+ public function getErrors(): array
{
return $this->errors;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
index dfaca7205..51b74d97d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
@@ -223,9 +223,8 @@ public function applyAppointedAsRaEvent(AppointedAsRaEvent $event): void
foreach ($raListing as $listing) {
$listing->role = AuthorityRole::ra();
+ $this->raListingRepository->save($listing);
}
-
- $this->raListingRepository->save($raListing);
}
/**
@@ -240,9 +239,9 @@ public function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event): void
foreach ($raListing as $listing) {
$listing->role = AuthorityRole::raa();
+ $this->raListingRepository->save($listing);
}
- $this->raListingRepository->save($raListing);
}
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
index bc901b901..380fe1185 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
@@ -45,14 +45,14 @@ public function supports(ParamConverter $configuration): bool
*/
private function getInstitutionFromRequest(Request $request)
{
- $institution = $request->attributes->get(self::INSTITUTION, false);
+ $institution = $request->attributes->get(self::INSTITUTION);
$request->attributes->remove(self::INSTITUTION);
if (is_string($institution) && ($institution !== '' && $institution !== '0')) {
return $institution;
}
- $institution = $request->query->get(self::INSTITUTION, false);
+ $institution = $request->query->get(self::INSTITUTION);
$request->query->remove(self::INSTITUTION);
if (is_string($institution) && ($institution !== '' && $institution !== '0')) {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
index b4c5d7f74..d3acaa98c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/InstitutionParamConverter.php
@@ -30,7 +30,7 @@ class InstitutionParamConverter implements ParamConverterInterface
public function apply(Request $request, ParamConverter $configuration): bool
{
$query = $request->query;
- $institution = $query->get('institution', false);
+ $institution = $query->get('institution');
if (!is_string($institution)) {
throw new BadApiRequestException(['This API-call MUST include the institution as get parameter']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
index 72a6810f4..6269e4105 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
@@ -47,7 +47,7 @@ public function setUp(): void
->getMock();
$this->queryBuilder = new QueryBuilder($this->entityManager);
- $this->queryBuilder->from('institution', 'i');
+ $this->queryBuilder->from(InstitutionValue::class, 'i');
}
/**
@@ -73,7 +73,7 @@ public function a_querybuilder_object_is_filtered_with_an_institution_authorizat
);
$this->assertEquals(
- 'SELECT FROM institution i WHERE i.institution IN (:iacalias_institutions)',
+ sprintf('SELECT FROM %s i WHERE i.institution IN (:iacalias_institutions)', InstitutionValue::class),
$this->queryBuilder->getDQL(),
);
$this->assertEquals(1, $this->queryBuilder->getParameters()->count());
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index 5d89ca7c1..294913a12 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -35,6 +35,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\IdentityService;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\WhitelistService;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\RaExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfAsserted;
@@ -173,6 +174,7 @@ public function an_identity_should_be_able_to_execute_own_selfservice_commands(s
$actorId = new IdentityId('123');
$actorInstitution = new Institution('institution');
+ /** @var SelfServiceExecutable&AbstractCommand&MockInterface $command */
$command = m::mock($command);
$command->shouldReceive('getIdentityId')
->andReturn($actorId->getIdentityId());
@@ -205,6 +207,7 @@ public function an_identity_should_be_able_to_execute_configured_ra_commands(str
$actorId = new IdentityId('123');
$actorInstitution = new Institution('institution');
+ /** @var RaExecutable&AbstractCommand&MockInterface $command */
$command = m::mock($command);
if (property_exists($command, 'identityId')) {
$command->identityId = $actorId;
@@ -268,6 +271,7 @@ public function an_identity_should_be_able_to_execute_configured_ra_and_selfserv
$actorId = new IdentityId('123');
$actorInstitution = new Institution('institution');
+ /** @var RaExecutable&AbstractCommand&MockInterface $command */
$command = m::mock($command);
$command->shouldReceive('getRaInstitution')
->andReturn($actorInstitution->getInstitution());
@@ -324,6 +328,7 @@ public function an_identity_should_not_be_able_to_execute_someone_elses_selfserv
$actorId = new IdentityId('123');
$actorInstitution = new Institution('institution');
+ /** @var SelfServiceExecutable&AbstractCommand&MockInterface $command */
$command = m::mock($command);
$command->shouldReceive('getIdentityId')
->andReturn(new IdentityId('someone else'));
@@ -364,6 +369,7 @@ public function an_identity_should_be_able_to_execute_unconfigured_ra_commands(s
$actorId = new IdentityId('123');
$actorInstitution = new Institution('institution');
+ /** @var RaExecutable&AbstractCommand&MockInterface $command */
$command = m::mock($command);
$command->shouldReceive('getRaInstitution')
->andReturn($actorInstitution->getInstitution());
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
index d5ef74c05..9a6e6ecbe 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
@@ -31,7 +31,6 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Root\Command\Ns\QuuxCommand;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
class CommandParamConverterTest extends TestCase
{
@@ -47,10 +46,13 @@ public function it_validates_the_command_structure($commandJson): void
{
$this->expectException(BadCommandRequestException::class);
+ /** @var Request&MockInterface $request */
$request = m::mock(Request::class)
->shouldReceive('getContent')->with()->andReturn($commandJson)
->getMock();
- $configuration = m::mock('Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter');
+
+ /** @var ParamConverter&MockInterface $configuration */
+ $configuration = m::mock(ParamConverter::class);
$converter = new CommandParamConverter();
$converter->apply($request, $configuration);
@@ -71,7 +73,7 @@ public function it_can_convert_command_name_notation($expectedCommandClass, stri
->shouldReceive('getContent')->with()->andReturn(json_encode($command))
->getMock();
- /** @var ParameterBag $attributes */
+ /** @var ParameterBag&MockInterface $attributes */
$attributes = m::mock()
->shouldReceive('set')->with('command', m::type($expectedCommandClass))
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
index 19597b425..35da5e046 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
@@ -22,6 +22,7 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as UnitTest;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Exception\BadApiRequestException;
use Surfnet\StepupMiddleware\ApiBundle\Request\InstitutionParamConverter;
@@ -32,20 +33,14 @@ class InstitutionParamConverterTest extends UnitTest
{
use MockeryPHPUnitIntegration;
- /**
- * @var MockInterface&Request
- */
- private $request;
+ private MockInterface&Request $request;
- /**
- * @var MockInterface
- */
- private $paramConverterConfig;
+ private MockInterface&ParamConverter $paramConverterConfig;
public function setUp(): void
{
$this->request = m::mock(Request::class);
- $this->paramConverterConfig = m::mock('Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter');
+ $this->paramConverterConfig = m::mock(ParamConverter::class);
}
/**
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
index fc4d28f14..2ea525393 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
@@ -41,6 +41,7 @@ class BufferedEventBusTest extends TestCase
public function it_buffers_events(): void
{
$event = $this->createDummyDomainMessage(null);
+ /** @var EventListener&MockInterface $listener */
$listener = m::mock(EventListener::class)
->shouldNotHaveReceived('handle')
->getMock();
@@ -61,6 +62,7 @@ public function it_buffers_events(): void
public function it_flushes_events(): void
{
$event = $this->createDummyDomainMessage(null);
+ /** @var EventListener&MockInterface $listener */
$listener = m::mock(EventListener::class)
->shouldReceive('handle')->once()->with($event)
->getMock();
@@ -83,6 +85,7 @@ public function it_flushes_events(): void
public function flushing_succesfully_empties_the_buffer_to_prevent_flushing_the_same_event_twice(): void
{
$event = $this->createDummyDomainMessage(null);
+ /** @var EventListener&MockInterface $listener */
$listener = m::mock(EventListener::class)
->shouldReceive('handle')->once()->with($event)
->getMock();
@@ -124,9 +127,6 @@ public function an_event_caused_by_an_event_in_the_current_buffer_being_flushed_
$this->assertEquals($expectedEventSequence, $actualEventSequence);
}
- /**
- * @return DomainMessage
- */
private function createDummyDomainMessage(?string $payload): DomainMessage
{
return new DomainMessage('1', 0, new Metadata(), $payload, DateTime::fromString('1970-01-01H00:00:00.000'));
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
index b379e7eba..14ed8ae17 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
@@ -810,12 +810,12 @@ public function test_can_not_be_moved_if_token_type_not_allowed_for_institution(
->then([
new SecondFactorMigratedToEvent(
$targetRegistrantId,
- $sourceRegistrantNameId,
- $targetRegistrantNameId,
+ $sourceRegistrantInstitution,
$targetRegistrantInstitution,
$sourceRegistrantSecFacId,
$targetRegistrantSecFacId,
new SecondFactorType('yubikey'),
+ $sourceYubikeySecFacId,
),
]);
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
index 7b9238f9f..4ad5e6c7f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
@@ -23,7 +23,7 @@
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as UnitTest;
use Psr\Log\NullLogger;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\ManagementExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\RaExecutable;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfServiceExecutable;
@@ -53,7 +53,7 @@ public function setUp(): void
*/
public function when_a_command_has_no_marker_interface_authorization_is_granted_by_default(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
$this->authorizationChecker->shouldNotHaveReceived('isGranted');
$authorizingStage = new AuthorizingStage($this->logger, $this->authorizationChecker);
@@ -72,7 +72,8 @@ public function a_command_with_a_marker_interface_triggers_a_check_for_the_corre
string $interface,
string $role,
): void {
- $command = m::mock('Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command, ' . $interface);
+ /** @var MockInterface&AbstractCommand $command */
+ $command = m::mock(AbstractCommand::class . ', ' . $interface);
$this->authorizationChecker
->shouldReceive('isGranted')
->once()
@@ -92,11 +93,15 @@ public function a_command_with_a_marker_interface_triggers_a_check_for_the_corre
*/
public function when_a_command_implements_multiple_marker_interfaces_at_least_one_corresponding_role_is_required(): void
{
+ /** @var AbstractCommand&SelfServiceExecutable&RaExecutable&ManagementExecutable&MockInterface $command */
$command = m::mock(
- 'Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command, '
- . 'Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfServiceExecutable, '
- . 'Surfnet\StepupMiddleware\CommandHandlingBundle\Command\RaExecutable, '
- . ManagementExecutable::class,
+ sprintf(
+ "%s, %s, %s, %s",
+ AbstractCommand::class,
+ SelfServiceExecutable::class,
+ RaExecutable::class,
+ ManagementExecutable::class
+ )
);
$this->authorizationChecker
@@ -129,9 +134,13 @@ public function when_the_client_does_not_have_the_required_role_an_forbidden_exc
{
$this->expectException(ForbiddenException::class);
+ /** @var AbstractCommand&SelfServiceExecutable&MockInterface $command */
$command = m::mock(
- 'Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command, '
- . SelfServiceExecutable::class,
+ sprintf(
+ "%s, %s",
+ AbstractCommand::class,
+ SelfServiceExecutable::class,
+ )
);
$this->authorizationChecker
@@ -144,7 +153,7 @@ public function when_the_client_does_not_have_the_required_role_an_forbidden_exc
$authorizingStage->process($command);
- $this->assertInstanceOf($authorizingStage, AuthorizingStage::class);
+ $this->assertInstanceOf(AuthorizingStage::class, $authorizingStage);
}
public function interfaceToRoleMappingProvider(): array
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/DispatchStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/DispatchStageTest.php
index 94473ded5..9d75430f7 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/DispatchStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/DispatchStageTest.php
@@ -21,9 +21,11 @@
use Broadway\CommandHandling\CommandBus;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\DispatchStage;
class DispatchStageTest extends TestCase
@@ -36,7 +38,8 @@ class DispatchStageTest extends TestCase
*/
public function it_dispatches_commands(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
+ /** @var CommandBus&MockInterface $commandBus */
$commandBus = m::mock(CommandBus::class)->makePartial()
->shouldReceive('dispatch')->once()->with($command)->andReturnNull()
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/EventDispatchingStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/EventDispatchingStageTest.php
index c36755072..c6fa4d44e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/EventDispatchingStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/EventDispatchingStageTest.php
@@ -20,9 +20,10 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as UnitTest;
use Psr\Log\NullLogger;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\EventDispatchingStage;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Command\FixedUuidStubCommand;
@@ -37,7 +38,8 @@ class EventDispatchingStageTest extends UnitTest
*/
public function buffered_event_bus_flush_is_called_during_process(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
+ /** @var BufferedEventBus&MockInterface $eventBus */
$eventBus = m::mock(BufferedEventBus::class)
->shouldReceive('flush')->once()
->getMock();
@@ -56,7 +58,7 @@ public function it_returns_the_same_command_as_it_processes_unmodified(): void
{
$command = new FixedUuidStubCommand();
$uuid = $command->UUID;
-
+ /** @var BufferedEventBus&MockInterface $eventBus */
$eventBus = m::mock(BufferedEventBus::class)
->shouldReceive('flush')->once()
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/StagedPipelineTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/StagedPipelineTest.php
index 5f6ca1bff..d3b791345 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/StagedPipelineTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/StagedPipelineTest.php
@@ -20,9 +20,10 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Stage;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\StagedPipeline;
@@ -36,7 +37,8 @@ class StagedPipelineTest extends TestCase
*/
public function it_passes_a_command_through_a_single_stage(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
+ /** @var Stage&MockInterface $stage */
$stage = m::mock(Stage::class)
->shouldReceive('process')->once()->with($command)->andReturn($command)
->getMock();
@@ -53,10 +55,12 @@ public function it_passes_a_command_through_a_single_stage(): void
*/
public function it_passes_a_command_through_multiple_stages(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
+ /** @var Stage&MockInterface $stage1 */
$stage1 = m::mock(Stage::class)
->shouldReceive('process')->once()->with($command)->andReturn($command)
->getMock();
+ /** @var Stage&MockInterface $stage2 */
$stage2 = m::mock(Stage::class)
->shouldReceive('process')->once()->with($command)->andReturn($command)
->getMock();
@@ -74,11 +78,13 @@ public function it_passes_a_command_through_multiple_stages(): void
*/
public function it_passes_the_command_returned_from_an_earlier_stage_on_to_the_next(): void
{
- $command1 = m::mock(Command::class);
- $command2 = m::mock(Command::class);
+ $command1 = m::mock(AbstractCommand::class);
+ $command2 = m::mock(AbstractCommand::class);
+ /** @var Stage&MockInterface $stage1 */
$stage1 = m::mock(Stage::class)
->shouldReceive('process')->once()->with($command1)->andReturn($command2)
->getMock();
+ /** @var Stage&MockInterface $stage2 */
$stage2 = m::mock(Stage::class)
->shouldReceive('process')->once()->with($command2)->andReturn($command2)
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
index c0fd0f831..c8e24da65 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/ValidationStageTest.php
@@ -21,9 +21,10 @@
use ArrayIterator;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Exception\InvalidCommandException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\ValidationStage;
use Symfony\Component\Validator\ConstraintViolationListInterface;
@@ -39,10 +40,11 @@ class ValidationStageTest extends TestCase
*/
public function it_validates_commands(): void
{
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
$violations = m::mock(ConstraintViolationListInterface::class)
->shouldReceive('count')->with()->andReturn(0)
->getMock();
+ /** @var ValidatorInterface&MockInterface $validator */
$validator = m::mock(ValidatorInterface::class)
->shouldReceive('validate')->once()->with($command)->andReturn($violations)
->getMock();
@@ -60,11 +62,12 @@ public function it_throws_an_exception_when_validation_fails(): void
{
$this->expectException(InvalidCommandException::class);
- $command = m::mock(Command::class);
+ $command = m::mock(AbstractCommand::class);
$violations = m::mock(ConstraintViolationListInterface::class);
$violations->allows()->count()->andReturn(1);
$violations->allows()->getIterator()->andReturn(new ArrayIterator())->getMock();
+ /** @var ValidatorInterface&MockInterface $validator */
$validator = m::mock(ValidatorInterface::class)
->shouldReceive('validate')->once()->with($command)->andReturn($violations)
->getMock();
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
index 0afae9ff7..490cd8f8e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
@@ -24,6 +24,7 @@
use Broadway\Domain\Metadata;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as TestCase;
use Surfnet\Stepup\Identity\Value\CommonName;
use Surfnet\Stepup\Identity\Value\Email;
@@ -269,11 +270,11 @@ public function it_fails_when_stream_ids_dont_match(): void
*/
public function it_can_forget_all_sensitive_data(): void
{
- $sensitiveDataMessageStream = new SensitiveDataMessageStream([
- m::mock(SensitiveDataMessage::class)
- ->shouldReceive('forget')->once()
- ->getMock(),
- ]);
+ /** @var MockInterface&SensitiveDataMessage $command */
+ $command = m::mock(SensitiveDataMessage::class)
+ ->shouldReceive('forget')->once()
+ ->getMock();
+ $sensitiveDataMessageStream = new SensitiveDataMessageStream([$command]);
$sensitiveDataMessageStream->forget();
$this->assertInstanceOf(SensitiveDataMessageStream::class, $sensitiveDataMessageStream);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index f1570a612..f1bd3941e 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -20,7 +20,7 @@
use DateTime;
use Ramsey\Uuid\Uuid;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\UpdateConfigurationCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\TransactionAwarePipeline;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -43,10 +43,7 @@ public function update(Request $request)
return $this->handleCommand($request, $command);
}
- /**
- * @return JsonResponse
- */
- private function handleCommand(Request $request, Command $command): JsonResponse
+ private function handleCommand(Request $request, AbstractCommand $command): JsonResponse
{
$this->pipeline->process($command);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
index d3e5f4edf..7418963fd 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
@@ -29,7 +29,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\InstitutionAuthorizationService;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\InstitutionConfigurationOptionsService;
use Surfnet\StepupMiddleware\ApiBundle\Exception\BadCommandRequestException;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\ReconfigureInstitutionConfigurationOptionsCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\ForbiddenException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\TransactionAwarePipeline;
@@ -159,7 +159,7 @@ public function reconfigure(Request $request): JsonResponse
}
/**
- * @param Command[] $commands
+ * @param AbstractCommand[] $commands
* @throws Exception
*/
private function handleCommands(array $commands): void
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
index d5fffe23f..9c3556499 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
@@ -24,7 +24,7 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\IdentityService;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\ForgetIdentityCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\TransactionAwarePipeline;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -71,10 +71,7 @@ public function forgetIdentity(Request $request)
return $this->handleCommand($request, $command);
}
- /**
- * @return JsonResponse
- */
- private function handleCommand(Request $request, Command $command): JsonResponse
+ private function handleCommand(Request $request, AbstractCommand $command): JsonResponse
{
$this->pipeline->process($command);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
index 0df7fc1dd..132de9931 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
@@ -22,7 +22,7 @@
use Ramsey\Uuid\Uuid;
use Surfnet\Stepup\Helper\JsonHelper;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\WhitelistService;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\ForbiddenException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\AddToWhitelistCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\RemoveFromWhitelistCommand;
@@ -88,10 +88,7 @@ public function showWhitelist(): JsonResponse
return new JsonResponse(['institutions' => $entries->getValues()]);
}
- /**
- * @return JsonResponse
- */
- private function handleCommand(Request $request, Command $command): JsonResponse
+ private function handleCommand(Request $request, AbstractCommand $command): JsonResponse
{
try {
$this->pipeline->process($command);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
index 4e7f73854..9764ce1ec 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/TransactionHelper.php
@@ -18,7 +18,7 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command as MiddlewareCommand;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\EventHandling\BufferedEventBus;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Pipeline;
@@ -47,7 +47,7 @@ public function rollback(): void
$this->connection->rollBack();
}
- public function process(MiddlewareCommand $command): MiddlewareCommand
+ public function process(AbstractCommand $command): AbstractCommand
{
return $this->pipeline->process($command);
}
From 807ca93dfd0024a17a613e4eebc9d93a30899ea8 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Mon, 25 Mar 2024 14:27:48 +0100
Subject: [PATCH 43/89] Address PHPStan 6 findings
Note that the warnings about missing array type specifications have been
added to the baseline. Adding quite a lot of new entries for this level.
The additional time it would cost to investigate and set them all would
be great. And we need to keep things economically viable..
---
ci/qa/phpstan-baseline.neon | 2017 ++++++++++++++++-
composer.json | 4 +-
composer.lock | 61 +-
.../Migrations/Version20141125173004.php | 4 +-
.../Migrations/Version20141209150426.php | 4 +-
.../Migrations/Version20141210174213.php | 2 +-
.../Migrations/Version20150508085838.php | 2 +-
.../Migrations/Version20150522163053.php | 2 +-
.../Migrations/Version20150522164907.php | 2 +-
.../Migrations/Version20150528154959.php | 2 +-
.../Migrations/Version20150615114646.php | 6 +-
.../Migrations/Version20180131150800.php | 2 +-
.../Migrations/Version20200114161618.php | 2 +-
.../Migrations/Version20220519134637.php | 2 +-
.../Migrations/Version20221102143350.php | 2 +-
.../Configuration/Api/Configuration.php | 1 -
.../Event/ConfigurationEvent.php | 9 +-
.../Event/ConfigurationUpdatedEvent.php | 15 +-
.../Event/EmailTemplatesUpdatedEvent.php | 9 +-
.../Event/IdentityProvidersUpdatedEvent.php | 9 +-
.../InstitutionConfigurationRemovedEvent.php | 14 +-
...ewInstitutionConfigurationCreatedEvent.php | 66 +-
.../Event/RaLocationAddedEvent.php | 45 +-
...LocationContactInformationChangedEvent.php | 25 +-
.../Event/RaLocationRelocatedEvent.php | 25 +-
.../Event/RaLocationRemovedEvent.php | 18 +-
.../Event/RaLocationRenamedEvent.php | 25 +-
.../Event/ServiceProvidersUpdatedEvent.php | 9 +-
.../Configuration/Event/SraaUpdatedEvent.php | 9 +-
.../InstitutionConfiguration.php | 69 +-
.../Value/AllowedSecondFactorList.php | 12 +-
.../Value/ContactInformation.php | 7 -
.../Configuration/Value/Institution.php | 2 +-
.../Value/InstitutionAuthorizationOption.php | 18 +-
.../Value/InstitutionConfigurationId.php | 8 +-
.../Configuration/Value/InstitutionRole.php | 29 +-
.../Configuration/Value/InstitutionSet.php | 8 +-
.../Stepup/Configuration/Value/Location.php | 7 -
.../Value/NumberOfTokensPerIdentityOption.php | 12 +-
.../Configuration/Value/RaLocationId.php | 5 +-
.../Configuration/Value/RaLocationList.php | 3 +
.../Configuration/Value/RaLocationName.php | 2 +-
.../Value/SelfAssertedTokensOption.php | 5 +-
.../Configuration/Value/SelfVetOption.php | 5 +-
.../Value/ShowRaaContactInformationOption.php | 16 +-
.../Configuration/Value/SsoOn2faOption.php | 5 +-
.../Value/UseRaLocationsOption.php | 22 +-
.../Configuration/Value/VerifyEmailOption.php | 16 +-
src/Surfnet/Stepup/DateTime/DateTime.php | 6 +-
.../Stepup/Exception/JsonException.php | 2 +-
src/Surfnet/Stepup/Helper/JsonHelper.php | 6 +-
.../Stepup/Helper/UserDataFormatter.php | 2 +-
src/Surfnet/Stepup/Identity/Api/Id.php | 2 +-
src/Surfnet/Stepup/Identity/Api/Identity.php | 7 +-
.../Stepup/Identity/AuditLog/Metadata.php | 14 +-
.../Collection/InstitutionCollection.php | 3 +
.../Collection/VettingTypeHintCollection.php | 2 +-
.../Identity/Entity/ConfigurableSettings.php | 2 +-
.../Entity/UnverifiedSecondFactor.php | 7 +-
.../Identity/Entity/VerifiedSecondFactor.php | 6 +-
.../Identity/Event/AppointedAsRaEvent.php | 12 +-
.../AppointedAsRaForInstitutionEvent.php | 25 +-
.../Identity/Event/AppointedAsRaaEvent.php | 12 +-
.../AppointedAsRaaForInstitutionEvent.php | 19 +-
...ompliedWithRecoveryCodeRevocationEvent.php | 24 +-
.../Event/CompliedWithRevocationEvent.php | 39 +-
.../Identity/Event/EmailVerifiedEvent.php | 57 +-
.../GssfPossessionProvenAndVerifiedEvent.php | 67 +-
.../Event/GssfPossessionProvenEvent.php | 68 +-
.../Event/IdentityAccreditedAsRaEvent.php | 41 +-
...ntityAccreditedAsRaForInstitutionEvent.php | 60 +-
.../Event/IdentityAccreditedAsRaaEvent.php | 54 +-
...tityAccreditedAsRaaForInstitutionEvent.php | 63 +-
.../Identity/Event/IdentityCreatedEvent.php | 41 +-
.../Event/IdentityEmailChangedEvent.php | 17 +-
.../Stepup/Identity/Event/IdentityEvent.php | 14 +-
.../Identity/Event/IdentityForgottenEvent.php | 8 +
.../Identity/Event/IdentityRenamedEvent.php | 17 +-
.../InstitutionsAddedToWhitelistEvent.php | 10 +-
.../InstitutionsRemovedFromWhitelistEvent.php | 10 +-
.../Event/LocalePreferenceExpressedEvent.php | 17 +-
.../PhonePossessionProvenAndVerifiedEvent.php | 59 +-
.../Event/PhonePossessionProvenEvent.php | 57 +-
...honeRecoveryTokenPossessionProvenEvent.php | 52 +-
.../Event/RecoveryTokenRevokedEvent.php | 17 +-
...rationAuthorityInformationAmendedEvent.php | 31 +-
...yInformationAmendedForInstitutionEvent.php | 39 +-
.../RegistrationAuthorityRetractedEvent.php | 31 +-
...nAuthorityRetractedForInstitutionEvent.php | 41 +-
...etRecoveryTokenPossessionPromisedEvent.php | 34 +-
.../Event/SecondFactorMigratedEvent.php | 78 +-
.../Event/SecondFactorMigratedToEvent.php | 49 +-
.../Event/SecondFactorRevokedEvent.php | 31 +-
.../Event/SecondFactorVettedEvent.php | 73 +-
...torVettedWithoutTokenProofOfPossession.php | 73 +-
...DevicePossessionProvenAndVerifiedEvent.php | 59 +-
.../Event/U2fDevicePossessionProvenEvent.php | 57 +-
.../VettedSecondFactorsAllRevokedEvent.php | 6 +
.../Event/VettingTypeHintsSavedEvent.php | 22 +-
.../Identity/Event/WhitelistCreatedEvent.php | 10 +-
.../Identity/Event/WhitelistReplacedEvent.php | 10 +-
...ubikeyPossessionProvenAndVerifiedEvent.php | 64 +-
.../Event/YubikeyPossessionProvenEvent.php | 65 +-
.../YubikeySecondFactorBootstrappedEvent.php | 8 +
src/Surfnet/Stepup/Identity/Identity.php | 8 +-
.../Stepup/Identity/Value/CommonName.php | 5 +-
.../Identity/Value/ContactInformation.php | 3 -
src/Surfnet/Stepup/Identity/Value/Email.php | 5 +-
src/Surfnet/Stepup/Identity/Value/GssfId.php | 4 +-
.../Stepup/Identity/Value/IdentityId.php | 6 +-
.../Stepup/Identity/Value/Institution.php | 2 +-
src/Surfnet/Stepup/Identity/Value/Locale.php | 14 +-
.../Stepup/Identity/Value/Location.php | 3 -
src/Surfnet/Stepup/Identity/Value/NameId.php | 10 +-
.../Stepup/Identity/Value/PhoneNumber.php | 8 +-
.../Stepup/Identity/Value/RecoveryTokenId.php | 6 +-
.../Value/RecoveryTokenIdentifier.php | 8 +-
.../Identity/Value/RecoveryTokenType.php | 8 +-
.../Value/RegistrationAuthorityRole.php | 4 +-
.../Stepup/Identity/Value/SafeStore.php | 2 +-
.../Stepup/Identity/Value/SecondFactorId.php | 6 +-
.../Identity/Value/SecondFactorIdentifier.php | 1 -
.../Stepup/Identity/Value/StepupProvider.php | 4 +-
.../Stepup/Identity/Value/TimeFrame.php | 3 +-
.../Stepup/Identity/Value/U2fKeyHandle.php | 8 +-
.../Stepup/Identity/Value/VettingTypeHint.php | 2 +-
.../Stepup/Identity/Value/YubikeyPublicId.php | 6 +-
.../InstitutionConfigurationTest.php | 4 +-
.../Value/AllowedSecondFactorListTest.php | 20 +-
.../Value/InstitutionSetTest.php | 2 +
.../ShowRaaContactInformationOptionTest.php | 25 -
.../Value/UseRaLocationsOptionTest.php | 26 +-
.../Stepup/Tests/Helper/JsonHelperTest.php | 13 -
...stitutionAuthorizationRepositoryFilter.php | 17 +-
.../Service/AuthorizationService.php | 2 +-
.../Service/CommandAuthorizationService.php | 2 +-
...stitutionAuthorizationContextInterface.php | 4 +-
.../Value/InstitutionRoleSet.php | 2 +-
.../Value/InstitutionRoleSetInterface.php | 2 +-
.../Entity/AllowedSecondFactor.php | 4 +-
.../Entity/ConfiguredInstitution.php | 2 +-
.../Entity/InstitutionAuthorization.php | 6 +-
.../InstitutionConfigurationOptions.php | 16 +-
.../Configuration/Entity/RaLocation.php | 16 +-
.../Configuration/Query/RaLocationQuery.php | 6 +-
.../AllowedSecondFactorRepository.php | 3 +
.../ConfiguredInstitutionRepository.php | 3 +
.../InstitutionAuthorizationRepository.php | 7 +-
...titutionConfigurationOptionsRepository.php | 3 +
.../Repository/RaLocationRepository.php | 5 +-
.../AllowedSecondFactorListService.php | 4 +-
.../Service/AllowedSecondFactorMap.php | 2 +-
.../InstitutionAuthorizationService.php | 2 +-
...InstitutionConfigurationOptionsService.php | 6 +-
.../Service/RaLocationService.php | 2 +-
.../Controller/AuditLogController.php | 2 +-
.../Controller/AuthorizationController.php | 6 +-
.../Controller/DeprovisionController.php | 1 -
.../Controller/IdentityController.php | 11 +-
...titutionConfigurationOptionsController.php | 4 +-
.../Controller/ProfileController.php | 2 +-
.../Controller/RaCandidateController.php | 2 +-
.../Controller/RaListingController.php | 6 +-
.../Controller/RaSecondFactorController.php | 2 +-
.../Controller/RecoveryTokenController.php | 4 +-
.../ApiBundle/Controller/SraaController.php | 5 +-
.../UnverifiedSecondFactorController.php | 4 +-
.../VerifiedSecondFactorController.php | 8 +-
.../VettedSecondFactorController.php | 4 +-
.../Controller/VettingTypeHintController.php | 2 +-
.../DependencyInjection/Configuration.php | 2 +-
.../Doctrine/Type/AuthorityRoleType.php | 4 +-
.../Doctrine/Type/CommonNameType.php | 4 +-
.../ConfigurationContactInformationType.php | 2 +-
.../Type/ConfigurationInstitutionType.php | 4 +-
.../Type/ConfigurationLocationType.php | 4 +-
.../Doctrine/Type/ContactInformationType.php | 4 +-
.../ApiBundle/Doctrine/Type/DateTimeType.php | 2 +-
.../ApiBundle/Doctrine/Type/EmailType.php | 4 +-
.../Doctrine/Type/InstitutionRoleType.php | 4 +-
.../Doctrine/Type/InstitutionType.php | 4 +-
.../ApiBundle/Doctrine/Type/LocaleType.php | 4 +-
.../ApiBundle/Doctrine/Type/LocationType.php | 4 +-
.../ApiBundle/Doctrine/Type/NameIdType.php | 4 +-
.../Type/NumberOfTokensPerIdentityType.php | 4 +-
.../Doctrine/Type/RaLocationNameType.php | 4 +-
.../Doctrine/Type/SecondFactorTypeType.php | 4 +-
.../Type/SelfAssertedTokensOptionType.php | 6 +-
.../Doctrine/Type/SelfVetOptionType.php | 6 +-
.../ShowRaaContactInformationOptionType.php | 6 +-
.../Doctrine/Type/SsoOn2faOptionType.php | 6 +-
.../Type/UseRaLocationsOptionType.php | 6 +-
.../Doctrine/Type/VerifyEmailOptionType.php | 6 +-
.../EventListener/ExceptionListener.php | 2 +-
.../Identity/Entity/AuditLogEntry.php | 20 +-
.../ApiBundle/Identity/Entity/Identity.php | 2 +-
.../ApiBundle/Identity/Entity/RaListing.php | 6 +-
.../Identity/Entity/RaSecondFactor.php | 59 +-
.../Entity/SecondFactorRevocation.php | 2 +-
.../Identity/Entity/VettedSecondFactor.php | 4 +-
.../Identity/Projector/AuditLogProjector.php | 13 +-
.../Identity/Projector/RaListingProjector.php | 4 +-
.../Projector/RaSecondFactorProjector.php | 1 -
.../Projector/SecondFactorProjector.php | 4 +-
.../Query/UnverifiedSecondFactorQuery.php | 2 +-
.../Repository/AuditLogRepository.php | 3 +
.../Repository/AuthorizationRepository.php | 1 +
.../Repository/IdentityRepository.php | 31 +-
...titySelfAssertedTokenOptionsRepository.php | 3 +
.../InstitutionListingRepository.php | 2 +
.../Repository/RaCandidateRepository.php | 7 +-
.../Repository/RaListingRepository.php | 8 +-
.../Repository/RaSecondFactorRepository.php | 5 +-
.../Repository/RecoveryTokenRepository.php | 9 +-
.../SecondFactorRevocationRepository.php | 3 +
.../Identity/Repository/SraaRepository.php | 8 +-
.../UnverifiedSecondFactorRepository.php | 5 +-
.../VerifiedSecondFactorRepository.php | 7 +-
.../VettedSecondFactorRepository.php | 5 +-
.../Repository/VettingTypeHintRepository.php | 3 +
.../Repository/WhitelistEntryRepository.php | 7 +-
.../Service/AbstractSearchService.php | 5 +-
.../Identity/Service/AuditLogService.php | 3 +-
.../Identity/Service/IdentityService.php | 12 +-
.../Identity/Service/ProfileService.php | 3 -
.../Identity/Service/RaCandidateService.php | 3 +-
.../Identity/Service/RaListingService.php | 6 +-
.../Service/RaSecondFactorService.php | 3 +-
.../Identity/Service/RecoveryTokenService.php | 3 +
.../Identity/Service/SecondFactorService.php | 19 +-
.../Identity/Service/SraaService.php | 6 -
.../Identity/Service/WhitelistService.php | 9 +-
.../Specification/SpecificationInterface.php | 3 -
.../Identity/Value/AuthorityRole.php | 4 +-
.../ApiBundle/Identity/Value/Profile.php | 5 +-
.../RegistrationAuthorityCredentials.php | 4 +-
.../Identity/Value/SecondFactorStatus.php | 6 +-
.../Value/VerifiedTokenInformation.php | 44 +-
...ConfigurationInstitutionParamConverter.php | 2 +-
.../ApiBundle/Resources/config/projection.yml | 2 +-
.../Response/JsonCollectionResponse.php | 12 +-
.../JsonBasicAuthenticationEntryPoint.php | 2 +-
.../AuthorizationContextServiceTest.php | 21 +-
.../Service/AuthorizationServiceTest.php | 32 +-
.../CommandAuthorizationServiceTest.php | 2 +-
.../InstitutionAuthorizationServiceTest.php | 11 +-
...itutionConfigurationOptionsServiceTest.php | 2 +-
...onfigurationContactInformationTypeTest.php | 3 +-
.../Type/ConfigurationInstitutionTypeTest.php | 3 +-
.../Type/ConfigurationLocationTypeTest.php | 3 +-
.../Doctrine/Type/DocumentNumberTypeTest.php | 3 +-
.../NumberOfTokensPerIdentityTypeTest.php | 3 +-
.../Doctrine/Type/RaLocationNameTypeTest.php | 3 +-
.../Doctrine/Type/SelfVetOptionTypeTest.php | 5 +-
...howRaaContactInformationOptionTypeTest.php | 3 +-
.../Type/UseRaLocationsOptionTypeTest.php | 3 +-
.../Type/VerifyEmailOptionTypeTest.php | 3 +-
.../Projector/AuditLogProjectorTest.php | 6 +-
.../AuthorizedInstitutionCollectionTest.php | 5 +-
.../Request/CommandParamConverterTest.php | 8 +-
.../Request/InstitutionParamConverterTest.php | 2 +-
.../Tests/Service/DeprovisionServiceTest.php | 20 +-
.../ApiBundle/Tests/TestDataProvider.php | 3 +
.../Command/Metadata.php | 4 +-
...InstitutionConfigurationOptionsCommand.php | 14 +-
.../ConfigurationCommandHandler.php | 2 +-
.../DependencyInjection/Configuration.php | 4 +-
.../Dto/VettingLocation.php | 5 -
.../EventHandling/BufferedEventBus.php | 3 +-
.../MetadataEnrichingEventStreamDecorator.php | 4 +-
.../SecondFactorNotAllowedException.php | 3 +-
.../Exception/DuplicateIdentityException.php | 4 +-
.../CommandHandler/IdentityCommandHandler.php | 4 +-
.../RegistrationAuthorityCommandHandler.php | 2 -
.../Service/EmailVerificationMailService.php | 5 +-
.../Service/RecoveryTokenMailService.php | 8 +-
.../Service/RegistrationMailService.php | 13 +-
.../SecondFactorRevocationMailService.php | 8 +-
.../Service/SecondFactorVettedMailService.php | 8 +-
.../Exception/InvalidCommandException.php | 4 +-
.../EmailVerificationEmailProcessor.php | 6 +-
.../EventSourcing/SensitiveDataMessage.php | 9 +-
.../SensitiveDataMessageStream.php | 3 +
...itutionConfigurationCommandHandlerTest.php | 12 +-
.../Tests/Mockery/HasInstitutionMatcher.php | 9 +-
.../Mockery/HasInstitutionMatcherTest.php | 15 +-
.../ObjectWithInstitutionAccessor.php | 4 +-
.../ObjectWithInstitutionProperty.php | 2 +-
.../Value/Institution.php | 2 +-
.../CommandHandlingBundle/Value/Sender.php | 14 +-
.../Entity/InstitutionConfiguration.php | 27 +-
.../GatewayBundle/Entity/SamlEntity.php | 8 +-
.../Entity/SamlEntityRepository.php | 7 +-
.../Projector/SecondFactorProjector.php | 9 +-
.../Projector/WhitelistProjector.php | 8 +-
.../InstitutionConfigurationRepository.php | 3 +
.../Repository/SecondFactorRepository.php | 5 +-
.../Repository/WhitelistEntryRepository.php | 7 +-
.../InstitutionConfigurationProjectorTest.php | 7 +-
.../Configuration/Entity/EmailTemplate.php | 14 +-
.../Repository/EmailTemplateRepository.php | 5 +-
.../Service/EmailTemplateService.php | 2 +-
.../Controller/ConfigurationController.php | 2 +-
.../RightToBeForgottenController.php | 4 +-
.../Controller/WhitelistController.php | 8 +-
.../UnknownDBALConnectionException.php | 2 +-
.../Resources/config/services.yml | 3 -
.../Service/DBALConnectionHelper.php | 3 +-
.../ConfigurationControllerTest.php | 4 +-
...InstitutionConfigurationControllerTest.php | 5 +-
.../Validator/ConfigurationValidationTest.php | 6 +-
...nfigureInstitutionRequestValidatorTest.php | 8 +-
.../ManagementBundle/Validator/Assert.php | 10 +-
.../ConfigurationStructureValidator.php | 16 +-
.../ConfigurationValidatorInterface.php | 5 +-
.../HasValidConfigurationStructure.php | 2 +-
.../ValidReconfigureInstitutionsRequest.php | 2 +-
.../EmailTemplatesConfigurationValidator.php | 6 +-
.../GatewayConfigurationValidator.php | 35 +-
...IdentityProviderConfigurationValidator.php | 7 +-
...ReconfigureInstitutionRequestValidator.php | 15 +-
.../ServiceProviderConfigurationValidator.php | 18 +-
.../Command/MigrateSecondFactorCommand.php | 4 +-
.../Command/ReplaySpecificEventsCommand.php | 2 +-
.../EventSourcing/DBALEventHydrator.php | 11 +-
.../EventSourcing/EventCollection.php | 26 +-
.../EventSourcing/ProjectorCollection.php | 3 +
.../UnknownDBALConnectionException.php | 2 +-
.../InstitutionConfigurationState.php | 16 +-
.../Service/BootstrapCommandService.php | 62 +-
.../Service/DBALConnectionHelper.php | 7 +-
.../Service/EventStreamReplayer.php | 3 +-
.../Service/PastEventsService.php | 2 +-
...erifiedSecondFactorReminderMailService.php | 51 +-
.../EventSourcing/EventCollectionTest.php | 5 +-
...erifiedSecondFactorReminderServiceTest.php | 24 +-
.../AuthorizationRepositoryMatrixTest.php | 19 +-
337 files changed, 3376 insertions(+), 2658 deletions(-)
diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon
index f799efe3b..7d7761515 100644
--- a/ci/qa/phpstan-baseline.neon
+++ b/ci/qa/phpstan-baseline.neon
@@ -1,11 +1,2026 @@
parameters:
ignoreErrors:
-
- message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\Institution\\)\\: mixed\\)\\|null, 'strtolower' given\\.$#"
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20141125173004\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141125173004.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20141125173004\\:\\:getMiddlewareUser\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141125173004.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20141209150426\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141209150426.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20141209150426\\:\\:getMiddlewareUser\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141209150426.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20141210174213\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141210174213.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150522163053\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150522163053.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150522164907\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150522164907.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150615114646\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150615114646\\:\\:getMiddlewareSchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150615114646\\:\\:getMiddlewareUser\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20200114161618\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20200114161618.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20220519134637\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20220519134637.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20221102143350\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20221102143350.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Configuration\\\\Configuration\\:\\:\\$configuration type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\AllowedSecondFactorListUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/AllowedSecondFactorListUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\AllowedSecondFactorListUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/AllowedSecondFactorListUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ConfigurationUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$newConfiguration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ConfigurationUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$oldConfiguration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ConfigurationUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ConfigurationUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\EmailTemplatesUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$emailTemplates with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\EmailTemplatesUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\EmailTemplatesUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\IdentityProvidersUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$identityProviders with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\IdentityProvidersUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\IdentityProvidersUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\InstitutionConfigurationRemovedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\InstitutionConfigurationRemovedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NewConfigurationCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NewConfigurationCreatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NewConfigurationCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NewInstitutionConfigurationCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NewInstitutionConfigurationCreatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NumberOfTokensPerIdentityOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NumberOfTokensPerIdentityOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\NumberOfTokensPerIdentityOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/NumberOfTokensPerIdentityOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationAddedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationAddedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationContactInformationChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationContactInformationChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRelocatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRelocatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRemovedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRemovedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRenamedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\RaLocationRenamedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelectRaaOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelectRaaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelectRaaOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelectRaaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelfAssertedTokensOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelfAssertedTokensOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelfAssertedTokensOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelfAssertedTokensOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelfVetOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelfVetOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SelfVetOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SelfVetOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ServiceProvidersUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$serviceProviders with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ServiceProvidersUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ServiceProvidersUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ShowRaaContactInformationOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ShowRaaContactInformationOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ShowRaaContactInformationOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/ShowRaaContactInformationOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SraaUpdatedEvent\\:\\:__construct\\(\\) has parameter \\$sraaList with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SraaUpdatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SraaUpdatedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SsoOn2faOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SsoOn2faOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SsoOn2faOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/SsoOn2faOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaLocationsOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaLocationsOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaLocationsOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaLocationsOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaaOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\UseRaaOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/UseRaaOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\VerifyEmailOptionChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/VerifyEmailOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\VerifyEmailOptionChangedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Event/VerifyEmailOptionChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:__construct\\(\\) has parameter \\$allowedSecondFactors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:ofTypes\\(\\) has parameter \\$allowedSecondFactors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOption\\:\\:fromInstitutionConfig\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOption\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionRole\\:\\:\\$validRoles type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionSet\\:\\:toScalarArray\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationList\\:\\:__construct\\(\\) has parameter \\$raLocations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Helper\\\\JsonHelper\\:\\:\\$jsonErrors type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/JsonHelper.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\SecondFactorProvePossessionHelper\\:\\:__construct\\(\\) has parameter \\$skipProvePossessionSecondFactorTypes with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Helper\\\\SecondFactorProvePossessionHelper\\:\\:\\$skipProvePossessionSecondFactorTypes type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/SecondFactorProvePossessionHelper.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFilter\\:\\:filter\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFilter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFilterInterface\\:\\:filter\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFilterInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:format\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:format\\(\\) has parameter \\$userData with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:format\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:formatResponse\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:formatResponse\\(\\) has parameter \\$userData with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatter\\:\\:formatResponse\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatter.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatterInterface\\:\\:format\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatterInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatterInterface\\:\\:format\\(\\) has parameter \\$userData with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatterInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Helper\\\\UserDataFormatterInterface\\:\\:format\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Helper/UserDataFormatterInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:__construct\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:\\$elements type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:__construct\\(\\) has parameter \\$hints with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:\\$elements type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\InstitutionCollection\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
+
+ -
+ message: "#^Class Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection extends generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsAddedToWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsRemovedFromWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistReplacedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\EventSourcing\\\\IdentityRepository\\:\\:obtainInformation\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/EventSourcing/IdentityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\UnknownVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeFactory\\:\\:fromData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeFactory.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:institutionConfigurationEventsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:availableSecondFactorTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:differentAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:sameAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionHasInstitutionProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionSetComparisonProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationA with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationB with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:invalid_types_are_rejected_during_construction\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:the_has_institution_method_should_check_for_institutions\\(\\) has parameter \\$institutionList with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionConfigurationIdTest\\:\\:an_institution_configuration_id_cannot_be_created_from_something_other_than_a_string\\(\\) has parameter \\$nonStringOrEmptyString with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionConfigurationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:institutionTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:dirtyInstitutionListProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:factory_method_can_build_from_array_of_string_and_rejects_invalid_types\\(\\) has parameter \\$invalid with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationListTest\\:\\:getRaLocationsArray\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationNameTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\JsonHelperTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\UserDataFilterTest\\:\\:test_filtering_is_applied_with_expected_result\\(\\) has parameter \\$expectation with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Collection\\\\InstitutionCollectionTest\\:\\:getInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Entity\\\\ConfigurableSettingsTest\\:\\:localeVerifications\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Entity/ConfigurableSettingsTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:serializedDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\WhitelistEventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\CommonNameTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\DocumentNumberTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidEmailProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\GssfIdTest\\:\\:a_gssf_id_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\GssfIdTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\InstitutionTest\\:\\:invalidValueProviderInvalidString\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\PhoneNumberTest\\:\\:a_phone_number_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\PhoneNumberTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\StepupProviderTest\\:\\:a_stepup_provider_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\StepupProviderTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\TimeFrameTest\\:\\:invalidValueProviderInt\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:invalidFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:validFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:__construct\\(\\) has parameter \\$errorMessages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:denied\\(\\) has parameter \\$messages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:getErrorMessages\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:__construct\\(\\) has parameter \\$institutionRoles with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSetInterface\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\ConfiguredInstitution\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\RaLocation\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
+
+ -
+ message: "#^Parameter \\#1 \\$allowedSecondFactors of static method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:ofTypes\\(\\) expects array, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\AllowedSecondFactor given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Service\\\\InstitutionAuthorizationOptionMap\\:\\:fromInstitutionAuthorizations\\(\\) has parameter \\$institutionAuthorizations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\DateTimeType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\SecondFactorStatusType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\EventListener\\\\ExceptionListener\\:\\:createJsonErrorResponse\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadApiRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadCommandRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\AuditLogEntry\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\IdentitySelfAssertedTokenOptions\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\InstitutionListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaCandidate\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettingTypeHint.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:saveAll\\(\\) has parameter \\$entries with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedIdentityRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedInstitutionRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:findByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:listRasFor\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\SraaRepository\\:\\:saveAll\\(\\) has parameter \\$sraaList with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:getAll\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\AbstractSearchService\\:\\:createPaginatorFrom\\(\\) return type with generic class Pagerfanta\\\\Pagerfanta does not specify its types\\: T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) has parameter \\$raCandidate with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:searchUnpaginated\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RecoveryTokenService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Specification\\\\SpecificationInterface\\:\\:apply\\(\\) has parameter \\$entityRepository with generic class Doctrine\\\\ORM\\\\EntityRepository but does not specify its types\\: TEntityClass$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\AuthorizedInstitutionCollection\\:\\:getAuthorizations\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\Profile\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonAuthorizationResponse\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonAuthorizationResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$collection with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$paginator with generic class Pagerfanta\\\\Pagerfanta but does not specify its types\\: T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonNotFoundResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonNotFoundResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionService\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionServiceInterface\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionServiceInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Configuration\\\\Service\\\\InstitutionAuthorizationServiceTest\\:\\:buildAuthorizations\\(\\) has parameter \\$expectedInstitutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\ConfiguredInstitutionControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\SraaControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Identity\\\\Projector\\\\AuditLogProjectorTest\\:\\:auditable_events\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:convertibleCommandNames\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:invalidCommandJsonStructures\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+
+ -
+ message: "#^Property Symfony\\\\Component\\\\HttpFoundation\\\\Request\\:\\:\\$query \\(Symfony\\\\Component\\\\HttpFoundation\\\\InputBag\\\\) does not accept Mockery\\\\MockInterface&Symfony\\\\Component\\\\HttpFoundation\\\\ParameterBag\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$allowedSecondFactors type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selectRaaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Strict comparison using \\!\\=\\= between array\\{\\} and array\\{\\} will always evaluate to false\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\AddToWhitelistCommand\\:\\:\\$institutionsToBeAdded type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AddToWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\RemoveFromWhitelistCommand\\:\\:\\$institutionsToBeRemoved type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RemoveFromWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\ReplaceWhitelistCommand\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ReplaceWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\SaveVettingTypeHintCommand\\:\\:\\$hints type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandler\\:\\:mapArrayToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRaLocations\\(\\) has parameter \\$raLocations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRas\\(\\) has parameter \\$ras with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:__construct\\(\\) has parameter \\$locales with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:collectionFrom\\(\\) has parameter \\$hints with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\AuthorizingStage\\:\\:clientHasAtLeastOneRole\\(\\) has parameter \\$rolesToCheck with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:mapViolationsToErrorStrings\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:getAllowlist\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$newConfiguration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$oldConfiguration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createUpdateCommand\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\IdentityCommandHandlerMoveTokenTest\\:\\:setUpInstitutionConfiguration\\(\\) has parameter \\$allowedTokenTypes with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:has_institution_matcher_only_matches_objects_against_a_given_institution\\(\\) has parameter \\$nonObject with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonObjectProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Pipeline\\\\AuthorizingStageTest\\:\\:interfaceToRoleMappingProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$domainMessages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$sensitiveDataMessages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:it_serialises_and_deserialises\\(\\) has parameter \\$getterExpectations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:sensitiveDataToSerialise\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Value\\\\InstitutionTest\\:\\:an_institution_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createIdentityProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createServiceProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllIdps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllOfType\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllSps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Controller\\\\WhitelistController\\:\\:getInstitutionsFromBody\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:\\$password type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:\\$passwordRo type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:\\$password type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:\\$passwordRo type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ConfigurationValidationTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ReconfigureInstitutionRequestValidatorTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$reconfigureRequest with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$optional with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$required with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateGatewayConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateSraaConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateAuthorizationSettings\\(\\) has parameter \\$authorizationSettings with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionConfigurationOptions\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionsExist\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:assertValidInstitutionIdentifiers\\(\\) has parameter \\$spLoaConfiguration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateAssertionConsumerUrls\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateListOfNameIdPatterns\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValues\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Console\\\\Command\\\\MigrateSecondFactorCommand\\:\\:tokenExists\\(\\) has parameter \\$targetSecondFactors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\DBALEventHydrator\\:\\:deserializeEvent\\(\\) has parameter \\$row with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\EventCollection\\:\\:select\\(\\) has parameter \\$subset with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/EventCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\ProjectorCollection\\:\\:selectByNames\\(\\) has parameter \\$projectorNames with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/ProjectorCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Migrations\\\\InstitutionConfiguration\\\\MappedInstitutionConfiguration\\:\\:__construct\\(\\) has parameter \\$raLocations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php
+
-
message: "#^Parameter \\#2 \\$criteria of method Doctrine\\\\DBAL\\\\Connection\\:\\:delete\\(\\) expects array\\, array\\ given\\.$#"
count: 2
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\SecondFactorDisplayNameResolverService\\:\\:__construct\\(\\) has parameter \\$secondFactors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/SecondFactorDisplayNameResolverService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Tests\\\\EventSourcing\\\\EventCollectionTest\\:\\:an_event_collection_must_be_created_from_an_array_of_non_empty_strings\\(\\) has parameter \\$emptyOrNonString with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
diff --git a/composer.json b/composer.json
index 751c9a5cc..446a54242 100644
--- a/composer.json
+++ b/composer.json
@@ -55,7 +55,8 @@
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3",
"twig/twig": "^3",
- "ext-pdo": "*"
+ "ext-pdo": "*",
+ "ext-openssl": "*"
},
"require-dev": {
"doctrine/data-fixtures": "~1.7",
@@ -70,6 +71,7 @@
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.5",
+ "rector/rector": "^1.0",
"sebastian/phpcpd": "^6.0",
"squizlabs/php_codesniffer": "^3.7",
"symfony/browser-kit": "6.4.*",
diff --git a/composer.lock b/composer.lock
index ba29dbfe0..e94f081b9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "d34c31554d9e3de69b068c92584b0496",
+ "content-hash": "4681103c3b1b653100a98769264006bb",
"packages": [
{
"name": "beberlei/assert",
@@ -10630,6 +10630,62 @@
],
"time": "2024-02-23T13:14:51+00:00"
},
+ {
+ "name": "rector/rector",
+ "version": "1.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/rectorphp/rector.git",
+ "reference": "c59507a9090b465d65e1aceed91e5b81986e375b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/rectorphp/rector/zipball/c59507a9090b465d65e1aceed91e5b81986e375b",
+ "reference": "c59507a9090b465d65e1aceed91e5b81986e375b",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2|^8.0",
+ "phpstan/phpstan": "^1.10.57"
+ },
+ "conflict": {
+ "rector/rector-doctrine": "*",
+ "rector/rector-downgrade-php": "*",
+ "rector/rector-phpunit": "*",
+ "rector/rector-symfony": "*"
+ },
+ "bin": [
+ "bin/rector"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Instant Upgrade and Automated Refactoring of any PHP code",
+ "keywords": [
+ "automation",
+ "dev",
+ "migration",
+ "refactoring"
+ ],
+ "support": {
+ "issues": "https://github.com/rectorphp/rector/issues",
+ "source": "https://github.com/rectorphp/rector/tree/1.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/tomasvotruba",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-14T15:04:18+00:00"
+ },
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
@@ -12158,7 +12214,8 @@
"php": "^8.2",
"ext-gmp": "*",
"ext-json": "*",
- "ext-pdo": "*"
+ "ext-pdo": "*",
+ "ext-openssl": "*"
},
"platform-dev": [],
"platform-overrides": {
diff --git a/src/Surfnet/Migrations/Version20141125173004.php b/src/Surfnet/Migrations/Version20141125173004.php
index 2167a800a..290c68db7 100644
--- a/src/Surfnet/Migrations/Version20141125173004.php
+++ b/src/Surfnet/Migrations/Version20141125173004.php
@@ -74,12 +74,12 @@ public function down(Schema $schema): void
$this->addSql(sprintf('DROP TABLE %s.saml_entity', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
- private function getMiddlewareUser()
+ private function getMiddlewareUser(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_middleware_user');
}
diff --git a/src/Surfnet/Migrations/Version20141209150426.php b/src/Surfnet/Migrations/Version20141209150426.php
index 810f65b95..5f2ae7161 100644
--- a/src/Surfnet/Migrations/Version20141209150426.php
+++ b/src/Surfnet/Migrations/Version20141209150426.php
@@ -64,12 +64,12 @@ public function down(Schema $schema): void
$this->addSql('DROP TABLE second_factor');
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
- private function getMiddlewareUser()
+ private function getMiddlewareUser(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_middleware_user');
}
diff --git a/src/Surfnet/Migrations/Version20141210174213.php b/src/Surfnet/Migrations/Version20141210174213.php
index 3739d3db7..963c8d7c8 100644
--- a/src/Surfnet/Migrations/Version20141210174213.php
+++ b/src/Surfnet/Migrations/Version20141210174213.php
@@ -47,7 +47,7 @@ public function down(Schema $schema): void
$this->addSql(sprintf('ALTER TABLE %s.second_factor ADD PRIMARY KEY (identity_id)', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20150508085838.php b/src/Surfnet/Migrations/Version20150508085838.php
index 6836d738f..9efbd5905 100644
--- a/src/Surfnet/Migrations/Version20150508085838.php
+++ b/src/Surfnet/Migrations/Version20150508085838.php
@@ -63,7 +63,7 @@ public function down(Schema $schema): void
/**
* @return string
*/
- private function getGatewaySchema()
+ private function getGatewaySchema(): string
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20150522163053.php b/src/Surfnet/Migrations/Version20150522163053.php
index 380eaedbe..23d780f15 100644
--- a/src/Surfnet/Migrations/Version20150522163053.php
+++ b/src/Surfnet/Migrations/Version20150522163053.php
@@ -57,7 +57,7 @@ public function down(Schema $schema): void
$this->addSql(sprintf('ALTER TABLE %s.saml_entity ADD PRIMARY KEY (entity_id)', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20150522164907.php b/src/Surfnet/Migrations/Version20150522164907.php
index dcb602be6..89037478b 100644
--- a/src/Surfnet/Migrations/Version20150522164907.php
+++ b/src/Surfnet/Migrations/Version20150522164907.php
@@ -56,7 +56,7 @@ public function down(Schema $schema): void
$this->addSql(sprintf('DROP INDEX unq_saml_entity_entity_id_type ON %s.saml_entity', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20150528154959.php b/src/Surfnet/Migrations/Version20150528154959.php
index bcc18022f..8aee83f11 100644
--- a/src/Surfnet/Migrations/Version20150528154959.php
+++ b/src/Surfnet/Migrations/Version20150528154959.php
@@ -54,7 +54,7 @@ public function down(Schema $schema): void
/**
* @return string
*/
- private function getGatewaySchema()
+ private function getGatewaySchema(): string
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20150615114646.php b/src/Surfnet/Migrations/Version20150615114646.php
index 1d505a301..9432111a1 100644
--- a/src/Surfnet/Migrations/Version20150615114646.php
+++ b/src/Surfnet/Migrations/Version20150615114646.php
@@ -75,17 +75,17 @@ public function down(Schema $schema): void
$this->addSql(sprintf('DROP TABLE %s.saml_entity', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
- private function getMiddlewareUser()
+ private function getMiddlewareUser(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_middleware_user');
}
- private function getMiddlewareSchema()
+ private function getMiddlewareSchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_middleware_name');
}
diff --git a/src/Surfnet/Migrations/Version20180131150800.php b/src/Surfnet/Migrations/Version20180131150800.php
index 7a01fd1b3..fd552cb7a 100644
--- a/src/Surfnet/Migrations/Version20180131150800.php
+++ b/src/Surfnet/Migrations/Version20180131150800.php
@@ -56,7 +56,7 @@ public function down(Schema $schema): void
/**
* @return string
*/
- private function getGatewaySchema()
+ private function getGatewaySchema(): string
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20200114161618.php b/src/Surfnet/Migrations/Version20200114161618.php
index c9a891dd5..2f306a1e3 100644
--- a/src/Surfnet/Migrations/Version20200114161618.php
+++ b/src/Surfnet/Migrations/Version20200114161618.php
@@ -63,7 +63,7 @@ public function down(Schema $schema): void
$this->throwIrreversibleMigrationException('This migration is irreversible');
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20220519134637.php b/src/Surfnet/Migrations/Version20220519134637.php
index 527b41dfe..4f84f603f 100644
--- a/src/Surfnet/Migrations/Version20220519134637.php
+++ b/src/Surfnet/Migrations/Version20220519134637.php
@@ -79,7 +79,7 @@ public function down(Schema $schema): void
$this->addSql(sprintf('ALTER TABLE %s.second_factor DROP identity_vetted', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Migrations/Version20221102143350.php b/src/Surfnet/Migrations/Version20221102143350.php
index c4fc668ae..35b33ce3f 100644
--- a/src/Surfnet/Migrations/Version20221102143350.php
+++ b/src/Surfnet/Migrations/Version20221102143350.php
@@ -48,7 +48,7 @@ public function down(Schema $schema): void
$this->addSql(sprintf('DROP TABLE %s.institution_configuration', $gatewaySchema));
}
- private function getGatewaySchema()
+ private function getGatewaySchema(): float|array|bool|int|string|null
{
return $this->container->getParameter('database_gateway_name');
}
diff --git a/src/Surfnet/Stepup/Configuration/Api/Configuration.php b/src/Surfnet/Stepup/Configuration/Api/Configuration.php
index 2857d3e6b..b14e39c83 100644
--- a/src/Surfnet/Stepup/Configuration/Api/Configuration.php
+++ b/src/Surfnet/Stepup/Configuration/Api/Configuration.php
@@ -28,7 +28,6 @@ interface Configuration extends AggregateRoot
public static function create(): Configuration;
/**
- * @param string $newConfiguration
* @return void
*/
public function update(string $newConfiguration): void;
diff --git a/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php b/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
index c62e3cdcf..b3ff80122 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ConfigurationEvent.php
@@ -24,17 +24,10 @@
abstract class ConfigurationEvent implements SerializableInterface
{
- /**
- * @var string
- */
public string $id;
- public function __construct($id)
+ public function __construct(string $id)
{
- if ($id !== Configuration::CONFIGURATION_ID) {
- throw new LogicException('Configuration Events must use the fixed Configuration::CONFIGURATION_ID as id');
- }
-
$this->id = $id;
}
}
diff --git a/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
index f5352c46f..4d3ed8f9f 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ConfigurationUpdatedEvent.php
@@ -20,27 +20,14 @@
class ConfigurationUpdatedEvent extends ConfigurationEvent
{
- /**
- * @var array
- */
- public array $newConfiguration;
-
- /**
- * @var array|null
- */
- public ?array $oldConfiguration;
-
/**
* @param string $id
* @param array $newConfiguration
* @param array|null $oldConfiguration
*/
- public function __construct($id, array $newConfiguration, array $oldConfiguration = null)
+ public function __construct($id, public array $newConfiguration, public ?array $oldConfiguration = null)
{
parent::__construct($id);
-
- $this->newConfiguration = $newConfiguration;
- $this->oldConfiguration = $oldConfiguration;
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
index 907050773..d01ebcd71 100644
--- a/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/EmailTemplatesUpdatedEvent.php
@@ -20,20 +20,13 @@
class EmailTemplatesUpdatedEvent extends ConfigurationEvent
{
- /**
- * @var array
- */
- public array $emailTemplates;
-
/**
* @param string $configurationId
* @param array $emailTemplates
*/
- public function __construct($configurationId, array $emailTemplates)
+ public function __construct($configurationId, public array $emailTemplates)
{
parent::__construct($configurationId);
-
- $this->emailTemplates = $emailTemplates;
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
index 08514bf77..4d77840e0 100644
--- a/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/IdentityProvidersUpdatedEvent.php
@@ -20,20 +20,13 @@
class IdentityProvidersUpdatedEvent extends ConfigurationEvent
{
- /**
- * @var array
- */
- public array $identityProviders;
-
/**
* @param string $configurationId
* @param array $identityProviders
*/
- public function __construct($configurationId, array $identityProviders)
+ public function __construct($configurationId, public array $identityProviders)
{
parent::__construct($configurationId);
-
- $this->identityProviders = $identityProviders;
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php b/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
index aba2495e0..3818087d6 100644
--- a/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/InstitutionConfigurationRemovedEvent.php
@@ -24,20 +24,8 @@
class InstitutionConfigurationRemovedEvent implements SerializableInterface
{
- /**
- * @var Institution
- */
- public Institution $institution;
-
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- public function __construct(InstitutionConfigurationId $institutionConfigurationId, Institution $institution)
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public Institution $institution)
{
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->institution = $institution;
}
/**
diff --git a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
index e85fe71ea..d4350ee85 100644
--- a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
@@ -35,70 +35,8 @@
*/
class NewInstitutionConfigurationCreatedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- /**
- * @var Institution
- */
- public Institution $institution;
- /**
- * @var UseRaLocationsOption
- */
- public UseRaLocationsOption $useRaLocationsOption;
-
- /**
- * @var ShowRaaContactInformationOption
- */
- public ShowRaaContactInformationOption $showRaaContactInformationOption;
-
- /**
- * @var VerifyEmailOption
- */
- public VerifyEmailOption $verifyEmailOption;
-
- /**
- * @var NumberOfTokensPerIdentityOption
- */
- public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption;
-
- /**
- * @var SelfVetOption
- */
- public SelfVetOption $selfVetOption;
-
- /**
- * @var SelfAssertedTokensOption
- */
- public SelfAssertedTokensOption $selfAssertedTokensOption;
-
- /**
- * @var SsoOn2faOption
- */
- public SsoOn2faOption $ssoOn2faOption;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- Institution $institution,
- UseRaLocationsOption $useRaLocationsOption,
- ShowRaaContactInformationOption $showRaaContactInformationOption,
- VerifyEmailOption $verifyEmailOption,
- NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption,
- SsoOn2faOption $ssoOn2faOption,
- SelfVetOption $selfVetOption,
- SelfAssertedTokensOption $selfAssertedTokensOption,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->institution = $institution;
- $this->useRaLocationsOption = $useRaLocationsOption;
- $this->showRaaContactInformationOption = $showRaaContactInformationOption;
- $this->verifyEmailOption = $verifyEmailOption;
- $this->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption;
- $this->ssoOn2faOption = $ssoOn2faOption;
- $this->selfVetOption = $selfVetOption;
- $this->selfAssertedTokensOption = $selfAssertedTokensOption;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public Institution $institution, public UseRaLocationsOption $useRaLocationsOption, public ShowRaaContactInformationOption $showRaaContactInformationOption, public VerifyEmailOption $verifyEmailOption, public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption, public SsoOn2faOption $ssoOn2faOption, public SelfVetOption $selfVetOption, public SelfAssertedTokensOption $selfAssertedTokensOption)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
index 7459b50ac..64627f6d6 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
@@ -28,49 +28,8 @@
class RaLocationAddedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- /**
- * @var Institution
- */
- public Institution $institution;
-
- /**
- * @var RaLocationId
- */
- public RaLocationId $raLocationId;
-
- /**
- * @var RaLocationName
- */
- public RaLocationName $raLocationName;
-
- /**
- * @var Location
- */
- public Location $location;
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- Institution $institution,
- RaLocationId $raLocationId,
- RaLocationName $raLocationName,
- Location $location,
- ContactInformation $contactInformation,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->institution = $institution;
- $this->raLocationId = $raLocationId;
- $this->raLocationName = $raLocationName;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public Institution $institution, public RaLocationId $raLocationId, public RaLocationName $raLocationName, public Location $location, public ContactInformation $contactInformation)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
index c3bcc3ff7..f8179e345 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
@@ -25,29 +25,8 @@
class RaLocationContactInformationChangedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- /**
- * @var RaLocationId
- */
- public RaLocationId $raLocationId;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- RaLocationId $raLocationId,
- ContactInformation $contactInformation,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->raLocationId = $raLocationId;
- $this->contactInformation = $contactInformation;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public ContactInformation $contactInformation)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
index 8a37c040d..b583e0b35 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
@@ -25,29 +25,8 @@
class RaLocationRelocatedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- /**
- * @var RaLocationId
- */
- public RaLocationId $raLocationId;
-
- /**
- * @var Location
- */
- public Location $location;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- RaLocationId $raLocationId,
- Location $location,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->raLocationId = $raLocationId;
- $this->location = $location;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public Location $location)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
index 2a2bf8eed..2784fbcfe 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRemovedEvent.php
@@ -25,27 +25,13 @@
class RaLocationRemovedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
/**
* @var Institution
*/
public Institution $institution;
- /**
- * @var RaLocationId
- */
- public RaLocationId $raLocationId;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- RaLocationId $raLocationId,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->raLocationId = $raLocationId;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
index 4d775a2bf..7fc9a32ba 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
@@ -25,29 +25,8 @@
class RaLocationRenamedEvent implements SerializableInterface
{
- /**
- * @var InstitutionConfigurationId
- */
- public InstitutionConfigurationId $institutionConfigurationId;
-
- /**
- * @var RaLocationId
- */
- public RaLocationId $raLocationId;
-
- /**
- * @var RaLocationName
- */
- public RaLocationName $raLocationName;
-
- public function __construct(
- InstitutionConfigurationId $institutionConfigurationId,
- RaLocationId $raLocationId,
- RaLocationName $raLocationName,
- ) {
- $this->institutionConfigurationId = $institutionConfigurationId;
- $this->raLocationId = $raLocationId;
- $this->raLocationName = $raLocationName;
+ public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public RaLocationName $raLocationName)
+ {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
index cbbf318da..e6a165466 100644
--- a/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/ServiceProvidersUpdatedEvent.php
@@ -20,20 +20,13 @@
class ServiceProvidersUpdatedEvent extends ConfigurationEvent
{
- /**
- * @var array
- */
- public array $serviceProviders;
-
/**
* @param string $configurationId
* @param array $serviceProviders
*/
- public function __construct($configurationId, array $serviceProviders)
+ public function __construct($configurationId, public array $serviceProviders)
{
parent::__construct($configurationId);
-
- $this->serviceProviders = $serviceProviders;
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
index 5d6c7ec2c..7c3d41502 100644
--- a/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/SraaUpdatedEvent.php
@@ -20,20 +20,13 @@
class SraaUpdatedEvent extends ConfigurationEvent
{
- /**
- * @var array
- */
- public array $sraaList;
-
/**
* @param string $configurationId
* @param array $sraaList
*/
- public function __construct($configurationId, array $sraaList)
+ public function __construct($configurationId, public array $sraaList)
{
parent::__construct($configurationId);
-
- $this->sraaList = $sraaList;
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
index f7fdae537..1c29b2156 100644
--- a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
@@ -75,81 +75,36 @@
*/
class InstitutionConfiguration extends EventSourcedAggregateRoot implements InstitutionConfigurationInterface
{
- /**
- * @var InstitutionConfigurationId
- */
private InstitutionConfigurationId $institutionConfigurationId;
- /**
- * @var Institution
- */
private Institution $institution;
private ?RaLocationList $raLocations = null;
- /**
- * @var UseRaLocationsOption
- */
private UseRaLocationsOption $useRaLocationsOption;
- /**
- * @var ShowRaaContactInformationOption
- */
private ShowRaaContactInformationOption $showRaaContactInformationOption;
- /**
- * @var VerifyEmailOption
- */
private VerifyEmailOption $verifyEmailOption;
- /**
- * @var NumberOfTokensPerIdentityOption
- */
private NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption;
- /**
- * @var SelfVetOption
- */
private SelfVetOption $selfVetOption;
- /**
- * @var SsoOn2faOption
- */
- private SsoOn2faOption $ssoOn2faOption;
+ private ?SsoOn2faOption $ssoOn2faOption = null;
- /**
- * @var SelfAssertedTokensOption
- */
- private SelfAssertedTokensOption $selfAssertedTokensOption;
+ private ?SelfAssertedTokensOption $selfAssertedTokensOption = null;
- /**
- * @var InstitutionAuthorizationOption
- */
- private InstitutionAuthorizationOption $useRaOption;
-
- /**
- * @var InstitutionAuthorizationOption
- */
+ private ?InstitutionAuthorizationOption $useRaOption = null;
- private InstitutionAuthorizationOption $useRaaOption;
+ private ?InstitutionAuthorizationOption $useRaaOption = null;
- /**
- * @var InstitutionAuthorizationOption
- */
- private InstitutionAuthorizationOption $selectRaaOption;
+ private ?InstitutionAuthorizationOption $selectRaaOption = null;
- /**
- * @var AllowedSecondFactorList
- */
- private AllowedSecondFactorList $allowedSecondFactorList;
+ private ?AllowedSecondFactorList $allowedSecondFactorList = null;
private ?bool $isMarkedAsDestroyed = null;
- /**
- * @param InstitutionConfigurationId $institutionConfigurationId
- * @param Institution $institution
- * @return InstitutionConfiguration
- */
public static function create(
InstitutionConfigurationId $institutionConfigurationId,
Institution $institution,
@@ -335,7 +290,7 @@ public function configureSelfVetOption(SelfVetOption $selfVetOption): void
public function configureSelfAssertedTokensOption(SelfAssertedTokensOption $selfAssertedTokensOption): void
{
- if ($this->selfAssertedTokensOption !== null &&
+ if ($this->selfAssertedTokensOption instanceof \Surfnet\Stepup\Configuration\Value\SelfAssertedTokensOption &&
$this->selfAssertedTokensOption->equals($selfAssertedTokensOption)
) {
return;
@@ -352,7 +307,7 @@ public function configureSelfAssertedTokensOption(SelfAssertedTokensOption $self
public function configureSsoOn2faOption(SsoOn2faOption $ssoOn2faOption): void
{
- if ($this->ssoOn2faOption !== null && $this->ssoOn2faOption->equals($ssoOn2faOption)) {
+ if ($this->ssoOn2faOption instanceof \Surfnet\Stepup\Configuration\Value\SsoOn2faOption && $this->ssoOn2faOption->equals($ssoOn2faOption)) {
return;
}
@@ -367,7 +322,7 @@ public function configureSsoOn2faOption(SsoOn2faOption $ssoOn2faOption): void
public function updateUseRaOption(InstitutionAuthorizationOption $useRaOption): void
{
- if ($this->useRaOption !== null
+ if ($this->useRaOption instanceof \Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption
&& $this->useRaOption->equals($useRaOption)
) {
return;
@@ -384,7 +339,7 @@ public function updateUseRaOption(InstitutionAuthorizationOption $useRaOption):
public function updateUseRaaOption(InstitutionAuthorizationOption $useRaaOption): void
{
- if ($this->useRaaOption !== null
+ if ($this->useRaaOption instanceof \Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption
&& $this->useRaaOption->equals($useRaaOption)
) {
return;
@@ -401,7 +356,7 @@ public function updateUseRaaOption(InstitutionAuthorizationOption $useRaaOption)
public function updateSelectRaaOption(InstitutionAuthorizationOption $selectRaaOption): void
{
- if ($this->selectRaaOption !== null
+ if ($this->selectRaaOption instanceof \Surfnet\Stepup\Configuration\Value\InstitutionAuthorizationOption
&& $this->selectRaaOption->equals($selectRaaOption)
) {
return;
@@ -419,7 +374,7 @@ public function updateSelectRaaOption(InstitutionAuthorizationOption $selectRaaO
public function updateAllowedSecondFactorList(AllowedSecondFactorList $allowedSecondFactorList): void
{
// AllowedSecondFactorList can be null for InstitutionConfigurations for which this functionality did not exist
- if ($this->allowedSecondFactorList !== null
+ if ($this->allowedSecondFactorList instanceof \Surfnet\Stepup\Configuration\Value\AllowedSecondFactorList
&& $this->allowedSecondFactorList->equals($allowedSecondFactorList)
) {
return;
diff --git a/src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php b/src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
index 30d6fd945..4c62fa56b 100644
--- a/src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
+++ b/src/Surfnet/Stepup/Configuration/Value/AllowedSecondFactorList.php
@@ -25,6 +25,9 @@
use JsonSerializable;
use Surfnet\StepupBundle\Value\SecondFactorType;
+/**
+ * @implements IteratorAggregate
+ */
final class AllowedSecondFactorList implements JsonSerializable, IteratorAggregate, SerializableInterface
{
/**
@@ -47,11 +50,7 @@ public static function blank(): self
return new self([]);
}
- /**
- * @param $allowedSecondFactors
- * @return AllowedSecondFactorList
- */
- public static function ofTypes($allowedSecondFactors): self
+ public static function ofTypes(array $allowedSecondFactors): self
{
return new self($allowedSecondFactors);
}
@@ -61,9 +60,6 @@ public function allows(SecondFactorType $secondFactor): bool
return $this->isBlank() || $this->contains($secondFactor);
}
- /**
- * @return bool
- */
public function isBlank(): bool
{
return $this->allowedSecondFactors === [];
diff --git a/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php b/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
index ff7c1fa8d..34c1ebc10 100644
--- a/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
+++ b/src/Surfnet/Stepup/Configuration/Value/ContactInformation.php
@@ -28,15 +28,8 @@ final class ContactInformation implements JsonSerializable, Stringable
{
private readonly string $contactInformation;
- /**
- * @param string $contactInformation
- */
public function __construct(string $contactInformation)
{
- if (!is_string($contactInformation)) {
- throw InvalidArgumentException::invalidType('string', 'contactInformation', $contactInformation);
- }
-
$this->contactInformation = trim($contactInformation);
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/Institution.php b/src/Surfnet/Stepup/Configuration/Value/Institution.php
index 9920d80e8..aad065a9a 100644
--- a/src/Surfnet/Stepup/Configuration/Value/Institution.php
+++ b/src/Surfnet/Stepup/Configuration/Value/Institution.php
@@ -33,7 +33,7 @@ final class Institution implements JsonSerializable, Stringable
*/
public function __construct(string $institution)
{
- if (!is_string($institution) || trim($institution) === '') {
+ if (trim($institution) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'institution', $institution);
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
index a7acf308d..ea9e71087 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionAuthorizationOption.php
@@ -35,23 +35,17 @@ private function __construct(
private readonly InstitutionSet $institutionSet,
bool $isDefault,
) {
- $this->isDefault = (bool)$isDefault;
+ $this->isDefault = $isDefault;
}
- public static function fromInstitutionConfig(InstitutionRole $role, $institutions = null): InstitutionAuthorizationOption
- {
+ public static function fromInstitutionConfig(
+ InstitutionRole $role,
+ ?array $institutions = null
+ ): InstitutionAuthorizationOption {
if (is_null($institutions)) {
return self::getDefault($role);
}
- if (!is_array($institutions)) {
- throw InvalidArgumentException::invalidType(
- 'array',
- 'institutions',
- $institutions,
- );
- }
-
array_walk(
$institutions,
function ($institution, $key) use ($institutions): void {
@@ -137,7 +131,7 @@ public function hasInstitution(Institution $institution, Institution $default):
{
$institutions = $this->getInstitutions($default);
$list = array_map(
- fn(Institution $institution) => $institution->getInstitution(),
+ fn(Institution $institution): string => $institution->getInstitution(),
$institutions,
);
return in_array($institution->getInstitution(), $list);
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
index 27cf86c22..702d5ef69 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionConfigurationId.php
@@ -31,7 +31,6 @@ final class InstitutionConfigurationId implements JsonSerializable, Stringable
/**
* @deprecated To be removed in next release; use normalizedFrom method to account for case-(in)sensitivity issues
- *
*/
public static function from(Institution $institution): self
{
@@ -43,9 +42,9 @@ public static function normalizedFrom(Institution $institution): self
return new self((string)Uuid::uuid5(self::UUID_NAMESPACE, strtolower($institution->getInstitution())));
}
- public function __construct($institutionConfigurationId)
+ public function __construct(string $institutionConfigurationId)
{
- if (!is_string($institutionConfigurationId) || trim($institutionConfigurationId) === '') {
+ if (trim($institutionConfigurationId) === '') {
throw InvalidArgumentException::invalidType(
'non-empty string',
'institutionConfigurationId',
@@ -69,9 +68,6 @@ public function equals(InstitutionConfigurationId $otherInstitutionConfiguration
return $this->institutionConfigurationId === $otherInstitutionConfigurationId->institutionConfigurationId;
}
- /**
- * @return string
- */
public function getInstitutionConfigurationId(): string
{
return $this->institutionConfigurationId;
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
index e528ca3b3..992011338 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionRole.php
@@ -33,43 +33,26 @@ final class InstitutionRole implements JsonSerializable, Stringable
self::ROLE_SELECT_RAA,
];
- /**
- * @var string
- */
- private string $type;
+ private readonly string $type;
- /**
- * InstitutionRole constructor.
- * @param $type
- */
- public function __construct($type)
+ public function __construct(string $type)
{
if (!in_array($type, self::$validRoles)) {
throw new InvalidArgumentException();
}
-
$this->type = $type;
}
- /**
- * @return InstitutionRole
- */
public static function useRa(): self
{
return new self(self::ROLE_USE_RA);
}
- /**
- * @return InstitutionRole
- */
public static function useRaa(): self
{
return new self(self::ROLE_USE_RAA);
}
- /**
- * @return InstitutionRole
- */
public static function selectRaa(): self
{
return new self(self::ROLE_SELECT_RAA);
@@ -77,12 +60,9 @@ public static function selectRaa(): self
public function equals(InstitutionRole $role): bool
{
- return $this->type == $role->getType();
+ return $this->type === $role->getType();
}
- /**
- * @return string
- */
public function getType(): string
{
return $this->type;
@@ -93,9 +73,6 @@ public function jsonSerialize(): string
return $this->type;
}
- /**
- * @return string
- */
public function __toString(): string
{
return $this->type;
diff --git a/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php b/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
index 1b99edb6a..ac697de4a 100644
--- a/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
+++ b/src/Surfnet/Stepup/Configuration/Value/InstitutionSet.php
@@ -1,5 +1,7 @@
location = trim($location);
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php b/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
index d19b18632..be205d30e 100644
--- a/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/NumberOfTokensPerIdentityOption.php
@@ -25,23 +25,15 @@ class NumberOfTokensPerIdentityOption implements JsonSerializable
{
public const DISABLED = 0;
- private int $numberOfTokensPerIdentity;
+ private readonly int $numberOfTokensPerIdentity;
public static function getDefault(): self
{
return new self(self::DISABLED);
}
- public function __construct($numberOfTokensPerIdentity)
+ public function __construct(int $numberOfTokensPerIdentity)
{
- if (!is_numeric($numberOfTokensPerIdentity)) {
- throw InvalidArgumentException::invalidType(
- 'integer',
- 'numberOfTokensPerIdentity',
- $numberOfTokensPerIdentity,
- );
- }
-
$this->numberOfTokensPerIdentity = $numberOfTokensPerIdentity;
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
index 798873c5a..59a5430e9 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationId.php
@@ -29,12 +29,9 @@ final class RaLocationId implements JsonSerializable, Stringable
{
private readonly string $raLocationId;
- /**
- * @param string $raLocationId
- */
public function __construct(string $raLocationId)
{
- if (!is_string($raLocationId) || trim($raLocationId) === '') {
+ if (trim($raLocationId) === '') {
throw InvalidArgumentException::invalidType(
'non-empty string',
'raLocationId',
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
index 0a092ec52..70fd31172 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationList.php
@@ -24,6 +24,9 @@
use Surfnet\Stepup\Configuration\Entity\RaLocation;
use Surfnet\Stepup\Exception\LogicException;
+/**
+ * @implements IteratorAggregate
+ */
final class RaLocationList implements IteratorAggregate
{
/**
diff --git a/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php b/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
index c44f371e5..3cb6572f6 100644
--- a/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
+++ b/src/Surfnet/Stepup/Configuration/Value/RaLocationName.php
@@ -30,7 +30,7 @@ final class RaLocationName implements JsonSerializable, Stringable
public function __construct(string $raLocationName)
{
- if (!is_string($raLocationName) || trim($raLocationName) === '') {
+ if (trim($raLocationName) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'raLocationName', $raLocationName);
}
diff --git a/src/Surfnet/Stepup/Configuration/Value/SelfAssertedTokensOption.php b/src/Surfnet/Stepup/Configuration/Value/SelfAssertedTokensOption.php
index 4165d131c..eb2afa458 100644
--- a/src/Surfnet/Stepup/Configuration/Value/SelfAssertedTokensOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/SelfAssertedTokensOption.php
@@ -27,8 +27,9 @@ public static function getDefault(): self
return new self(false);
}
- public function __construct(private bool $allowed)
- {
+ public function __construct(
+ private bool $allowed
+ ) {
}
public function equals(SelfAssertedTokensOption $other): bool
diff --git a/src/Surfnet/Stepup/Configuration/Value/SelfVetOption.php b/src/Surfnet/Stepup/Configuration/Value/SelfVetOption.php
index 6f5048623..7946a3a93 100644
--- a/src/Surfnet/Stepup/Configuration/Value/SelfVetOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/SelfVetOption.php
@@ -27,8 +27,9 @@ public static function getDefault(): self
return new self(false);
}
- public function __construct(private bool $selfVetOption)
- {
+ public function __construct(
+ private bool $selfVetOption
+ ) {
}
public function equals(SelfVetOption $other): bool
diff --git a/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php b/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
index 15ced7e13..fb791c3a7 100644
--- a/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/ShowRaaContactInformationOption.php
@@ -23,24 +23,16 @@
final class ShowRaaContactInformationOption implements JsonSerializable
{
- private readonly bool $showRaaContactInformationOption;
+
public static function getDefault(): self
{
return new self(true);
}
- public function __construct($showRaaContactInformationOption)
- {
- if (!is_bool($showRaaContactInformationOption)) {
- throw InvalidArgumentException::invalidType(
- 'boolean',
- 'showRaaContactInformationOption',
- $showRaaContactInformationOption,
- );
- }
-
- $this->showRaaContactInformationOption = $showRaaContactInformationOption;
+ public function __construct(
+ private readonly bool $showRaaContactInformationOption
+ ) {
}
public function equals(ShowRaaContactInformationOption $other): bool
diff --git a/src/Surfnet/Stepup/Configuration/Value/SsoOn2faOption.php b/src/Surfnet/Stepup/Configuration/Value/SsoOn2faOption.php
index 2b7e4eebf..cc529d77d 100644
--- a/src/Surfnet/Stepup/Configuration/Value/SsoOn2faOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/SsoOn2faOption.php
@@ -29,8 +29,9 @@ public static function getDefault(): self
return new self(false);
}
- public function __construct(private bool $ssoOn2faOption)
- {
+ public function __construct(
+ private bool $ssoOn2faOption
+ ) {
}
public function equals(SsoOn2faOption $other): bool
diff --git a/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php b/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
index e785c06a7..4d10a31ee 100644
--- a/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/UseRaLocationsOption.php
@@ -23,27 +23,14 @@
final class UseRaLocationsOption implements JsonSerializable
{
- private readonly bool $useRaLocationsOption;
-
- /**
- * @return UseRaLocationsOption
- */
public static function getDefault(): self
{
return new self(false);
}
- public function __construct($useRaLocationsOption)
- {
- if (!is_bool($useRaLocationsOption)) {
- throw InvalidArgumentException::invalidType(
- 'boolean',
- 'useRaLocationsOption',
- $useRaLocationsOption,
- );
- }
-
- $this->useRaLocationsOption = $useRaLocationsOption;
+ public function __construct(
+ private readonly bool $useRaLocationsOption
+ ) {
}
public function equals(UseRaLocationsOption $other): bool
@@ -51,9 +38,6 @@ public function equals(UseRaLocationsOption $other): bool
return $this->useRaLocationsOption === $other->useRaLocationsOption;
}
- /**
- * @return boolean
- */
public function isEnabled(): bool
{
return $this->useRaLocationsOption;
diff --git a/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php b/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
index f42f613dd..4422063f4 100644
--- a/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
+++ b/src/Surfnet/Stepup/Configuration/Value/VerifyEmailOption.php
@@ -23,24 +23,14 @@
final class VerifyEmailOption implements JsonSerializable
{
- private readonly bool $verifyEmailOption;
-
public static function getDefault(): self
{
return new self(true);
}
- public function __construct($verifyEmailOption)
- {
- if (!is_bool($verifyEmailOption)) {
- throw InvalidArgumentException::invalidType(
- 'boolean',
- 'verifyEmailOption',
- $verifyEmailOption,
- );
- }
-
- $this->verifyEmailOption = $verifyEmailOption;
+ public function __construct(
+ private readonly bool $verifyEmailOption
+ ) {
}
public function equals(VerifyEmailOption $other): bool
diff --git a/src/Surfnet/Stepup/DateTime/DateTime.php b/src/Surfnet/Stepup/DateTime/DateTime.php
index 00778cc8c..4a038ec1b 100644
--- a/src/Surfnet/Stepup/DateTime/DateTime.php
+++ b/src/Surfnet/Stepup/DateTime/DateTime.php
@@ -41,7 +41,7 @@ class DateTime implements Stringable
* @see DateTimeHelper::setCurrentTime here you can see how now can be overridden using reflection
* @var self|null
*/
- private static ?DateTime $now; // @phpstan-ignore-line PHPStan can not see that the DateTimeHelper is able to set the now value using reflection
+ private static ?DateTime $now = null;
private readonly CoreDateTime $dateTime;
@@ -60,10 +60,6 @@ public static function now(): DateTime
*/
public static function fromString(string $string): self
{
- if (!is_string($string)) {
- InvalidArgumentException::invalidType('string', 'dateTime', $string);
- }
-
$dateTime = CoreDateTime::createFromFormat(self::FORMAT, $string);
if ($dateTime === false) {
diff --git a/src/Surfnet/Stepup/Exception/JsonException.php b/src/Surfnet/Stepup/Exception/JsonException.php
index 4fb60f985..c454b8ebf 100644
--- a/src/Surfnet/Stepup/Exception/JsonException.php
+++ b/src/Surfnet/Stepup/Exception/JsonException.php
@@ -20,7 +20,7 @@
final class JsonException extends RuntimeException
{
- public static function withMessage($errorMessage): self
+ public static function withMessage(string $errorMessage): self
{
return new self(sprintf('Unable to parse JSON data: %s', $errorMessage));
}
diff --git a/src/Surfnet/Stepup/Helper/JsonHelper.php b/src/Surfnet/Stepup/Helper/JsonHelper.php
index 3e8cbf89b..02e2acf45 100644
--- a/src/Surfnet/Stepup/Helper/JsonHelper.php
+++ b/src/Surfnet/Stepup/Helper/JsonHelper.php
@@ -31,12 +31,8 @@ final class JsonHelper
JSON_ERROR_UTF8 => 'JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded',
];
- public static function decode($json)
+ public static function decode(string $json): mixed
{
- if (!is_string($json)) {
- throw InvalidArgumentException::invalidType('string', 'json', $json);
- }
-
$data = json_decode($json, true);
if (JSON_ERROR_NONE !== json_last_error()) {
diff --git a/src/Surfnet/Stepup/Helper/UserDataFormatter.php b/src/Surfnet/Stepup/Helper/UserDataFormatter.php
index 4e2d978cb..dc8b32bee 100644
--- a/src/Surfnet/Stepup/Helper/UserDataFormatter.php
+++ b/src/Surfnet/Stepup/Helper/UserDataFormatter.php
@@ -44,7 +44,7 @@ private function formatResponse(array $userData, array $errors): array
'data' => $userData,
];
- if (!empty($errors)) {
+ if ($errors !== []) {
$data['message'] = $errors;
$status = 'FAILED';
}
diff --git a/src/Surfnet/Stepup/Identity/Api/Id.php b/src/Surfnet/Stepup/Identity/Api/Id.php
index 09aad9efc..24ec29f17 100644
--- a/src/Surfnet/Stepup/Identity/Api/Id.php
+++ b/src/Surfnet/Stepup/Identity/Api/Id.php
@@ -25,7 +25,7 @@ interface Id
/**
* @throws InvalidArgumentException
*/
- public function __construct(mixed $value);
+ public function __construct(string $value);
/**
* @return string
diff --git a/src/Surfnet/Stepup/Identity/Api/Identity.php b/src/Surfnet/Stepup/Identity/Api/Identity.php
index f49ead61d..9027e291c 100644
--- a/src/Surfnet/Stepup/Identity/Api/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Api/Identity.php
@@ -101,7 +101,7 @@ public function provePossessionOfGssf(
GssfId $gssfId,
bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void;
/**
@@ -113,11 +113,10 @@ public function provePossessionOfU2fDevice(
U2fKeyHandle $keyHandle,
bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void;
/**
- * @param string $verificationNonce
* @return void
*/
public function verifyEmail(string $verificationNonce): void;
@@ -280,5 +279,5 @@ public function provePossessionOfPhoneRecoveryToken(
*/
public function promisePossessionOfSafeStoreSecretRecoveryToken(RecoveryTokenId $tokenId, SafeStore $secret): void;
- public function saveVettingTypeHints(Institution $institution, VettingTypeHintCollection $hints);
+ public function saveVettingTypeHints(Institution $institution, VettingTypeHintCollection $hints): void;
}
diff --git a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
index ebc62e980..2b965831b 100644
--- a/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
+++ b/src/Surfnet/Stepup/Identity/AuditLog/Metadata.php
@@ -39,20 +39,20 @@ final class Metadata
*/
public Institution $identityInstitution;
- public ?Institution $raInstitution;
+ public ?Institution $raInstitution = null;
- public ?SecondFactorId $secondFactorId;
+ public ?SecondFactorId $secondFactorId = null;
- public ?SecondFactorType $secondFactorType;
+ public ?SecondFactorType $secondFactorType = null;
/**
* @var SecondFactorIdentifier|null
*/
- public ?SecondFactorIdentifier $secondFactorIdentifier;
+ public ?SecondFactorIdentifier $secondFactorIdentifier = null;
- public ?VettingType $vettingType;
+ public ?VettingType $vettingType = null;
- public ?RecoveryTokenId $recoveryTokenId;
+ public ?RecoveryTokenId $recoveryTokenId = null;
- public ?RecoveryTokenType $recoveryTokenType;
+ public ?RecoveryTokenType $recoveryTokenType = null;
}
diff --git a/src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php b/src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
index afa841fb7..016765f9e 100644
--- a/src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+++ b/src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
@@ -26,6 +26,9 @@
use Surfnet\Stepup\Exception\RuntimeException;
use Surfnet\Stepup\Identity\Value\Institution;
+/**
+ * @implements IteratorAggregate
+ */
final class InstitutionCollection implements IteratorAggregate, JsonSerializable, SerializableInterface
{
private array $elements = [];
diff --git a/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php b/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
index 53f7c1042..640e1b746 100644
--- a/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
+++ b/src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
@@ -71,6 +71,6 @@ public function __toString(): string
public function serialize(): array
{
- return array_map(fn(VettingTypeHint $hint) => $hint->jsonSerialize(), $this->elements);
+ return array_map(fn(VettingTypeHint $hint): array => $hint->jsonSerialize(), $this->elements);
}
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php b/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
index 3ebab62d6..de692793d 100644
--- a/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
+++ b/src/Surfnet/Stepup/Identity/Entity/ConfigurableSettings.php
@@ -61,7 +61,7 @@ private function __construct(
* @throws Exception
* @throws Exception
*/
- public static function create($emailVerificationTimeFrame, array $locales): self
+ public static function create(int $emailVerificationTimeFrame, array $locales): self
{
return new self(
TimeFrame::ofSeconds($emailVerificationTimeFrame),
diff --git a/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
index 51c35f40c..3c9569364 100644
--- a/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
+++ b/src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
@@ -63,11 +63,7 @@ public static function create(
EmailVerificationWindow $emailVerificationWindow,
string $verificationNonce,
): self {
- if (!is_string($verificationNonce)) {
- throw InvalidArgumentException::invalidType('string', 'verificationNonce', $verificationNonce);
- }
-
- if (empty($verificationNonce)) {
+ if ($verificationNonce === '' || $verificationNonce === '0') {
throw new InvalidArgumentException("'verificationNonce' may not be empty");
}
@@ -92,7 +88,6 @@ public function getId(): ?SecondFactorId
}
/**
- * @param string $verificationNonce
* @return bool
*/
public function hasNonce(string $verificationNonce): bool
diff --git a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
index 2e7043d1c..478cc917b 100644
--- a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
+++ b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
@@ -67,10 +67,6 @@ public static function create(
DateTime $registrationRequestedAt,
string $registrationCode,
): self {
- if (!is_string($registrationCode)) {
- throw InvalidArgumentException::invalidType('string', 'registrationCode', $registrationCode);
- }
-
$secondFactor = new self;
$secondFactor->id = $id;
$secondFactor->identity = $identity;
@@ -111,7 +107,7 @@ public function canBeVettedNow(): bool
);
}
- public function vet($provePossessionSkipped, VettingType $type): void
+ public function vet(bool $provePossessionSkipped, VettingType $type): void
{
if ($provePossessionSkipped) {
$this->apply(
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
index 54e8895d9..d9f3bbd73 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
@@ -29,22 +29,21 @@
*/
class AppointedAsRaEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
'name_id',
];
- public NameId $nameId;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- NameId $nameId,
+ public NameId $nameId,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->nameId = $nameId;
}
public function getAuditLogMetadata(): Metadata
@@ -79,6 +78,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
index a1f9b27f8..5bfda2f8f 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
@@ -26,6 +26,9 @@
class AppointedAsRaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
@@ -33,26 +36,13 @@ class AppointedAsRaForInstitutionEvent extends IdentityEvent implements RightToO
'ra_institution',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var Institution
- */
- public Institution $raInstitution;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- NameId $nameId,
- Institution $raInstitution,
+ public NameId $nameId,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->nameId = $nameId;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -77,6 +67,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -93,6 +85,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
index 5f8de76c3..33a8bf8b5 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
@@ -29,22 +29,21 @@
*/
class AppointedAsRaaEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
'name_id',
];
- public NameId $nameId;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- NameId $nameId,
+ public NameId $nameId,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->nameId = $nameId;
}
public function getAuditLogMetadata(): Metadata
@@ -79,6 +78,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
index 3694fabb6..123a0255d 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
@@ -26,6 +26,9 @@
class AppointedAsRaaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
@@ -33,20 +36,13 @@ class AppointedAsRaaForInstitutionEvent extends IdentityEvent implements RightTo
'ra_institution',
];
- public NameId $nameId;
-
- public Institution $raInstitution;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- NameId $nameId,
- Institution $raInstitution,
+ public NameId $nameId,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->nameId = $nameId;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -71,6 +67,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -87,6 +85,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
index 631d76ce4..1d19efd39 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
@@ -28,17 +28,8 @@
class CompliedWithRecoveryCodeRevocationEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var IdentityId
+ * @var string[]
*/
- public IdentityId $authorityId;
- /**
- * @var RecoveryTokenId
- */
- public RecoveryTokenId $recoveryTokenId;
- /**
- * @var RecoveryTokenType
- */
- public RecoveryTokenType $recoveryTokenType;
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -49,15 +40,11 @@ class CompliedWithRecoveryCodeRevocationEvent extends IdentityEvent implements R
final public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- RecoveryTokenId $recoveryTokenId,
- RecoveryTokenType $recoveryTokenType,
- IdentityId $authorityId,
+ public RecoveryTokenId $recoveryTokenId,
+ public RecoveryTokenType $recoveryTokenType,
+ public IdentityId $authorityId,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->authorityId = $authorityId;
- $this->recoveryTokenId = $recoveryTokenId;
- $this->recoveryTokenType = $recoveryTokenType;
}
final public static function deserialize(array $data): self
@@ -103,6 +90,9 @@ final public function serialize(): array
];
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
index e79aa3fa2..235161a51 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
@@ -31,6 +31,9 @@
abstract class CompliedWithRevocationEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -39,40 +42,15 @@ abstract class CompliedWithRevocationEvent extends IdentityEvent implements Forg
'authority_id',
];
- /**
- * @var IdentityId
- */
- public IdentityId $authorityId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
final public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
- IdentityId $authorityId,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
+ public IdentityId $authorityId,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->authorityId = $authorityId;
- $this->secondFactorId = $secondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
}
public function getAuditLogMetadata(): Metadata
@@ -133,6 +111,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
index 618fef8b3..e3a0120c1 100644
--- a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
@@ -38,6 +38,9 @@ class EmailVerifiedEvent extends IdentityEvent implements
PossessionProvenAndVerified,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -50,36 +53,6 @@ class EmailVerifiedEvent extends IdentityEvent implements
'email',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var DateTime
- */
- public DateTime $registrationRequestedAt;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -97,23 +70,16 @@ class EmailVerifiedEvent extends IdentityEvent implements
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorType $secondFactorType,
private SecondFactorIdentifier $secondFactorIdentifier,
- DateTime $registrationRequestedAt,
+ public DateTime $registrationRequestedAt,
public string $registrationCode,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->registrationRequestedAt = $registrationRequestedAt;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -148,6 +114,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -184,6 +152,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
index da6455bc0..484d5b2e8 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
@@ -38,6 +38,9 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
PossessionProvenAndVerified,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -50,41 +53,6 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
'email',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var StepupProvider
- */
- public StepupProvider $stepupProvider;
-
- /**
- * @var GssfId
- */
- public GssfId $gssfId;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- /**
- * @var DateTime
- */
- public DateTime $registrationRequestedAt;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -93,7 +61,7 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param GssfId $gssfId
* @param CommonName $commonName
* @param Email $email
- * @param Locale $locale
+ * @param Locale $preferredLocale
* @param DateTime $registrationRequestedAt
* @param string $registrationCode
*
@@ -102,24 +70,16 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- StepupProvider $stepupProvider,
- GssfId $gssfId,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
+ public SecondFactorId $secondFactorId,
+ public StepupProvider $stepupProvider,
+ public GssfId $gssfId,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
+ public DateTime $registrationRequestedAt,
public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->stepupProvider = $stepupProvider;
- $this->gssfId = $gssfId;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $locale;
- $this->registrationRequestedAt = $registrationRequestedAt;
}
public function getAuditLogMetadata(): Metadata
@@ -157,6 +117,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -195,6 +157,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
index c8244c0f2..6a64ba7f3 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
@@ -35,6 +35,9 @@
class GssfPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -46,66 +49,26 @@ class GssfPossessionProvenEvent extends IdentityEvent implements Forgettable, Ri
'email',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var StepupProvider
- */
- public StepupProvider $stepupProvider;
-
- /**
- * @var GssfId
- */
- public GssfId $gssfId;
-
- /**
- * @var EmailVerificationWindow
- */
- public EmailVerificationWindow $emailVerificationWindow;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- StepupProvider $stepupProvider,
- GssfId $gssfId,
+ public SecondFactorId $secondFactorId,
+ public StepupProvider $stepupProvider,
+ public GssfId $gssfId,
public bool $emailVerificationRequired,
- EmailVerificationWindow $emailVerificationWindow,
+ public EmailVerificationWindow $emailVerificationWindow,
public string $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public CommonName $commonName,
+ public Email $email,
+ /**
+ * @var Locale Eg. "en_GB"
+ */
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->stepupProvider = $stepupProvider;
- $this->gssfId = $gssfId;
- $this->emailVerificationWindow = $emailVerificationWindow;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -143,6 +106,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -182,6 +147,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
index f236f3c60..1df5a9190 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
@@ -32,6 +32,9 @@
*/
class IdentityAccreditedAsRaEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -41,48 +44,23 @@ class IdentityAccreditedAsRaEvent extends IdentityEvent implements RightToObtain
'contact_information',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var RegistrationAuthorityRole
- */
- public RegistrationAuthorityRole $registrationAuthorityRole;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
/**
* @param IdentityId $identityId
* @param NameId $nameId
* @param Institution $institution
- * @param RegistrationAuthorityRole $role
+ * @param RegistrationAuthorityRole $registrationAuthorityRole
* @param Location $location
* @param ContactInformation $contactInformation
*/
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- RegistrationAuthorityRole $role,
- Location $location,
- ContactInformation $contactInformation,
+ public RegistrationAuthorityRole $registrationAuthorityRole,
+ public Location $location,
+ public ContactInformation $contactInformation,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->registrationAuthorityRole = $role;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
}
public function getAuditLogMetadata(): Metadata
@@ -123,6 +101,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
index 36235b5fe..71c9b0d03 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
@@ -29,6 +29,9 @@
class IdentityAccreditedAsRaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
+/**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -39,56 +42,16 @@ class IdentityAccreditedAsRaForInstitutionEvent extends IdentityEvent implements
'ra_institution',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var RegistrationAuthorityRole
- */
- public RegistrationAuthorityRole $registrationAuthorityRole;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
- /**
- * @var Institution
- */
- public Institution $raInstitution;
-
- /**
- * @param IdentityId $identityId
- * @param NameId $nameId
- * @param Institution $institution
- * @param RegistrationAuthorityRole $role
- * @param Location $location
- * @param ContactInformation $contactInformation
- * @param Institution $raInstitution
- */
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- RegistrationAuthorityRole $role,
- Location $location,
- ContactInformation $contactInformation,
- Institution $raInstitution,
+ public RegistrationAuthorityRole $registrationAuthorityRole,
+ public Location $location,
+ public ContactInformation $contactInformation,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->registrationAuthorityRole = $role;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -116,6 +79,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ * @return array
*/
public function serialize(): array
{
@@ -130,11 +94,17 @@ public function serialize(): array
];
}
+ /**
+ * @return array
+ */
public function obtainUserData(): array
{
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
index 3eee576bc..c3bfe3f1d 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
@@ -32,6 +32,10 @@
*/
class IdentityAccreditedAsRaaEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /** @var string[] */
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -41,48 +45,15 @@ class IdentityAccreditedAsRaaEvent extends IdentityEvent implements RightToObtai
'contact_information',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var RegistrationAuthorityRole
- */
- public RegistrationAuthorityRole $registrationAuthorityRole;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
- /**
- * @param IdentityId $identityId
- * @param NameId $nameId
- * @param Institution $institution
- * @param RegistrationAuthorityRole $role
- * @param Location $location
- * @param ContactInformation $contactInformation
- */
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- RegistrationAuthorityRole $role,
- Location $location,
- ContactInformation $contactInformation,
+ public RegistrationAuthorityRole $registrationAuthorityRole,
+ public Location $location,
+ public ContactInformation $contactInformation,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->registrationAuthorityRole = $role;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
}
public function getAuditLogMetadata(): Metadata
@@ -94,6 +65,9 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
+ /**
+ * @param array $data
+ */
public static function deserialize(array $data): self
{
return new self(
@@ -106,6 +80,9 @@ public static function deserialize(array $data): self
);
}
+ /**
+ * @return array
+ */
public function serialize(): array
{
return [
@@ -123,6 +100,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
index 775bdb563..00ea52dc7 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
@@ -29,6 +29,10 @@
class IdentityAccreditedAsRaaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /** @var string[] */
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -39,55 +43,16 @@ class IdentityAccreditedAsRaaForInstitutionEvent extends IdentityEvent implement
'ra_institution',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var RegistrationAuthorityRole
- */
- public RegistrationAuthorityRole $registrationAuthorityRole;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
- /**
- * @var Institution
- */
- public Institution $raInstitution;
-
- /**
- * @param IdentityId $identityId
- * @param NameId $nameId
- * @param Institution $institution
- * @param RegistrationAuthorityRole $role
- * @param Location $location
- * @param ContactInformation $contactInformation
- * @param Institution $raInstitution
- */
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- RegistrationAuthorityRole $role,
- Location $location,
- ContactInformation $contactInformation,
- Institution $raInstitution,
+ public RegistrationAuthorityRole $registrationAuthorityRole,
+ public Location $location,
+ public ContactInformation $contactInformation,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->registrationAuthorityRole = $role;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -100,6 +65,9 @@ public function getAuditLogMetadata(): Metadata
return $metadata;
}
+ /**
+ * @param array $data
+ */
public static function deserialize(array $data): self
{
return new self(
@@ -115,6 +83,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ * @return array
*/
public function serialize(): array
{
@@ -129,11 +98,17 @@ public function serialize(): array
];
}
+ /**
+ * @return array
+ */
public function obtainUserData(): array
{
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
index f80c42663..124f65040 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
@@ -31,6 +31,9 @@
class IdentityCreatedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'id',
'institution',
@@ -40,40 +43,15 @@ class IdentityCreatedEvent extends IdentityEvent implements Forgettable, RightTo
'email',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale
- */
- public Locale $preferredLocale;
-
public function __construct(
IdentityId $id,
Institution $institution,
- NameId $nameId,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public NameId $nameId,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($id, $institution);
-
- $this->nameId = $nameId;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -99,6 +77,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -130,6 +110,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
index 154bf73cb..c55cd923e 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
@@ -28,22 +28,18 @@
class IdentityEmailChangedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'id',
'identity_institution',
'email',
];
- /**
- * @var Email
- */
- public Email $email;
-
- public function __construct(IdentityId $identityId, Institution $institution, Email $email)
+ public function __construct(IdentityId $identityId, Institution $institution, public Email $email)
{
parent::__construct($identityId, $institution);
-
- $this->email = $email;
}
public function getAuditLogMetadata(): Metadata
@@ -70,6 +66,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -97,6 +95,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
index 8856dab21..952dcd893 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityEvent.php
@@ -27,19 +27,7 @@
*/
abstract class IdentityEvent implements AuditableEvent, SerializableInterface
{
- /**
- * @var IdentityId
- */
- public IdentityId $identityId;
-
- /**
- * @var Institution
- */
- public Institution $identityInstitution;
-
- public function __construct(IdentityId $identityId, Institution $identityInstitution)
+ public function __construct(public IdentityId $identityId, public Institution $identityInstitution)
{
- $this->identityId = $identityId;
- $this->identityInstitution = $identityInstitution;
}
}
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
index be6a2eefe..552037111 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
@@ -25,6 +25,9 @@
class IdentityForgottenEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
@@ -49,6 +52,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -63,6 +68,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
index 71a017159..0acfdc71f 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
@@ -28,22 +28,18 @@
class IdentityRenamedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'id',
'institution',
'common_name',
];
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- public function __construct(IdentityId $id, Institution $institution, CommonName $commonName)
+ public function __construct(IdentityId $id, Institution $institution, public CommonName $commonName)
{
parent::__construct($id, $institution);
-
- $this->commonName = $commonName;
}
public function getAuditLogMetadata(): Metadata
@@ -70,6 +66,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -97,6 +95,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
index d9d7fc7a5..52f27f3d3 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
@@ -22,14 +22,8 @@
class InstitutionsAddedToWhitelistEvent implements WhitelistEvent
{
- /**
- * @var InstitutionCollection
- */
- public InstitutionCollection $addedInstitutions;
-
- public function __construct(InstitutionCollection $addedInstitutions)
+ public function __construct(public InstitutionCollection $addedInstitutions)
{
- $this->addedInstitutions = $addedInstitutions;
}
/**
@@ -44,6 +38,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
index f69fc1957..4457c3446 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
@@ -22,14 +22,8 @@
class InstitutionsRemovedFromWhitelistEvent implements WhitelistEvent
{
- /**
- * @var InstitutionCollection
- */
- public InstitutionCollection $removedInstitutions;
-
- public function __construct(InstitutionCollection $removedInstitutions)
+ public function __construct(public InstitutionCollection $removedInstitutions)
{
- $this->removedInstitutions = $removedInstitutions;
}
/**
@@ -44,6 +38,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
diff --git a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
index e17d2ddc6..07057161a 100644
--- a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
@@ -26,27 +26,23 @@
class LocalePreferenceExpressedEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'id',
'institution',
'preferred_locale',
];
- /**
- * @var Locale
- */
- public Locale $preferredLocale;
-
/**
* @param IdentityId $id
* @param Institution $institution
* @param Locale $preferredLocale
*/
- public function __construct(IdentityId $id, Institution $institution, Locale $preferredLocale)
+ public function __construct(IdentityId $id, Institution $institution, public Locale $preferredLocale)
{
parent::__construct($id, $institution);
-
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -69,6 +65,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -84,6 +82,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
index 4ac4ea094..9fb8d4a80 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
@@ -37,6 +37,9 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
PossessionProvenAndVerified,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -49,36 +52,6 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var PhoneNumber
- */
- public PhoneNumber $phoneNumber;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- /**
- * @var DateTime
- */
- public DateTime $registrationRequestedAt;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -86,29 +59,22 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param PhoneNumber $phoneNumber
* @param CommonName $commonName
* @param Email $email
- * @param Locale $locale
+ * @param Locale $preferredLocale
* @param DateTime $registrationRequestedAt
* @param string $registrationCode
*/
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
+ public SecondFactorId $secondFactorId,
+ public PhoneNumber $phoneNumber,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
+ public DateTime $registrationRequestedAt,
public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->phoneNumber = $phoneNumber;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $locale;
- $this->registrationRequestedAt = $registrationRequestedAt;
}
public function getAuditLogMetadata(): Metadata
@@ -145,6 +111,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -182,6 +150,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
index 904709ed6..56ae17f69 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
@@ -34,6 +34,9 @@
class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -45,36 +48,6 @@ class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, R
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var PhoneNumber
- */
- public PhoneNumber $phoneNumber;
-
- /**
- * @var EmailVerificationWindow
- */
- public EmailVerificationWindow $emailVerificationWindow;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -92,23 +65,16 @@ class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, R
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- PhoneNumber $phoneNumber,
+ public SecondFactorId $secondFactorId,
+ public PhoneNumber $phoneNumber,
public bool $emailVerificationRequired,
- EmailVerificationWindow $emailVerificationWindow,
+ public EmailVerificationWindow $emailVerificationWindow,
public string $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->phoneNumber = $phoneNumber;
- $this->emailVerificationWindow = $emailVerificationWindow;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -145,6 +111,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -183,6 +151,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
index 328baaeaa..fa27c8dee 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
@@ -39,6 +39,9 @@
*/
class PhoneRecoveryTokenPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -48,47 +51,19 @@ class PhoneRecoveryTokenPossessionProvenEvent extends IdentityEvent implements F
'common_name',
];
- /**
- * @var RecoveryTokenId
- */
- public RecoveryTokenId $recoveryTokenId;
-
- /**
- * @var PhoneNumber
- */
- public PhoneNumber $phoneNumber;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- RecoveryTokenId $recoveryTokenId,
- PhoneNumber $phoneNumber,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public RecoveryTokenId $recoveryTokenId,
+ public PhoneNumber $phoneNumber,
+ public CommonName $commonName,
+ public Email $email,
+ /**
+ * @var Locale Eg. "en_GB"
+ */
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->recoveryTokenId = $recoveryTokenId;
- $this->phoneNumber = $phoneNumber;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -116,6 +91,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -152,6 +129,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
index e1cf90c80..074997bf2 100644
--- a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
@@ -28,14 +28,8 @@
class RecoveryTokenRevokedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var RecoveryTokenId
+ * @var string[]
*/
- public RecoveryTokenId $recoveryTokenId;
- /**
- * @var RecoveryTokenType
- */
- public RecoveryTokenType $recoveryTokenType;
-
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -46,12 +40,10 @@ class RecoveryTokenRevokedEvent extends IdentityEvent implements RightToObtainDa
final public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- RecoveryTokenId $recoveryTokenId,
- RecoveryTokenType $recoveryTokenType,
+ public RecoveryTokenId $recoveryTokenId,
+ public RecoveryTokenType $recoveryTokenType,
) {
parent::__construct($identityId, $identityInstitution);
- $this->recoveryTokenId = $recoveryTokenId;
- $this->recoveryTokenType = $recoveryTokenType;
}
final public static function deserialize(array $data): self
@@ -95,6 +87,9 @@ final public function serialize(): array
];
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
index 38fc00ae6..bab676149 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
@@ -31,6 +31,9 @@
*/
class RegistrationAuthorityInformationAmendedEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -39,21 +42,6 @@ class RegistrationAuthorityInformationAmendedEvent extends IdentityEvent impleme
'contact_information',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
/**
* @param IdentityId $identityId
* @param Institution $institution
@@ -64,15 +52,11 @@ class RegistrationAuthorityInformationAmendedEvent extends IdentityEvent impleme
public function __construct(
IdentityId $identityId,
Institution $institution,
- NameId $nameId,
- Location $location,
- ContactInformation $contactInformation,
+ public NameId $nameId,
+ public Location $location,
+ public ContactInformation $contactInformation,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
}
public function getAuditLogMetadata(): Metadata
@@ -111,6 +95,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
index e23ab8f21..0574df110 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
@@ -29,6 +29,9 @@
class RegistrationAuthorityInformationAmendedForInstitutionEvent extends IdentityEvent implements
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'institution',
@@ -38,26 +41,6 @@ class RegistrationAuthorityInformationAmendedForInstitutionEvent extends Identit
'ra_institution',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var Location
- */
- public Location $location;
-
- /**
- * @var ContactInformation
- */
- public ContactInformation $contactInformation;
-
- /**
- * @var Institution
- */
- public Institution $raInstitution;
-
/**
* @param IdentityId $identityId
* @param Institution $institution
@@ -69,17 +52,12 @@ class RegistrationAuthorityInformationAmendedForInstitutionEvent extends Identit
public function __construct(
IdentityId $identityId,
Institution $institution,
- NameId $nameId,
- Location $location,
- ContactInformation $contactInformation,
- Institution $raInstitution,
+ public NameId $nameId,
+ public Location $location,
+ public ContactInformation $contactInformation,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->location = $location;
- $this->contactInformation = $contactInformation;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -120,6 +98,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
index 922a751a8..c7dd0b6d5 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
@@ -33,6 +33,9 @@
*/
class RegistrationAuthorityRetractedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -41,33 +44,14 @@ class RegistrationAuthorityRetractedEvent extends IdentityEvent implements Forge
'email',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
public function __construct(
IdentityId $identityId,
Institution $institution,
- NameId $nameId,
- CommonName $commonName,
- Email $email,
+ public NameId $nameId,
+ public CommonName $commonName,
+ public Email $email,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->commonName = $commonName;
- $this->email = $email;
}
public function getAuditLogMetadata(): Metadata
@@ -119,6 +103,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
index b2613861a..3cbe8a920 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
@@ -32,6 +32,9 @@ class RegistrationAuthorityRetractedForInstitutionEvent extends IdentityEvent im
Forgettable,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -41,40 +44,15 @@ class RegistrationAuthorityRetractedForInstitutionEvent extends IdentityEvent im
'common_name',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Institution
- */
- public Institution $raInstitution;
-
public function __construct(
IdentityId $identityId,
Institution $institution,
- NameId $nameId,
- CommonName $commonName,
- Email $email,
- Institution $raInstitution,
+ public NameId $nameId,
+ public CommonName $commonName,
+ public Email $email,
+ public Institution $raInstitution,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->raInstitution = $raInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -100,6 +78,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -131,6 +111,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
index 78b77587e..911a39406 100644
--- a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
@@ -42,6 +42,9 @@ class SafeStoreSecretRecoveryTokenPossessionPromisedEvent extends IdentityEvent
Forgettable,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -51,32 +54,16 @@ class SafeStoreSecretRecoveryTokenPossessionPromisedEvent extends IdentityEvent
'common_name',
];
- public RecoveryTokenId $recoveryTokenId;
-
- public RecoveryTokenIdentifier $secret;
-
- public CommonName $commonName;
-
- public Email $email;
-
- public Locale $preferredLocale;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- RecoveryTokenId $recoveryTokenId,
- RecoveryTokenIdentifier $secret,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public RecoveryTokenId $recoveryTokenId,
+ public RecoveryTokenIdentifier $secret,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->recoveryTokenId = $recoveryTokenId;
- $this->secret = $secret;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -105,6 +92,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -139,6 +128,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
index 72652f4d5..41350c661 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
@@ -42,6 +42,9 @@
*/
class SecondFactorMigratedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'source_institution',
@@ -56,76 +59,24 @@ class SecondFactorMigratedEvent extends IdentityEvent implements Forgettable, Ri
'email',
];
- /**
- * @var NameId
- */
- public NameId $targetNameId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $newSecondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
- /**
- * @var Locale
- */
- public Locale $preferredLocale;
- /**
- * @var VettingType
- */
- public VettingType $vettingType;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
- NameId $targetNameId,
+ public NameId $targetNameId,
Institution $targetInstitution,
private Institution $sourceInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorId $newSecondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
- VettingType $vettingType,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorId $newSecondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
+ public VettingType $vettingType,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $targetInstitution);
- $this->targetNameId = $targetNameId;
- $this->secondFactorId = $secondFactorId;
- $this->newSecondFactorId = $newSecondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
- $this->vettingType = $vettingType;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -168,6 +119,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -208,6 +161,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
index c3159993d..c4d042990 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
@@ -34,6 +34,9 @@
*/
class SecondFactorMigratedToEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -44,50 +47,19 @@ class SecondFactorMigratedToEvent extends IdentityEvent implements Forgettable,
'second_factor_identifier',
];
- /**
- * @var Institution
- */
- public Institution $targetInstitution;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $targetSecondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
Institution $institution,
- Institution $targetInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorId $targetSecondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
+ public Institution $targetInstitution,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorId $targetSecondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
) {
parent::__construct($identityId, $institution);
-
- $this->secondFactorId = $secondFactorId;
- $this->targetSecondFactorId = $targetSecondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
- $this->targetInstitution = $targetInstitution;
}
public function getAuditLogMetadata(): Metadata
@@ -118,6 +90,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -149,6 +123,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
index add677c7f..3a98fbe7d 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
@@ -31,6 +31,9 @@
abstract class SecondFactorRevokedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -39,33 +42,14 @@ abstract class SecondFactorRevokedEvent extends IdentityEvent implements Forgett
'second_factor_identifier',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
final public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
}
public function getAuditLogMetadata(): Metadata
@@ -124,6 +108,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
index 5ed1ac3f7..fefdb55e4 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
@@ -40,6 +40,9 @@
*/
class SecondFactorVettedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -53,68 +56,25 @@ class SecondFactorVettedEvent extends IdentityEvent implements Forgettable, Righ
'vetting_type',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- public ?VettingType $vettingType;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
- VettingType $vettingType,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
+ public CommonName $commonName,
+ public Email $email,
+ /**
+ * @var Locale Eg. "en_GB"
+ */
+ public Locale $preferredLocale,
+ public ?VettingType $vettingType,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->secondFactorId = $secondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
- $this->vettingType = $vettingType;
}
public function getAuditLogMetadata(): Metadata
@@ -149,6 +109,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -186,6 +148,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
index 058b6334e..a3c1a776b 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
@@ -43,6 +43,9 @@ class SecondFactorVettedWithoutTokenProofOfPossession extends IdentityEvent impl
Forgettable,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -56,73 +59,30 @@ class SecondFactorVettedWithoutTokenProofOfPossession extends IdentityEvent impl
'vetting_type',
];
- /**
- * @var NameId
- */
- public NameId $nameId;
-
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var SecondFactorType
- */
- public SecondFactorType $secondFactorType;
-
- /**
- * @var SecondFactorIdentifier
- */
- public SecondFactorIdentifier $secondFactorIdentifier;
-
/**
* @var DocumentNumber
*/
public DocumentNumber $documentNumber;
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- public ?VettingType $vettingType;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
- NameId $nameId,
+ public NameId $nameId,
Institution $institution,
- SecondFactorId $secondFactorId,
- SecondFactorType $secondFactorType,
- SecondFactorIdentifier $secondFactorIdentifier,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
- VettingType $vettingType,
+ public SecondFactorId $secondFactorId,
+ public SecondFactorType $secondFactorType,
+ public SecondFactorIdentifier $secondFactorIdentifier,
+ public CommonName $commonName,
+ public Email $email,
+ /**
+ * @var Locale Eg. "en_GB"
+ */
+ public Locale $preferredLocale,
+ public ?VettingType $vettingType,
) {
parent::__construct($identityId, $institution);
-
- $this->nameId = $nameId;
- $this->secondFactorId = $secondFactorId;
- $this->secondFactorType = $secondFactorType;
- $this->secondFactorIdentifier = $secondFactorIdentifier;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
- $this->vettingType = $vettingType;
}
public function getAuditLogMetadata(): Metadata
@@ -157,6 +117,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -194,6 +156,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
index 4d0c689e9..96fb8ff3a 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
@@ -40,6 +40,9 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
PossessionProvenAndVerified,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -52,36 +55,6 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var U2fKeyHandle
- */
- public U2fKeyHandle $keyHandle;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- /**
- * @var DateTime
- */
- public DateTime $registrationRequestedAt;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -89,29 +62,22 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param U2fKeyHandle $keyHandle
* @param CommonName $commonName
* @param Email $email
- * @param Locale $locale
+ * @param Locale $preferredLocale
* @param DateTime $registrationRequestedAt
* @param string $registrationCode
*/
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
+ public SecondFactorId $secondFactorId,
+ public U2fKeyHandle $keyHandle,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
+ public DateTime $registrationRequestedAt,
public string $registrationCode,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->keyHandle = $keyHandle;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $locale;
- $this->registrationRequestedAt = $registrationRequestedAt;
}
public function getAuditLogMetadata(): Metadata
@@ -148,6 +114,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -185,6 +153,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
index e137c3aeb..b5475b8c2 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
@@ -37,6 +37,9 @@
*/
class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -48,36 +51,6 @@ class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettabl
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * @var U2fKeyHandle
- */
- public U2fKeyHandle $keyHandle;
-
- /**
- * @var EmailVerificationWindow
- */
- public EmailVerificationWindow $emailVerificationWindow;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
/**
* @param IdentityId $identityId
* @param Institution $identityInstitution
@@ -95,23 +68,16 @@ class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettabl
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- SecondFactorId $secondFactorId,
- U2fKeyHandle $keyHandle,
+ public SecondFactorId $secondFactorId,
+ public U2fKeyHandle $keyHandle,
public bool $emailVerificationRequired,
- EmailVerificationWindow $emailVerificationWindow,
+ public EmailVerificationWindow $emailVerificationWindow,
public string $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $identityInstitution);
-
- $this->secondFactorId = $secondFactorId;
- $this->keyHandle = $keyHandle;
- $this->emailVerificationWindow = $emailVerificationWindow;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -148,6 +114,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -186,6 +154,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
index ae10e81be..c475589b8 100644
--- a/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
@@ -25,6 +25,9 @@
class VettedSecondFactorsAllRevokedEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -70,6 +73,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
index 6a06de510..d46ff8d1d 100644
--- a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
@@ -26,6 +26,9 @@
class VettingTypeHintsSavedEvent extends IdentityEvent implements RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -33,25 +36,13 @@ class VettingTypeHintsSavedEvent extends IdentityEvent implements RightToObtainD
'institution',
];
- /**
- * @var VettingTypeHintCollection
- */
- public VettingTypeHintCollection $hints;
-
- /**
- * @var Institution
- */
- public Institution $institution;
-
public function __construct(
IdentityId $identityId,
Institution $identityInstitution,
- VettingTypeHintCollection $hints,
- Institution $institution,
+ public VettingTypeHintCollection $hints,
+ public Institution $institution,
) {
parent::__construct($identityId, $identityInstitution);
- $this->hints = $hints;
- $this->institution = $institution;
}
public function getAuditLogMetadata(): Metadata
@@ -68,6 +59,9 @@ public function obtainUserData(): array
return $this->serialize();
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
index 16a7a1634..2feb528e9 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
@@ -22,14 +22,8 @@
class WhitelistCreatedEvent implements WhitelistEvent
{
- /**
- * @var InstitutionCollection
- */
- public InstitutionCollection $whitelistedInstitutions;
-
- public function __construct(InstitutionCollection $institutionCollection)
+ public function __construct(public InstitutionCollection $whitelistedInstitutions)
{
- $this->whitelistedInstitutions = $institutionCollection;
}
/**
@@ -43,6 +37,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
index 4f5a2e3f1..1c5918295 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
@@ -22,14 +22,8 @@
class WhitelistReplacedEvent implements WhitelistEvent
{
- /**
- * @var InstitutionCollection
- */
- public InstitutionCollection $whitelistedInstitutions;
-
- public function __construct(InstitutionCollection $whitelistedInstitutions)
+ public function __construct(public InstitutionCollection $whitelistedInstitutions)
{
- $this->whitelistedInstitutions = $whitelistedInstitutions;
}
/**
@@ -44,6 +38,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
index ddfbed24b..aca867439 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
@@ -37,6 +37,9 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
PossessionProvenAndVerified,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -49,38 +52,6 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * The Yubikey's public ID.
- *
- * @var YubikeyPublicId
- */
- public YubikeyPublicId $yubikeyPublicId;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
- /**
- * @var DateTime
- */
- public DateTime $registrationRequestedAt;
-
/**
* @param IdentityId $identityId
* @param Institution $institution
@@ -88,29 +59,25 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
* @param YubikeyPublicId $yubikeyPublicId
* @param CommonName $commonName
* @param Email $email
- * @param Locale $locale
+ * @param Locale $preferredLocale
* @param DateTime $registrationRequestedAt
* @param string $registrationCode
*/
public function __construct(
IdentityId $identityId,
Institution $institution,
- SecondFactorId $secondFactorId,
- YubikeyPublicId $yubikeyPublicId,
- CommonName $commonName,
- Email $email,
- Locale $locale,
- DateTime $registrationRequestedAt,
+ public SecondFactorId $secondFactorId,
+ /**
+ * The Yubikey's public ID.
+ */
+ public YubikeyPublicId $yubikeyPublicId,
+ public CommonName $commonName,
+ public Email $email,
+ public Locale $preferredLocale,
+ public DateTime $registrationRequestedAt,
public string $registrationCode,
) {
parent::__construct($identityId, $institution);
-
- $this->secondFactorId = $secondFactorId;
- $this->yubikeyPublicId = $yubikeyPublicId;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $locale;
- $this->registrationRequestedAt = $registrationRequestedAt;
}
public function getAuditLogMetadata(): Metadata
@@ -147,6 +114,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -185,6 +154,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
index e9046f985..8eee90db7 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
@@ -35,6 +35,9 @@
class YubikeyPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'identity_institution',
@@ -46,66 +49,33 @@ class YubikeyPossessionProvenEvent extends IdentityEvent implements Forgettable,
'common_name',
];
- /**
- * @var SecondFactorId
- */
- public SecondFactorId $secondFactorId;
-
- /**
- * The Yubikey's public ID.
- *
- * @var YubikeyPublicId
- */
- public YubikeyPublicId $yubikeyPublicId;
-
/**
* @var DateTime
*/
public DateTime $emailVerificationRequestedAt;
- /**
- * @var EmailVerificationWindow
- */
- public EmailVerificationWindow $emailVerificationWindow;
-
- /**
- * @var CommonName
- */
- public CommonName $commonName;
-
- /**
- * @var Email
- */
- public Email $email;
-
- /**
- * @var Locale Eg. "en_GB"
- */
- public Locale $preferredLocale;
-
/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
IdentityId $identityId,
Institution $institution,
- SecondFactorId $secondFactorId,
- YubikeyPublicId $yubikeyPublicId,
+ public SecondFactorId $secondFactorId,
+ /**
+ * The Yubikey's public ID.
+ */
+ public YubikeyPublicId $yubikeyPublicId,
public bool $emailVerificationRequired,
- EmailVerificationWindow $emailVerificationWindow,
+ public EmailVerificationWindow $emailVerificationWindow,
public string $emailVerificationNonce,
- CommonName $commonName,
- Email $email,
- Locale $preferredLocale,
+ public CommonName $commonName,
+ public Email $email,
+ /**
+ * @var Locale Eg. "en_GB"
+ */
+ public Locale $preferredLocale,
) {
parent::__construct($identityId, $institution);
-
- $this->secondFactorId = $secondFactorId;
- $this->yubikeyPublicId = $yubikeyPublicId;
- $this->emailVerificationWindow = $emailVerificationWindow;
- $this->commonName = $commonName;
- $this->email = $email;
- $this->preferredLocale = $preferredLocale;
}
public function getAuditLogMetadata(): Metadata
@@ -142,6 +112,8 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -180,6 +152,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
index e986550a7..b9f147d0b 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
@@ -36,6 +36,9 @@ final class YubikeySecondFactorBootstrappedEvent extends IdentityEvent implement
Forgettable,
RightToObtainDataInterface
{
+ /**
+ * @var string[]
+ */
private array $allowlist = [
'identity_id',
'name_id',
@@ -81,6 +84,8 @@ public function getAuditLogMetadata(): Metadata
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
+ *
+ * @return array
*/
public function serialize(): array
{
@@ -131,6 +136,9 @@ public function obtainUserData(): array
return array_merge($serializedPublicUserData, $serializedSensitiveUserData);
}
+ /**
+ * @return string[]
+ */
public function getAllowlist(): array
{
return $this->allowlist;
diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php
index 8f6dfed00..561751ff2 100644
--- a/src/Surfnet/Stepup/Identity/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Identity.php
@@ -368,7 +368,7 @@ public function provePossessionOfGssf(
GssfId $gssfId,
bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -417,7 +417,7 @@ public function provePossessionOfU2fDevice(
U2fKeyHandle $keyHandle,
bool $emailVerificationRequired,
EmailVerificationWindow $emailVerificationWindow,
- $maxNumberOfTokens,
+ int $maxNumberOfTokens,
): void {
$this->assertNotForgotten();
$this->assertUserMayAddSecondFactor($maxNumberOfTokens);
@@ -510,7 +510,7 @@ public function vetSecondFactor(
);
$registrantsSecondFactor = $registrant->getVerifiedSecondFactor($registrantsSecondFactorId);
- if ($registrantsSecondFactor === null) {
+ if (!$registrantsSecondFactor instanceof \Surfnet\Stepup\Identity\Entity\VerifiedSecondFactor) {
throw new DomainException(
sprintf('Registrant second factor with ID %s does not exist', $registrantsSecondFactorId),
);
@@ -1460,7 +1460,7 @@ private function assertNotForgotten(): void
/**
* @throws DomainException
*/
- private function assertUserMayAddSecondFactor($maxNumberOfTokens): void
+ private function assertUserMayAddSecondFactor(int $maxNumberOfTokens): void
{
if (count($this->unverifiedSecondFactors) +
count($this->verifiedSecondFactors) +
diff --git a/src/Surfnet/Stepup/Identity/Value/CommonName.php b/src/Surfnet/Stepup/Identity/Value/CommonName.php
index c6aa01297..bb0c46a77 100644
--- a/src/Surfnet/Stepup/Identity/Value/CommonName.php
+++ b/src/Surfnet/Stepup/Identity/Value/CommonName.php
@@ -36,12 +36,9 @@ public static function unknown(): self
return new self('—');
}
- /**
- * @param string $commonName
- */
public function __construct(string $commonName)
{
- if (!is_string($commonName) || trim($commonName) === '') {
+ if (trim($commonName) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'commonName', $commonName);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/ContactInformation.php b/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
index d8e762e99..33906678d 100644
--- a/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
+++ b/src/Surfnet/Stepup/Identity/Value/ContactInformation.php
@@ -28,9 +28,6 @@ final class ContactInformation implements JsonSerializable, Stringable
{
private readonly string $contactInformation;
- /**
- * @param string $contactInformation
- */
public function __construct(string $contactInformation)
{
$this->contactInformation = trim($contactInformation);
diff --git a/src/Surfnet/Stepup/Identity/Value/Email.php b/src/Surfnet/Stepup/Identity/Value/Email.php
index 0c96c80a6..ab9930f29 100644
--- a/src/Surfnet/Stepup/Identity/Value/Email.php
+++ b/src/Surfnet/Stepup/Identity/Value/Email.php
@@ -36,12 +36,9 @@ public static function unknown(): self
return new self('unknown@domain.invalid');
}
- /**
- * @param string $email
- */
public function __construct(string $email)
{
- if (!is_string($email) || trim($email) === '') {
+ if (trim($email) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'email', $email);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/GssfId.php b/src/Surfnet/Stepup/Identity/Value/GssfId.php
index 00d434a10..7a403d0c6 100644
--- a/src/Surfnet/Stepup/Identity/Value/GssfId.php
+++ b/src/Surfnet/Stepup/Identity/Value/GssfId.php
@@ -29,9 +29,9 @@ public static function unknown(): static
return new self('—');
}
- public function __construct($gssfId)
+ public function __construct(string $gssfId)
{
- if (!is_string($gssfId) || trim($gssfId) === '') {
+ if (trim($gssfId) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'gssfId', $gssfId);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/IdentityId.php b/src/Surfnet/Stepup/Identity/Value/IdentityId.php
index 3da3b04f4..068c45344 100644
--- a/src/Surfnet/Stepup/Identity/Value/IdentityId.php
+++ b/src/Surfnet/Stepup/Identity/Value/IdentityId.php
@@ -26,12 +26,8 @@ final class IdentityId implements Id, JsonSerializable
{
private readonly string $value;
- public function __construct($value)
+ public function __construct(string $value)
{
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
$this->value = $value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/Institution.php b/src/Surfnet/Stepup/Identity/Value/Institution.php
index f824cd4fa..d85786d1f 100644
--- a/src/Surfnet/Stepup/Identity/Value/Institution.php
+++ b/src/Surfnet/Stepup/Identity/Value/Institution.php
@@ -33,7 +33,7 @@ final class Institution implements JsonSerializable, Stringable
*/
public function __construct(string $institution)
{
- if (!is_string($institution) || trim($institution) === '') {
+ if (trim($institution) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'institution', $institution);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/Locale.php b/src/Surfnet/Stepup/Identity/Value/Locale.php
index 7c0f57d12..349dc60f2 100644
--- a/src/Surfnet/Stepup/Identity/Value/Locale.php
+++ b/src/Surfnet/Stepup/Identity/Value/Locale.php
@@ -22,20 +22,10 @@
use Stringable;
use Surfnet\Stepup\Exception\InvalidArgumentException;
-final class Locale implements JsonSerializable, Stringable
+final readonly class Locale implements JsonSerializable, Stringable
{
- private readonly string $locale;
-
- /**
- * @param string $locale
- */
- public function __construct(string $locale)
+ public function __construct(private string $locale)
{
- if (!is_string($locale)) {
- throw InvalidArgumentException::invalidType('string', 'locale', $locale);
- }
-
- $this->locale = $locale;
}
public function equals(Locale $other): bool
diff --git a/src/Surfnet/Stepup/Identity/Value/Location.php b/src/Surfnet/Stepup/Identity/Value/Location.php
index bce97e6d7..97540db66 100644
--- a/src/Surfnet/Stepup/Identity/Value/Location.php
+++ b/src/Surfnet/Stepup/Identity/Value/Location.php
@@ -28,9 +28,6 @@ final class Location implements JsonSerializable, Stringable
{
private readonly string $location;
- /**
- * @param string $location
- */
public function __construct(string $location)
{
$this->location = trim($location);
diff --git a/src/Surfnet/Stepup/Identity/Value/NameId.php b/src/Surfnet/Stepup/Identity/Value/NameId.php
index 84859431d..c2953c70a 100644
--- a/src/Surfnet/Stepup/Identity/Value/NameId.php
+++ b/src/Surfnet/Stepup/Identity/Value/NameId.php
@@ -37,12 +37,8 @@ final class NameId implements JsonSerializable, Stringable
private readonly string $value;
- public function __construct($value)
+ public function __construct(string $value)
{
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
if (strlen($value) > self::MAX_LENGTH) {
throw new InvalidArgumentException(
'Invalid argument type: maximum length for nameId exceeds configured length of ' . self::MAX_LENGTH,
@@ -60,9 +56,9 @@ public function getNameId(): string
return $this->value;
}
- public function equals($other): bool
+ public function equals(NameId $other): bool
{
- return $this == $other;
+ return $this === $other;
}
public function __toString(): string
diff --git a/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php b/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
index 6608ce7d9..2a2ec9142 100644
--- a/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
+++ b/src/Surfnet/Stepup/Identity/Value/PhoneNumber.php
@@ -29,12 +29,8 @@ public static function unknown(): static
return new self('+0 (0) 000000000');
}
- public function __construct($phoneNumber)
+ public function __construct(string $phoneNumber)
{
- if (!is_string($phoneNumber)) {
- throw InvalidArgumentException::invalidType('string', 'value', $phoneNumber);
- }
-
if (!preg_match('~^\+[\d\s]+ \(0\) \d+$~', $phoneNumber)) {
throw new InvalidArgumentException(
sprintf(
@@ -53,7 +49,7 @@ public function getValue(): string
return $this->phoneNumber;
}
- public function equals(mixed $other): bool
+ public function equals(RecoveryTokenIdentifier|SecondFactorIdentifier $other): bool
{
return $other instanceof self && $this->phoneNumber === $other->phoneNumber;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
index 90ad910fc..c8c9a94e1 100644
--- a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
+++ b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenId.php
@@ -25,12 +25,8 @@ final class RecoveryTokenId implements Id
{
private readonly string $value;
- public function __construct($value)
+ public function __construct(string $value)
{
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
$this->value = $value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenIdentifier.php b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenIdentifier.php
index d202bc570..446576219 100644
--- a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenIdentifier.php
+++ b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenIdentifier.php
@@ -22,11 +22,11 @@
interface RecoveryTokenIdentifier extends JsonSerializable
{
- public static function unknown();
+ public static function unknown(): RecoveryTokenIdentifier;
- public function getValue();
+ public function getValue(): string;
- public function equals($other): bool;
+ public function equals(RecoveryTokenIdentifier $other): bool;
- public function __toString();
+ public function __toString(): string;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
index dc3437dd9..b3f544fe7 100644
--- a/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
+++ b/src/Surfnet/Stepup/Identity/Value/RecoveryTokenType.php
@@ -28,14 +28,8 @@ final class RecoveryTokenType implements Stringable
private readonly string $type;
- public function __construct($type)
+ public function __construct(string $type)
{
- if (!is_string($type)) {
- throw new InvalidArgumentException(
- sprintf('The RecoveryTokenType must be of type string, %s given', gettype($type)),
- );
- }
-
if (!in_array($type, [self::TYPE_SMS, self::TYPE_SAFE_STORE])) {
throw new InvalidArgumentException('The RecoveryTokenType must be one of "sms" or "safe-store".');
}
diff --git a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
index 25d8b2bdf..15e2872ed 100644
--- a/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+++ b/src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
@@ -24,13 +24,13 @@
use Stringable;
use Surfnet\Stepup\Exception\InvalidArgumentException;
-final class RegistrationAuthorityRole implements SerializableInterface, Stringable
+final readonly class RegistrationAuthorityRole implements SerializableInterface, Stringable
{
public const ROLE_RA = 1;
public const ROLE_RAA = 2;
public const ROLE_SRAA = 3;
- public function __construct(private readonly int $role)
+ public function __construct(private int $role)
{
if (!in_array($role, [self::ROLE_RA, self::ROLE_RAA, self::ROLE_SRAA])) {
throw new InvalidArgumentException(
diff --git a/src/Surfnet/Stepup/Identity/Value/SafeStore.php b/src/Surfnet/Stepup/Identity/Value/SafeStore.php
index a3c8fbee2..962287eb9 100644
--- a/src/Surfnet/Stepup/Identity/Value/SafeStore.php
+++ b/src/Surfnet/Stepup/Identity/Value/SafeStore.php
@@ -43,7 +43,7 @@ public function getValue(): string
return $this->secret->getSecret();
}
- public function equals($other): bool
+ public function equals(RecoveryTokenIdentifier $other): bool
{
return $other instanceof self && $other->getValue() === $this->getValue();
}
diff --git a/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php b/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
index 023158b17..985439c40 100644
--- a/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
+++ b/src/Surfnet/Stepup/Identity/Value/SecondFactorId.php
@@ -25,12 +25,8 @@ final class SecondFactorId implements Id
{
private readonly string $value;
- public function __construct($value)
+ public function __construct(string $value)
{
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
$this->value = $value;
}
diff --git a/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php b/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
index 65c8557be..8294e46b6 100644
--- a/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
+++ b/src/Surfnet/Stepup/Identity/Value/SecondFactorIdentifier.php
@@ -35,7 +35,6 @@ public static function unknown(): static;
public function getValue(): string;
/**
- * @param self $other
* @return bool
*/
public function equals(SecondFactorIdentifier $other): bool;
diff --git a/src/Surfnet/Stepup/Identity/Value/StepupProvider.php b/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
index 6cbab7517..f4a1a098f 100644
--- a/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
+++ b/src/Surfnet/Stepup/Identity/Value/StepupProvider.php
@@ -25,9 +25,9 @@ final class StepupProvider implements Stringable
{
private readonly string $provider;
- public function __construct($provider)
+ public function __construct(string $provider)
{
- if (!is_string($provider) || trim($provider) === '') {
+ if (trim($provider) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'provider', $provider);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/TimeFrame.php b/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
index 62994a3a3..c5dc70759 100644
--- a/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
+++ b/src/Surfnet/Stepup/Identity/Value/TimeFrame.php
@@ -33,14 +33,13 @@ final private function __construct(private DateInterval $timeFrame)
}
/**
- * @param int $seconds
* @return TimeFrame
* @throws Exception
* @throws Exception
*/
public static function ofSeconds(int $seconds): TimeFrame
{
- if (!is_int($seconds) || $seconds < 1) {
+ if ($seconds < 1) {
throw InvalidArgumentException::invalidType('positive integer', 'seconds', $seconds);
}
diff --git a/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php b/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
index a88b8ada9..280316dc8 100644
--- a/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
+++ b/src/Surfnet/Stepup/Identity/Value/U2fKeyHandle.php
@@ -37,18 +37,14 @@ public static function unknown(): static
return new self(self::UNKNOWN);
}
- public function __construct($value)
+ public function __construct(string $value)
{
if ($value === self::UNKNOWN) {
$this->value = $value;
return;
}
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
- if (empty($value)) {
+ if ($value === '' || $value === '0') {
throw new InvalidArgumentException('Invalid Argument, parameter "value" may not be an empty string');
}
diff --git a/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php b/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
index 90a84434c..f5e672f04 100644
--- a/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
+++ b/src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
@@ -20,7 +20,7 @@
use JsonSerializable;
-class VettingTypeHint implements JsonSerializable
+class VettingTypeHint implements JsonSerializable, \Stringable
{
public function __construct(
private readonly string $locale,
diff --git a/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php b/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
index 5d62301f0..c3465d051 100644
--- a/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
+++ b/src/Surfnet/Stepup/Identity/Value/YubikeyPublicId.php
@@ -31,17 +31,13 @@ public static function unknown(): static
return new self(self::UNKNOWN);
}
- public function __construct($value)
+ public function __construct(string $value)
{
if ($value === self::UNKNOWN) {
$this->value = $value;
return;
}
- if (!is_string($value)) {
- throw InvalidArgumentException::invalidType('string', 'value', $value);
- }
-
// Numeric IDs must be left-padded with zeroes until eight characters. Longer IDs, up to twenty characters, may
// not be padded.
if (!preg_match('~^\d{8,20}$~', $value)) {
diff --git a/src/Surfnet/Stepup/Tests/Configuration/InstitutionConfigurationTest.php b/src/Surfnet/Stepup/Tests/Configuration/InstitutionConfigurationTest.php
index 8d2e22099..b7c81746d 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/InstitutionConfigurationTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/InstitutionConfigurationTest.php
@@ -66,7 +66,7 @@ public function use_ra_locations_option_is_set_to_false_by_default_upon_creation
$selectRaaOption = InstitutionAuthorizationOption::getDefault(InstitutionRole::selectRaa());
$this->scenario
- ->when(fn() => InstitutionConfiguration::create(
+ ->when(fn(): \Surfnet\Stepup\Configuration\InstitutionConfiguration => InstitutionConfiguration::create(
$institutionConfigurationId,
$institution,
))->then([
@@ -124,7 +124,7 @@ public function show_raa_contact_information_option_is_set_to_true_by_default_up
$selectRaaOption = InstitutionAuthorizationOption::getDefault(InstitutionRole::selectRaa());
$this->scenario
- ->when(fn() => InstitutionConfiguration::create(
+ ->when(fn(): \Surfnet\Stepup\Configuration\InstitutionConfiguration => InstitutionConfiguration::create(
$institutionConfigurationId,
$institution,
))->then([
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
index 115931adf..2d4873afa 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
@@ -32,7 +32,7 @@ class AllowedSecondFactorListTest extends TestCase
* @test
* @group domain
*/
- public function an_allowed_second_factor_list_deduplicates_its_second_factors_upon_creation()
+ public function an_allowed_second_factor_list_deduplicates_its_second_factors_upon_creation(): void
{
$allowedSecondFactorList = AllowedSecondFactorList::ofTypes([
new SecondFactorType('sms'),
@@ -53,7 +53,7 @@ public function an_allowed_second_factor_list_deduplicates_its_second_factors_up
* @dataProvider availableSecondFactorTypeProvider
* @param $availableSecondFactorType
*/
- public function a_blank_allowed_second_factor_list_allows_all_second_factors($availableSecondFactorType)
+ public function a_blank_allowed_second_factor_list_allows_all_second_factors(\Surfnet\StepupBundle\Value\SecondFactorType $availableSecondFactorType): void
{
$allowedSecondFactorList = AllowedSecondFactorList::blank();
@@ -66,7 +66,7 @@ public function a_blank_allowed_second_factor_list_allows_all_second_factors($av
* @test
* @group domain
*/
- public function an_allowed_second_factor_list_contains_a_given_second_factor()
+ public function an_allowed_second_factor_list_contains_a_given_second_factor(): void
{
$allowedSecondFactorList = AllowedSecondFactorList::ofTypes([new SecondFactorType('sms')]);
$allowedSecondFactor = new SecondFactorType('sms');
@@ -83,7 +83,7 @@ public function an_allowed_second_factor_list_contains_a_given_second_factor()
* @test
* @group domain
*/
- public function an_allowed_second_factor_list_does_not_contain_a_given_second_factor()
+ public function an_allowed_second_factor_list_does_not_contain_a_given_second_factor(): void
{
$allowedSecondFactorList = AllowedSecondFactorList::ofTypes([new SecondFactorType('sms')]);
$allowedSecondFactor = new SecondFactorType('yubikey');
@@ -100,7 +100,7 @@ public function an_allowed_second_factor_list_does_not_contain_a_given_second_fa
* @test
* @group domain
*/
- public function an_allowed_second_factor_list_contains_the_given_second_factors()
+ public function an_allowed_second_factor_list_contains_the_given_second_factors(): void
{
$secondFactorTypes = [
new SecondFactorType('sms'),
@@ -118,7 +118,7 @@ public function an_allowed_second_factor_list_contains_the_given_second_factors(
* @test
* @group domain
*/
- public function a_second_factor_on_the_allowed_second_factor_list_is_allowed()
+ public function a_second_factor_on_the_allowed_second_factor_list_is_allowed(): void
{
$allowedSecondFactorList = AllowedSecondFactorList::ofTypes([new SecondFactorType('sms')]);
$allowedSecondFactor = new SecondFactorType('sms');
@@ -135,7 +135,7 @@ public function a_second_factor_on_the_allowed_second_factor_list_is_allowed()
* @test
* @group domain
*/
- public function a_second_factor_not_on_the_allowed_second_factor_list_is_not_allowed()
+ public function a_second_factor_not_on_the_allowed_second_factor_list_is_not_allowed(): void
{
$allowedSecondFactorList = AllowedSecondFactorList::ofTypes([new SecondFactorType('sms')]);
$disallowedSecondFactor = new SecondFactorType('yubikey');
@@ -159,7 +159,7 @@ public function a_second_factor_not_on_the_allowed_second_factor_list_is_not_all
public function allowed_second_factor_lists_with_different_elements_are_not_considered_equal(
array $firstList,
array $secondList,
- ) {
+ ): void {
$base = AllowedSecondFactorList::ofTypes($firstList);
$other = AllowedSecondFactorList::ofTypes($secondList);
@@ -177,7 +177,7 @@ public function allowed_second_factor_lists_with_different_elements_are_not_cons
public function allowed_second_factor_lists_with_the_same_elements_are_considered_equal(
array $firstList,
array $secondList,
- ) {
+ ): void {
$base = AllowedSecondFactorList::ofTypes($firstList);
$other = AllowedSecondFactorList::ofTypes($secondList);
@@ -235,7 +235,7 @@ public function availableSecondFactorTypeProvider(): array
'tiqr' => ['loa' => 3],
]);
$secondFactorTypes = array_map(
- fn($availableSecondFactorType) => [new SecondFactorType($availableSecondFactorType)],
+ fn($availableSecondFactorType): array => [new SecondFactorType($availableSecondFactorType)],
$service->getAvailableSecondFactorTypes(),
);
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
index 5032d0559..2a749c131 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
@@ -1,5 +1,7 @@
expectException(InvalidArgumentException::class);
-
- new ShowRaaContactInformationOption($nonBooleanProvider);
- }
-
/**
* @test
* @group domain
@@ -82,15 +68,4 @@ public function default_value_is_true(): void
$this->assertTrue($default->equals($true));
}
-
- public function nonBooleanProvider(): array
- {
- return [
- 'string' => [''],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
}
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
index 45b825098..f6f5fa259 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/UseRaLocationsOptionTest.php
@@ -28,19 +28,6 @@ class UseRaLocationsOptionTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group domain
- * @group institution-configuration-option
- * @dataProvider nonBooleanProvider
- */
- public function use_ra_locations_option_can_only_be_boolean(string|int|float|StdClass|array $nonBooleanProvider,): void
- {
- $this->expectException(InvalidArgumentException::class);
-
- new UseRaLocationsOption($nonBooleanProvider);
- }
-
/**
* @test
* @group domain
@@ -80,16 +67,5 @@ public function default_value_is_false(): void
$false = new UseRaLocationsOption(false);
$this->assertTrue($default->equals($false));
- }
-
- public function nonBooleanProvider(): array
- {
- return [
- 'string' => [''],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
- ];
- }
+ }
}
diff --git a/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php b/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
index f60ae4497..6d7f1b128 100644
--- a/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
+++ b/src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
@@ -29,19 +29,6 @@ class JsonHelperTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group json
- *
- * @dataProvider nonStringProvider
- */
- public function json_helper_can_only_decode_strings(bool|int|float|StdClass|array $nonString): void
- {
- $this->expectException(InvalidArgumentException::class);
-
- JsonHelper::decode($nonString);
- }
-
/**
* @test
* @group json
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Filter/InstitutionAuthorizationRepositoryFilter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Filter/InstitutionAuthorizationRepositoryFilter.php
index b3b8aa860..ff2968c9b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Filter/InstitutionAuthorizationRepositoryFilter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Filter/InstitutionAuthorizationRepositoryFilter.php
@@ -23,15 +23,11 @@
class InstitutionAuthorizationRepositoryFilter
{
- /**
- * @param string $institutionField
- * @param string $authorizationAlias
- */
public function filter(
- QueryBuilder $queryBuilder,
+ QueryBuilder $queryBuilder,
InstitutionAuthorizationContextInterface $authorizationContext,
- $institutionField,
- $authorizationAlias,
+ string $institutionField,
+ string $authorizationAlias,
): void {
// If actor is SRAA we don't need filtering
if ($authorizationContext->isActorSraa()) {
@@ -56,12 +52,7 @@ public function filter(
$queryBuilder->setParameter($parameter, $values);
}
- /**
- * @param $authorizationAlias
- * @param $name
- * @return string
- */
- private function getParameterName($authorizationAlias, string $name): string
+ private function getParameterName(string $authorizationAlias, string $name): string
{
return "{$authorizationAlias}_{$name}";
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
index 0b3b96314..d5e5e0bd9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php
@@ -88,7 +88,7 @@ public function assertRegistrationOfSelfAssertedTokensIsAllowed(IdentityId $iden
// Only allow self-asserted token (SAT) if the user does not have a token yet, or the first
// registered token was a SAT.
- $hadOtherTokenType = $options->possessedSelfAssertedToken === false && $options->possessedToken === true;
+ $hadOtherTokenType = $options->possessedSelfAssertedToken === false && $options->possessedToken;
if ($hadOtherTokenType) {
return $this->deny(
'Identity never possessed a self-asserted token, but did/does possess one of the other types',
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/CommandAuthorizationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/CommandAuthorizationService.php
index 728ca994d..86f2f087f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/CommandAuthorizationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/CommandAuthorizationService.php
@@ -264,7 +264,7 @@ private function isSraa(IdentityId $actorId = null): bool
$registrationAuthorityCredentials = $this->identityService->findRegistrationAuthorityCredentialsOf(
$actorId->getIdentityId(),
);
- if (!$registrationAuthorityCredentials) {
+ if (!$registrationAuthorityCredentials instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials) {
return false;
}
return $registrationAuthorityCredentials->isSraa();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionAuthorizationContextInterface.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionAuthorizationContextInterface.php
index aaf7870bd..73919157f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionAuthorizationContextInterface.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionAuthorizationContextInterface.php
@@ -36,10 +36,10 @@ interface InstitutionAuthorizationContextInterface
/**
* @return InstitutionCollection
*/
- public function getInstitutions();
+ public function getInstitutions(): InstitutionCollection;
/**
* @return bool
*/
- public function isActorSraa();
+ public function isActorSraa(): bool;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
index 98125f2dd..023139a2e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
@@ -42,7 +42,7 @@ public function __construct(array $institutionRoles)
$this->institutionRoles = $institutionRoles;
}
- public function getRoles()
+ public function getRoles(): array
{
return $this->institutionRoles;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
index 380c70286..b4898fb17 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
@@ -20,5 +20,5 @@
interface InstitutionRoleSetInterface
{
- public function getRoles();
+ public function getRoles(): array;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/AllowedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/AllowedSecondFactor.php
index a9de9890d..4e94c5d1f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/AllowedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/AllowedSecondFactor.php
@@ -32,7 +32,7 @@ class AllowedSecondFactor
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institution;
+ public Institution $institution;
/**
*
@@ -40,7 +40,7 @@ class AllowedSecondFactor
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_second_factor_type')]
- public $secondFactorType;
+ public SecondFactorType $secondFactorType;
private function __construct()
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
index 1f30e0e10..5f6187205 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
@@ -31,7 +31,7 @@ class ConfiguredInstitution
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institution;
+ public Institution $institution;
public static function createFrom(Institution $institution): self
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionAuthorization.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionAuthorization.php
index 65c0d5904..fc33dbb34 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionAuthorization.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionAuthorization.php
@@ -34,7 +34,7 @@ class InstitutionAuthorization
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institution;
+ public Institution $institution;
/**
*
@@ -42,7 +42,7 @@ class InstitutionAuthorization
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institutionRelation;
+ public Institution $institutionRelation;
/**
*
@@ -50,7 +50,7 @@ class InstitutionAuthorization
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_institution_role', length: 10)]
- public $institutionRole;
+ public InstitutionRole $institutionRole;
/**
* @return InstitutionAuthorization
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionConfigurationOptions.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionConfigurationOptions.php
index f0c89b3f8..92684aef5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionConfigurationOptions.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/InstitutionConfigurationOptions.php
@@ -38,49 +38,49 @@ class InstitutionConfigurationOptions
*/
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institution;
+ public Institution $institution;
/**
* @var UseRaLocationsOption
*/
#[ORM\Column(type: 'stepup_use_ra_locations_option')]
- public $useRaLocationsOption;
+ public UseRaLocationsOption $useRaLocationsOption;
/**
* @var ShowRaaContactInformationOption
*/
#[ORM\Column(type: 'stepup_show_raa_contact_information_option')]
- public $showRaaContactInformationOption;
+ public ShowRaaContactInformationOption $showRaaContactInformationOption;
/**
* @var VerifyEmailOption
*/
#[ORM\Column(type: 'stepup_verify_email_option', options: ['default' => 1])]
- public $verifyEmailOption;
+ public VerifyEmailOption $verifyEmailOption;
/**
* @var SelfVetOption
*/
#[ORM\Column(type: 'stepup_self_vet_option', options: ['default' => 0])]
- public $selfVetOption;
+ public SelfVetOption $selfVetOption;
/**
* @var SsoOn2FaOption
*/
#[ORM\Column(type: 'stepup_sso_on_2fa_option', options: ['default' => 0])]
- public $ssoOn2faOption;
+ public SsoOn2faOption $ssoOn2faOption;
/**
* @var SelfAssertedTokensOption
*/
#[ORM\Column(type: 'stepup_self_asserted_tokens_option', options: ['default' => 0])]
- public $selfAssertedTokensOption;
+ public SelfAssertedTokensOption $selfAssertedTokensOption;
/**
* @var NumberOfTokensPerIdentityOption
*/
#[ORM\Column(type: 'stepup_number_of_tokens_per_identity_option', options: ['default' => 0])]
- public $numberOfTokensPerIdentityOption;
+ public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption;
public static function create(
Institution $institution,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
index b25d4e62f..a8379d948 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
@@ -38,43 +38,39 @@ class RaLocation implements JsonSerializable
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
/**
* @var Institution
*/
#[ORM\Column(type: 'stepup_configuration_institution')]
- public $institution;
+ public Institution $institution;
/**
* @var RaLocationName
*/
#[ORM\Column(type: 'stepup_ra_location_name')]
- public $name;
+ public RaLocationName $name;
/**
* @var Location
*/
#[ORM\Column(type: 'stepup_configuration_location')]
- public $location;
+ public Location $location;
/**
* @var ContactInformation
*/
#[ORM\Column(type: 'stepup_configuration_contact_information')]
- public $contactInformation;
+ public ContactInformation $contactInformation;
public static function create(
- $id,
+ string $id,
Institution $institution,
RaLocationName $name,
Location $location,
ContactInformation $contactInformation,
): self {
- if (!is_string($id)) {
- throw InvalidArgumentException::invalidType('string', 'id', $id);
- }
-
$raLocation = new self;
$raLocation->id = $id;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Query/RaLocationQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Query/RaLocationQuery.php
index 7fe232ee3..3550805e7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Query/RaLocationQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Query/RaLocationQuery.php
@@ -25,15 +25,15 @@ final class RaLocationQuery
/**
* @var string|Institution
*/
- public $institution;
+ public string|Institution $institution;
/**
* @var string
*/
- public $orderBy = 'name';
+ public string $orderBy = 'name';
/**
* @var string
*/
- public $orderDirection = 'asc';
+ public string $orderDirection = 'asc';
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/AllowedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/AllowedSecondFactorRepository.php
index 3e00a2817..384fedc02 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/AllowedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/AllowedSecondFactorRepository.php
@@ -23,6 +23,9 @@
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\AllowedSecondFactor;
+/**
+ * @extends ServiceEntityRepository
+ */
final class AllowedSecondFactorRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/ConfiguredInstitutionRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/ConfiguredInstitutionRepository.php
index 5860f1336..4acf92683 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/ConfiguredInstitutionRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/ConfiguredInstitutionRepository.php
@@ -23,6 +23,9 @@
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\ConfiguredInstitution;
+/**
+ * @extends ServiceEntityRepository
+ */
class ConfiguredInstitutionRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
index ac0ebf9f2..3c6b875f6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
@@ -27,6 +27,9 @@
use Surfnet\Stepup\Configuration\Value\InstitutionRole;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionAuthorization;
+/**
+ * @extends ServiceEntityRepository
+ */
class InstitutionAuthorizationRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -94,9 +97,6 @@ public function saveInstitutionOption(
$this->save($institution, $institutionOption->getInstitutionRole(), $institutionAuthorizations);
}
- /**
- * @throws OptimisticLockException
- */
public function clearInstitutionOption(Institution $institution): void
{
$entityManager = $this->getEntityManager();
@@ -133,7 +133,6 @@ public function setDefaultInstitutionOption(Institution $institution): void
/**
* @param InstitutionAuthorization[] $institutionAuthorizations
- * @throws OptimisticLockException
*/
private function save(Institution $institution, InstitutionRole $role, array $institutionAuthorizations): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
index ba9f5b9d7..bb8f422ad 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
@@ -24,6 +24,9 @@
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions;
+/**
+ * @extends ServiceEntityRepository
+ */
class InstitutionConfigurationOptionsRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
index 924a31fad..8b8d77f75 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
@@ -26,6 +26,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Query\RaLocationQuery;
use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException;
+/**
+ * @extends ServiceEntityRepository
+ */
class RaLocationRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -36,7 +39,7 @@ public function __construct(ManagerRegistry $registry)
/**
* @return null|RaLocation[]
*/
- public function search(RaLocationQuery $query)
+ public function search(RaLocationQuery $query): ?array
{
if (!in_array($query->orderBy, ['name', 'location', 'contact_information'])) {
throw new RuntimeException(sprintf('Unknown order by column "%s"', $query->orderBy));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
index 0f9bfb775..91b6c92ea 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorListService.php
@@ -33,7 +33,7 @@ public function __construct(
public function getAllowedSecondFactorListFor(Institution $institution): AllowedSecondFactorList
{
$allowedSecondFactors = array_map(
- fn(AllowedSecondFactor $allowedSecondFactor) => $allowedSecondFactor->secondFactorType,
+ fn(AllowedSecondFactor $allowedSecondFactor): \Surfnet\StepupBundle\Value\SecondFactorType => $allowedSecondFactor->secondFactorType,
$this->allowedSecondFactorRepository->getAllowedSecondFactorsFor($institution),
);
@@ -43,7 +43,7 @@ public function getAllowedSecondFactorListFor(Institution $institution): Allowed
/**
* @return AllowedSecondFactorMap
*/
- public function getAllowedSecondFactorMap()
+ public function getAllowedSecondFactorMap(): AllowedSecondFactorMap
{
return AllowedSecondFactorMap::from($this->allowedSecondFactorRepository->findAll());
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
index 72eb0a104..8aeac28bc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
@@ -37,7 +37,7 @@ private function __construct()
* @param AllowedSecondFactor[] $allowedSecondFactors
* @return AllowedSecondFactorMap
*/
- public static function from($allowedSecondFactors): self
+ public static function from(array $allowedSecondFactors): self
{
$allowedSecondFactorMap = new self();
foreach ($allowedSecondFactors as $allowedSecondFactor) {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationService.php
index 750f50df4..3a1b973c9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationService.php
@@ -49,7 +49,7 @@ public function findAuthorizationsByRoleFor(
/**
* @return InstitutionAuthorizationOptionMap
*/
- public function findAuthorizationsFor(Institution $institution)
+ public function findAuthorizationsFor(Institution $institution): InstitutionAuthorizationOptionMap
{
$authorizations = $this->repository->findAuthorizationOptionsForInstitution($institution);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
index 43a925138..b06d9686a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
@@ -44,7 +44,7 @@ public function findAllInstitutionConfigurationOptions(): array
/**
* @return InstitutionConfigurationOptions|null
*/
- public function findInstitutionConfigurationOptionsFor(Institution $institution)
+ public function findInstitutionConfigurationOptionsFor(Institution $institution): ?InstitutionConfigurationOptions
{
return $this->repository->findConfigurationOptionsFor($institution);
}
@@ -57,11 +57,11 @@ public function findInstitutionConfigurationOptionsFor(Institution $institution)
*
* @return int
*/
- public function getMaxNumberOfTokensFor(Institution $institution)
+ public function getMaxNumberOfTokensFor(Institution $institution): int
{
$configuration = $this->findInstitutionConfigurationOptionsFor($institution);
- if ($configuration !== null && $configuration->numberOfTokensPerIdentityOption->isEnabled()) {
+ if ($configuration instanceof \Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions && $configuration->numberOfTokensPerIdentityOption->isEnabled()) {
return $configuration->numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
index 0100df773..1705d4b88 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/RaLocationService.php
@@ -45,7 +45,7 @@ public function findByRaLocationId(RaLocationId $raLocationId): ?RaLocation
/**
- * @return RaLocation[]
+ * @return RaLocation[]|null
*/
public function listRaLocationsFor(Institution $institution): ?array
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
index 0a29858e7..7b13b7a9d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
@@ -34,7 +34,7 @@ public function __construct(
) {
}
- public function secondFactorAuditLog(Request $request, Institution $institution)
+ public function secondFactorAuditLog(Request $request, Institution $institution): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
index 54e65638c..003b4a559 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
@@ -30,7 +30,7 @@ public function __construct(
) {
}
- public function mayRegisterSelfAssertedTokens(string $identityId)
+ public function mayRegisterSelfAssertedTokens(string $identityId): JsonAuthorizationResponse
{
$decision = $this->authorizationService->assertRegistrationOfSelfAssertedTokensIsAllowed(
new IdentityId($identityId),
@@ -38,13 +38,13 @@ public function mayRegisterSelfAssertedTokens(string $identityId)
return JsonAuthorizationResponse::from($decision);
}
- public function mayRegisterRecoveryTokens(string $identityId)
+ public function mayRegisterRecoveryTokens(string $identityId): JsonAuthorizationResponse
{
$decision = $this->authorizationService->assertRecoveryTokensAreAllowed(new IdentityId($identityId));
return JsonAuthorizationResponse::from($decision);
}
- public function maySelfVetSelfAssertedToken(string $identityId)
+ public function maySelfVetSelfAssertedToken(string $identityId): JsonAuthorizationResponse
{
$decision = $this->authorizationService->assertSelfVetUsingSelfAssertedTokenIsAllowed(
new IdentityId($identityId),
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
index d3f2dd77d..fd827869d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
@@ -47,7 +47,6 @@ public function deprovision(string $collabPersonId): JsonResponse
// just so the deprovision run does not end prematurely. At this point, no other domain exceptions
// are thrown.
$userData = [];
- $errors = [];
} catch (Exception $e) {
$userData = [];
$errors = [$e->getMessage()];
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
index a231c531a..b84e47489 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
@@ -36,7 +36,7 @@ public function __construct(
) {
}
- public function get($id): JsonResponse
+ public function get(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -49,7 +49,7 @@ public function get($id): JsonResponse
return new JsonResponse($identity);
}
- public function collection(Request $request, Institution $institution)
+ public function collection(Request $request, Institution $institution): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -65,10 +65,7 @@ public function collection(Request $request, Institution $institution)
return JsonCollectionResponse::fromPaginator($paginator);
}
- /**
- * @param string $identityId
- */
- public function getRegistrationAuthorityCredentials($identityId): JsonResponse
+ public function getRegistrationAuthorityCredentials(string $identityId): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -76,7 +73,7 @@ public function getRegistrationAuthorityCredentials($identityId): JsonResponse
$credentials = $identityService->findRegistrationAuthorityCredentialsOf($identityId);
- if (!$credentials) {
+ if (!$credentials instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials) {
return new JsonNotFoundResponse();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
index 13dc93ff9..bcdc90f6f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
@@ -36,7 +36,7 @@ public function __construct(
) {
}
- public function getForInstitution($institutionName): JsonResponse
+ public function getForInstitution(string $institutionName): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_SS', 'ROLE_RA', 'ROLE_READ']);
@@ -50,7 +50,7 @@ public function getForInstitution($institutionName): JsonResponse
->allowedSecondFactorListService
->getAllowedSecondFactorListFor($institution);
- if ($institutionConfigurationOptions === null) {
+ if (!$institutionConfigurationOptions instanceof \Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions) {
throw new NotFoundHttpException(
sprintf('No institution configuration options found for institution "%s"', $institution),
);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
index 83a1f9b51..0a2c6e401 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
@@ -33,7 +33,7 @@ public function __construct(
) {
}
- public function get(Request $request, $identityId): JsonResponse
+ public function get(Request $request, string $identityId): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
index 5395e29af..06adaead9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
@@ -41,7 +41,7 @@ public function __construct(
/**
* @return JsonCollectionResponse
*/
- public function search(Request $request)
+ public function search(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
index c13c40e05..fccbd478e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
@@ -38,7 +38,7 @@ public function __construct(
) {
}
- public function get(Request $request, $identityId): JsonResponse
+ public function get(Request $request, string $identityId): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
@@ -56,7 +56,7 @@ public function get(Request $request, $identityId): JsonResponse
$authorizationContext,
);
- if ($raListing === null) {
+ if (!$raListing instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing) {
throw new NotFoundHttpException(sprintf("RaListing '%s' does not exist", $identityId));
}
@@ -66,7 +66,7 @@ public function get(Request $request, $identityId): JsonResponse
/**
* @return JsonCollectionResponse
*/
- public function search(Request $request)
+ public function search(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
index a2615fdf5..3cba5462d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
@@ -36,7 +36,7 @@ public function __construct(
) {
}
- public function collection(Request $request)
+ public function collection(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
index 36c68c3b1..de32a08c2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
@@ -45,7 +45,7 @@ public function __construct(
) {
}
- public function get($id): JsonResponse
+ public function get(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(sprintf('Received request to get recovery token: %s', $id));
@@ -58,7 +58,7 @@ public function get($id): JsonResponse
return new JsonResponse($recoveryToken);
}
- public function collection(Request $request)
+ public function collection(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
index 6d5b60853..8bebfb399 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
@@ -33,15 +33,14 @@ public function __construct(private readonly SraaService $sraaService)
/**
* @param string $nameId injected by symfony from the request
- * @return JsonNotFoundResponse|JsonResponse
*/
- public function get($nameId): JsonResponse
+ public function get(string $nameId): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
$sraa = $this->sraaService->findByNameId(new NameId($nameId));
- if (!$sraa) {
+ if (!$sraa instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Sraa) {
return new JsonNotFoundResponse();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
index c4f37f3d1..23247b188 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
@@ -35,7 +35,7 @@ public function __construct(
) {
}
- public function get($id): JsonResponse
+ public function get(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -48,7 +48,7 @@ public function get($id): JsonResponse
return new JsonResponse($secondFactor);
}
- public function collection(Request $request)
+ public function collection(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
index c6d4c7510..66c32cf3b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
@@ -46,7 +46,7 @@ public function __construct(
) {
}
- public function get($id): JsonResponse
+ public function get(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -59,7 +59,7 @@ public function get($id): JsonResponse
return new JsonResponse($secondFactor);
}
- public function collection(Request $request)
+ public function collection(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
@@ -87,7 +87,7 @@ public function collection(Request $request)
return JsonCollectionResponse::fromPaginator($paginator);
}
- public function collectionOfIdentity(Request $request)
+ public function collectionOfIdentity(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_SS', 'ROLE_READ']);
$query = new VerifiedSecondFactorOfIdentityQuery();
@@ -100,7 +100,7 @@ public function collectionOfIdentity(Request $request)
return JsonCollectionResponse::fromPaginator($paginator);
}
- public function getCanSkipProvePossession($id): JsonResponse
+ public function getCanSkipProvePossession(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
index 0b1aaf8a6..1f31f9aa3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
@@ -35,7 +35,7 @@ public function __construct(
) {
}
- public function get($id): JsonResponse
+ public function get(string $id): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
@@ -48,7 +48,7 @@ public function get($id): JsonResponse
return new JsonResponse($secondFactor);
}
- public function collection(Request $request)
+ public function collection(Request $request): JsonCollectionResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
index 4eae40def..e01f3ebb1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
@@ -34,7 +34,7 @@ public function __construct(
) {
}
- public function get($institution): JsonResponse
+ public function get(string $institution): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(sprintf('Received request to get a vetting type hint for institution: %s', $institution));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/DependencyInjection/Configuration.php b/src/Surfnet/StepupMiddleware/ApiBundle/DependencyInjection/Configuration.php
index e8d1e0b26..77012057c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/DependencyInjection/Configuration.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/DependencyInjection/Configuration.php
@@ -33,7 +33,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('http_basic_realm')
->defaultValue('Secure Gateway API')
->validate()
- ->ifTrue(fn($realm): bool => !is_string($realm) || empty($realm))
+ ->ifTrue(fn($realm): bool => !is_string($realm) || ($realm === '' || $realm === '0'))
->thenInvalid("Invalid HTTP Basic realm '%s'. Must be string and non-empty.")
->end()
->end()
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php
index 9bd69398d..db0b778e6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php
@@ -43,7 +43,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -52,7 +52,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?AuthorityRole
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
index 46d32d1bd..5d6f0a290 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
@@ -40,7 +40,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -49,7 +49,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?CommonName
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
index 08fc37f3b..ef3167b99 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
@@ -61,7 +61,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?ContactInformation
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationInstitutionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationInstitutionType.php
index 71ad6605e..af3c2f0a7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationInstitutionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationInstitutionType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof Institution) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?Institution
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationLocationType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationLocationType.php
index e7fb2b65f..55f0324f1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationLocationType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationLocationType.php
@@ -42,7 +42,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof Location) {
@@ -61,7 +61,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?Location
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php
index 00ab5cf24..d9b399dab 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php
@@ -42,7 +42,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -51,7 +51,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?ContactInformation
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
index dfd3be74b..0457837a5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
@@ -60,7 +60,7 @@ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform)
public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime
{
if (is_null($value)) {
- return $value;
+ return null;
}
$dateTime = CoreDateTime::createFromFormat(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php
index ce935f4c9..90e3b1ac7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -48,7 +48,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?Email
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionRoleType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionRoleType.php
index 4fc263f81..2630e86be 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionRoleType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionRoleType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof InstitutionRole) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?InstitutionRole
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php
index c90021a23..d4570b01c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -48,7 +48,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?Institution
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php
index 055b1e90a..a46588ecf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php
@@ -42,7 +42,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -51,7 +51,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?Locale
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php
index f19297148..1a4bfe8a7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php
@@ -42,7 +42,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -51,7 +51,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?Location
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php
index 869d80250..83c31c081 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -48,7 +48,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?NameId
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php
index 1faced276..91d0c4de8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof NumberOfTokensPerIdentityOption) {
@@ -59,7 +59,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?NumberOfTokensPerIdentityOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RaLocationNameType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RaLocationNameType.php
index f7ef6b22e..bdc0efdcc 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RaLocationNameType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RaLocationNameType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof RaLocationName) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
public function convertToPHPValue($value, AbstractPlatform $platform): ?RaLocationName
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php
index 07e97e32a..f6507e266 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php
@@ -39,7 +39,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (is_null($value)) {
- return $value;
+ return null;
}
return (string)$value;
@@ -48,7 +48,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
public function convertToPHPValue($value, AbstractPlatform $platform): ?SecondFactorType
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfAssertedTokensOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfAssertedTokensOptionType.php
index 9279bed32..b6297d277 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfAssertedTokensOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfAssertedTokensOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getIntegerTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof SelfAssertedTokensOption) {
@@ -59,7 +59,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?SelfAssertedTokensOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfVetOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfVetOptionType.php
index 05cf575b7..ba8006124 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfVetOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfVetOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getIntegerTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof SelfVetOption) {
@@ -59,7 +59,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?SelfVetOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ShowRaaContactInformationOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ShowRaaContactInformationOptionType.php
index 81fe0a979..263320b61 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ShowRaaContactInformationOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ShowRaaContactInformationOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getBooleanTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof ShowRaaContactInformationOption) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?ShowRaaContactInformationOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SsoOn2faOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SsoOn2faOptionType.php
index 36dad55b7..dcac72b54 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SsoOn2faOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SsoOn2faOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getIntegerTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof SsoOn2faOption) {
@@ -59,7 +59,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?SsoOn2faOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/UseRaLocationsOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/UseRaLocationsOptionType.php
index ff4775de2..b4473bde8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/UseRaLocationsOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/UseRaLocationsOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getBooleanTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof UseRaLocationsOption) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?UseRaLocationsOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VerifyEmailOptionType.php b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VerifyEmailOptionType.php
index f833de453..ef7fa4a3d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VerifyEmailOptionType.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VerifyEmailOptionType.php
@@ -36,10 +36,10 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
return $platform->getBooleanTypeDeclarationSQL($column);
}
- public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
+ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?int
{
if (is_null($value)) {
- return $value;
+ return null;
}
if (!$value instanceof VerifyEmailOption) {
@@ -58,7 +58,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?int
public function convertToPHPValue($value, AbstractPlatform $platform): ?VerifyEmailOption
{
if (is_null($value)) {
- return $value;
+ return null;
}
try {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php b/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
index df2fb4e40..bcbdba467 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
@@ -45,7 +45,7 @@ public function onKernelException(ExceptionEvent $event): void
$this->logException($throwable);
- if ($throwable instanceof HttpExceptionInterface && $throwable instanceof Throwable) {
+ if ($throwable instanceof HttpExceptionInterface) {
$statusCode = $throwable->getStatusCode();
$headers = $throwable->getHeaders();
} else {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
index 7a98eb9aa..561bc86b1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
@@ -121,13 +121,13 @@ class AuditLogEntry implements JsonSerializable
public string $id;
#[ORM\Column(length: 36, nullable: true)]
- public ?string $actorId;
+ public ?string $actorId = null;
#[ORM\Column(type: 'stepup_common_name', nullable: true)]
- public CommonName $actorCommonName;
+ public ?CommonName $actorCommonName = null;
#[ORM\Column(type: 'institution', nullable: true)]
- public ?Institution $actorInstitution;
+ public ?Institution $actorInstitution = null;
/**
* Only in certain situations will this field be filled, It represents the RA institution the
@@ -135,7 +135,7 @@ class AuditLogEntry implements JsonSerializable
* institution-a. The actual institution John is appointed RA for is stored in this field.
*/
#[ORM\Column(length: 255, nullable: true)]
- public ?string $raInstitution;
+ public ?string $raInstitution = null;
#[ORM\Column(length: 36)]
public string $identityId;
@@ -144,19 +144,19 @@ class AuditLogEntry implements JsonSerializable
public Institution $identityInstitution;
#[ORM\Column(length: 36, nullable: true)]
- public ?string $secondFactorId;
+ public ?string $secondFactorId = null;
#[ORM\Column(length: 255, nullable: true)]
- public string $secondFactorIdentifier;
+ public ?string $secondFactorIdentifier = null;
#[ORM\Column(length: 36, nullable: true)]
- public ?string $secondFactorType;
+ public ?string $secondFactorType = null;
#[ORM\Column(length: 255, nullable: true)]
- public string $recoveryTokenIdentifier;
+ public ?string $recoveryTokenIdentifier;
#[ORM\Column(length: 36, nullable: true)]
- public ?string $recoveryTokenType;
+ public ?string $recoveryTokenType = null;
#[ORM\Column(length: 255)]
public string $event;
@@ -168,7 +168,7 @@ public function jsonSerialize(): array
{
return [
'actor_id' => $this->actorId,
- 'actor_institution' => $this->actorInstitution ? (string)$this->actorInstitution : null,
+ 'actor_institution' => $this->actorInstitution instanceof \Surfnet\Stepup\Identity\Value\Institution ? (string)$this->actorInstitution : null,
'actor_common_name' => $this->actorCommonName,
'identity_id' => $this->identityId,
'identity_institution' => (string)$this->identityInstitution,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
index 57cfbd94b..cf89dd2ce 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
@@ -52,7 +52,7 @@ class Identity implements JsonSerializable
#[ORM\Column(type: 'stepup_locale')]
public Locale $preferredLocale;
- public ?bool $possessedSelfAssertedToken;
+ public ?bool $possessedSelfAssertedToken = null;
public static function create(
string $id,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
index 75c5cbabe..3848c981c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
@@ -94,7 +94,7 @@ class RaListing implements JsonSerializable
public ContactInformation $contactInformation;
public static function create(
- $identityId,
+ string $identityId,
Institution $institution,
CommonName $commonName,
Email $email,
@@ -103,10 +103,6 @@ public static function create(
ContactInformation $contactInformation,
Institution $raInstitution,
): self {
- if (!is_string($identityId)) {
- throw InvalidArgumentException::invalidType('string', 'id', $identityId);
- }
-
$entry = new self();
$entry->identityId = $identityId;
$entry->institution = $institution;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
index ac0a833db..e3142f912 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
@@ -40,49 +40,12 @@
#[ORM\Entity(repositoryClass: RaSecondFactorRepository::class)]
class RaSecondFactor implements JsonSerializable
{
- /**
- * @var Institution
- */
- #[ORM\Column(type: 'institution')]
- public Institution $institution;
-
- /**
- * The name of the registrant.
- *
- *
- * @var CommonName
- */
- #[ORM\Column(type: 'stepup_common_name')]
- public CommonName $name;
-
- /**
- * The e-mail of the registrant.
- *
- *
- * @var Email
- */
- #[ORM\Column(type: 'stepup_email')]
- public Email $email;
-
- /**
- * @var DocumentNumber
- */
- #[ORM\Column(type: 'stepup_document_number', nullable: true)]
- public ?DocumentNumber $documentNumber;
-
/**
* @var SecondFactorStatus
*/
#[ORM\Column(type: 'stepup_second_factor_status')]
public SecondFactorStatus $status;
- /**
- * @param string $id
- * @param string $type
- * @param string $secondFactorId
- * @param string $identityId
- * @param DocumentNumber|null $documentNumber
- */
public function __construct(
#[ORM\Id]
#[ORM\Column(length: 36)]
@@ -93,15 +56,21 @@ public function __construct(
public string $secondFactorId,
#[ORM\Column(length: 36)]
public string $identityId,
- Institution $institution,
- CommonName $name,
- Email $email,
- DocumentNumber $documentNumber = null,
+ #[ORM\Column(type: 'institution')]
+ public Institution $institution,
+ /**
+ * The name of the registrant.
+ */
+ #[ORM\Column(type: 'stepup_common_name')]
+ public CommonName $name,
+ /**
+ * The e-mail of the registrant.
+ */
+ #[ORM\Column(type: 'stepup_email')]
+ public Email $email,
+ #[ORM\Column(type: 'stepup_document_number', nullable: true)]
+ public ?DocumentNumber $documentNumber = null,
) {
- $this->institution = $institution;
- $this->name = $name;
- $this->email = $email;
- $this->documentNumber = $documentNumber;
$this->status = SecondFactorStatus::unverified();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
index ad0a00935..404c091f9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/SecondFactorRevocation.php
@@ -45,7 +45,7 @@ class SecondFactorRevocation
* @var string|null
*/
#[ORM\Column(length: 36, nullable: true)]
- public ?string $secondFactorType;
+ public ?string $secondFactorType = null;
/**
* @var string
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
index f3ea7d99b..2ddb0cf64 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
@@ -43,11 +43,11 @@ class VettedSecondFactor implements JsonSerializable
public string $secondFactorIdentifier;
#[ORM\Column(length: 255, nullable: true)]
- public ?string $vettingType;
+ public ?string $vettingType = null;
public function isEqual(VettedSecondFactor $vettedSecondFactor): bool
{
- return $vettedSecondFactor->type == $this->type && $vettedSecondFactor->secondFactorIdentifier == $this->secondFactorIdentifier;
+ return $vettedSecondFactor->type === $this->type && $vettedSecondFactor->secondFactorIdentifier === $this->secondFactorIdentifier;
}
public function vettingType(): string
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
index 73babc76e..e22f7c590 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
@@ -29,6 +29,7 @@
use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent;
use Surfnet\Stepup\Identity\Event\RecoveryTokenRevokedEvent;
use Surfnet\Stepup\Identity\Value\CommonName;
+use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\RecoveryTokenIdentifierFactory;
use Surfnet\Stepup\Identity\Value\RecoveryTokenType;
use Surfnet\Stepup\Identity\Value\VettingType;
@@ -99,7 +100,7 @@ private function applyAuditableEvent(AuditableEvent $event, DomainMessage $domai
$this->augmentActorCommonName($entry, $auditLogMetadata);
if (isset($metadata['actorInstitution'])) {
- $entry->actorInstitution = $metadata['actorInstitution'];
+ $entry->actorInstitution = new Institution($metadata['actorInstitution']);
}
$entry->identityId = (string)$auditLogMetadata->identityId;
@@ -107,11 +108,11 @@ private function applyAuditableEvent(AuditableEvent $event, DomainMessage $domai
$entry->event = $event::class;
$entry->recordedOn = new DateTime(new CoreDateTime($domainMessage->getRecordedOn()->toString()));
- if ($auditLogMetadata->secondFactorId) {
+ if ($auditLogMetadata->secondFactorId instanceof \Surfnet\Stepup\Identity\Value\SecondFactorId) {
$entry->secondFactorId = (string)$auditLogMetadata->secondFactorId;
}
- if ($auditLogMetadata->secondFactorType) {
+ if ($auditLogMetadata->secondFactorType instanceof \Surfnet\StepupBundle\Value\SecondFactorType) {
$entry->secondFactorType = (string)$auditLogMetadata->secondFactorType;
}
@@ -122,15 +123,15 @@ private function applyAuditableEvent(AuditableEvent $event, DomainMessage $domai
$entry->recoveryTokenIdentifier = (string)$auditLogMetadata->recoveryTokenId;
}
- if ($auditLogMetadata->recoveryTokenType) {
+ if ($auditLogMetadata->recoveryTokenType instanceof \Surfnet\Stepup\Identity\Value\RecoveryTokenType) {
$entry->recoveryTokenType = (string)$auditLogMetadata->recoveryTokenType;
}
- if ($auditLogMetadata->secondFactorIdentifier) {
+ if ($auditLogMetadata->secondFactorIdentifier instanceof \Surfnet\Stepup\Identity\Value\SecondFactorIdentifier) {
$entry->secondFactorIdentifier = (string)$auditLogMetadata->secondFactorIdentifier;
}
- if ($auditLogMetadata->raInstitution) {
+ if ($auditLogMetadata->raInstitution instanceof \Surfnet\Stepup\Identity\Value\Institution) {
$entry->raInstitution = (string)$auditLogMetadata->raInstitution;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
index 51b74d97d..e5eeb4af9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
@@ -94,7 +94,7 @@ public function applyRegistrationAuthorityInformationAmendedForInstitutionEvent(
$event->raInstitution,
);
- if (!$raListing) {
+ if (!$raListing instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing) {
throw new RuntimeException(
"Tried to amend an RaListing's registration authority location and contact information, " .
"but the listing could not be found",
@@ -198,7 +198,7 @@ public function applyRegistrationAuthorityInformationAmendedEvent(
$event->identityInstitution,
);
- if (!$raListing) {
+ if (!$raListing instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing) {
throw new RuntimeException(
"Tried to amend an RaListing's registration authority location and contact information, " .
"but the listing could not be found",
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
index f53847231..5aaa351d7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
@@ -219,7 +219,6 @@ public function applyU2fDevicePossessionProvenAndVerifiedEvent(U2fDevicePossessi
}
/**
- * @param string $secondFactorIdentifier
* @param SecondFactorStatus|null $status
* @param DocumentNumber|null $documentNumber
*/
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
index 42e5c64f0..b78b993a5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
@@ -182,7 +182,7 @@ public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event): vo
// In case the vetting type is unknown (for example when no event replay was performed)
// fall back to the unknown vetting type.
$vettingType = $event->vettingType;
- if (!$vettingType) {
+ if (!$vettingType instanceof \Surfnet\Stepup\Identity\Value\VettingType) {
$vettingType = new UnknownVettingType();
}
$vetted->vettingType = $vettingType->type();
@@ -221,7 +221,7 @@ public function applySecondFactorVettedWithoutTokenProofOfPossession(
$vettingType = $event->vettingType;
// In case the vetting type is unknown (for example when no event replay was performed)
// fall back to the unknown vetting type.
- if (!$vettingType) {
+ if (!$vettingType instanceof \Surfnet\Stepup\Identity\Value\VettingType) {
$vettingType = new UnknownVettingType();
}
$vetted->vettingType = $vettingType->type();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
index 5bbc0a001..45d7327fb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Query/UnverifiedSecondFactorQuery.php
@@ -27,5 +27,5 @@ class UnverifiedSecondFactorQuery extends AbstractQuery
/**
* @var string|null
*/
- public ?string $verificationNonce;
+ public ?string $verificationNonce = null;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
index 53ce97c6c..4b8d03466 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
@@ -57,6 +57,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\SecondFactorAuditLogQuery;
+/**
+ * @extends ServiceEntityRepository
+ */
class AuditLogRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
index f61331e7b..c141be035 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
@@ -37,6 +37,7 @@
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @extends ServiceEntityRepository
*/
class AuthorizationRepository extends ServiceEntityRepository
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
index 00861a154..761da538e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
@@ -28,6 +28,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\IdentityQuery;
+/**
+ * @extends ServiceEntityRepository
+ */
class IdentityRepository extends ServiceEntityRepository
{
public function __construct(
@@ -65,19 +68,19 @@ public function createSearchQuery(
->setParameter('institution', $query->institution);
}
- if ($query->nameId) {
+ if ($query->nameId !== '' && $query->nameId !== '0') {
$queryBuilder
->andWhere('i.nameId = :nameId')
->setParameter('nameId', $query->nameId);
}
- if ($query->email) {
+ if ($query->email !== '' && $query->email !== '0') {
$queryBuilder
->andWhere('i.email LIKE :email')
->setParameter('email', sprintf('%%%s%%', $query->email));
}
- if ($query->commonName) {
+ if ($query->commonName !== '' && $query->commonName !== '0') {
$queryBuilder
->andWhere('i.commonName LIKE :commonName')
->setParameter('commonName', sprintf('%%%s%%', $query->commonName));
@@ -137,26 +140,4 @@ public function findOneByNameId(string $nameId): ?Identity
{
return $this->findOneBy(['nameId' => $nameId]);
}
-
- public function removeByIdentityId(IdentityId $identityId): void
- {
- $this->getEntityManager()->createQueryBuilder()
- ->delete($this->getEntityName(), 'i')
- ->where('i.id = :identityId')
- ->setParameter('identityId', $identityId->getIdentityId())
- ->getQuery()
- ->execute();
- }
-
- /**
- * @return ArrayCollection|Identity[]
- */
- public function findByInstitution(Institution $institution): ArrayCollection|array
- {
- return $this->createQueryBuilder('i')
- ->where('i.institution = :institution')
- ->setParameter('institution', $institution->getInstitution())
- ->getQuery()
- ->getResult();
- }
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
index a6009de88..94bd56bb0 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentitySelfAssertedTokenOptionsRepository.php
@@ -22,6 +22,9 @@
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\IdentitySelfAssertedTokenOptions;
+/**
+ * @extends ServiceEntityRepository
+ */
class IdentitySelfAssertedTokenOptionsRepository extends ServiceEntityRepository
{
public function __construct(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/InstitutionListingRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/InstitutionListingRepository.php
index 38459867e..909decef4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/InstitutionListingRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/InstitutionListingRepository.php
@@ -21,11 +21,13 @@
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\Stepup\Identity\Value\Institution;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\InstitutionListing;
/**
* @deprecated This could probably be removed and is only used in migrations
* @see app/DoctrineMigrations/Version20160719090052.php#L51
+ * @extends ServiceEntityRepository
*/
class InstitutionListingRepository extends ServiceEntityRepository
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
index a9c9fed07..47576a71b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
@@ -35,6 +35,7 @@
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @extends ServiceEntityRepository
*/
class RaCandidateRepository extends ServiceEntityRepository
{
@@ -69,19 +70,19 @@ public function createSearchQuery(RaCandidateQuery $query): Query
->setParameter('institution', $query->institution);
}
- if ($query->commonName) {
+ if ($query->commonName !== '' && $query->commonName !== '0') {
$queryBuilder
->andWhere('i.commonName LIKE :commonName')
->setParameter('commonName', sprintf('%%%s%%', $query->commonName));
}
- if ($query->email) {
+ if ($query->email !== '' && $query->email !== '0') {
$queryBuilder
->andWhere('i.email LIKE :email')
->setParameter('email', sprintf('%%%s%%', $query->email));
}
- if (!empty($query->secondFactorTypes)) {
+ if (isset($query->secondFactorTypes) && $query->secondFactorTypes !== []) {
$queryBuilder
->andWhere('vsf.type IN (:secondFactorTypes)')
->setParameter('secondFactorTypes', $query->secondFactorTypes);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
index 80740d199..8515f6056 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
@@ -32,6 +32,7 @@
/**
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @extends ServiceEntityRepository
*/
class RaListingRepository extends ServiceEntityRepository
{
@@ -112,7 +113,7 @@ public function createSearchQuery(RaListingQuery $query): Query
->setParameter('institution', $query->institution);
}
- if ($query->identityId) {
+ if ($query->identityId instanceof IdentityId) {
$queryBuilder
->andWhere('r.identityId = :identityId')
->setParameter('identityId', (string)$query->identityId);
@@ -153,7 +154,7 @@ public function createSearchQuery(RaListingQuery $query): Query
'iac',
);
- if (!$query->orderBy) {
+ if ($query->orderBy === '' || $query->orderBy === '0') {
return $queryBuilder->getQuery();
}
@@ -187,6 +188,9 @@ public function createOptionsQuery(RaListingQuery $query): Query
return $queryBuilder->getQuery();
}
+ /**
+ * @return ArrayCollection
+ */
public function listRasFor(Institution $raInstitution): ArrayCollection
{
$listings = $this->createQueryBuilder('rl')
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
index e9bd671dc..2d2b57a8d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaSecondFactorRepository.php
@@ -30,6 +30,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\SecondFactorStatus;
+/**
+ * @extends ServiceEntityRepository
+ */
class RaSecondFactorRepository extends ServiceEntityRepository
{
public function __construct(
@@ -48,7 +51,6 @@ public function find(mixed $id, $lockMode = null, $lockVersion = null): ?RaSecon
}
/**
- * @param string $identityId
* @return RaSecondFactor[]
*/
public function findByIdentityId(string $identityId): array
@@ -58,7 +60,6 @@ public function findByIdentityId(string $identityId): array
/**
- * @param string $institution
* @return RaSecondFactor[]
*/
public function findByInstitution(string $institution): array
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
index 9923a9a25..6f4b1ea9a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
@@ -30,6 +30,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RecoveryTokenQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RecoveryTokenStatus;
+/**
+ * @extends ServiceEntityRepository
+ */
class RecoveryTokenRepository extends ServiceEntityRepository
{
public function __construct(
@@ -60,7 +63,7 @@ public function createSearchQuery(RecoveryTokenQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('rt');
- if ($query->authorizationContext) {
+ if ($query->authorizationContext instanceof \Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContextInterface) {
// Modify query to filter on authorization context
// We want to list all recovery tokens of the institution we are RA for.
$this->authorizationRepositoryFilter->filter(
@@ -70,7 +73,7 @@ public function createSearchQuery(RecoveryTokenQuery $query): Query
'iac',
);
}
- if ($query->identityId) {
+ if ($query->identityId instanceof \Surfnet\Stepup\Identity\Value\IdentityId) {
$queryBuilder
->andWhere('rt.identityId = :identityId')
->setParameter('identityId', $query->identityId);
@@ -136,7 +139,7 @@ public function createOptionsQuery(RecoveryTokenQuery $query): Query
->select('sf.institution')
->groupBy('sf.institution');
- if ($query->authorizationContext) {
+ if ($query->authorizationContext instanceof \Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContextInterface) {
// Modify query to filter on authorization context
// We want to list all second factors of the institution we are RA for.
$this->authorizationRepositoryFilter->filter(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SecondFactorRevocationRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SecondFactorRevocationRepository.php
index 28eaecd44..6bc37cca7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SecondFactorRevocationRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SecondFactorRevocationRepository.php
@@ -22,6 +22,9 @@
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\SecondFactorRevocation;
+/**
+ * @extends ServiceEntityRepository
+ */
class SecondFactorRevocationRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
index 9ceaf764c..847ceeebb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
@@ -24,6 +24,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Exception\InvalidArgumentException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Sraa;
+/**
+ * @extends ServiceEntityRepository
+ */
class SraaRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -83,10 +86,7 @@ public function saveAll(array $sraaList): void
$entityManager->flush();
}
- /**
- * @return null|Sraa
- */
- public function findByNameId(NameId $nameId): ?object
+ public function findByNameId(NameId $nameId): ?Sraa
{
return $this->findOneBy(['nameId' => (string)$nameId]);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
index 1c39b1df8..e95c72ecf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/UnverifiedSecondFactorRepository.php
@@ -25,6 +25,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\UnverifiedSecondFactor;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\UnverifiedSecondFactorQuery;
+/**
+ * @extends ServiceEntityRepository
+ */
class UnverifiedSecondFactorRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -47,7 +50,7 @@ public function createSearchQuery(UnverifiedSecondFactorQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('sf');
- if ($query->identityId) {
+ if ($query->identityId instanceof \Surfnet\Stepup\Identity\Value\IdentityId) {
$queryBuilder
->andWhere('sf.identityId = :identityId')
->setParameter('identityId', (string)$query->identityId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
index 00d395564..5d3dd5f19 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
@@ -28,6 +28,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\VerifiedSecondFactorOfIdentityQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\VerifiedSecondFactorQuery;
+/**
+ * @extends ServiceEntityRepository
+ */
class VerifiedSecondFactorRepository extends ServiceEntityRepository
{
public function __construct(
@@ -72,13 +75,13 @@ public function createSearchQuery(VerifiedSecondFactorQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('sf');
- if ($query->identityId) {
+ if ($query->identityId instanceof \Surfnet\Stepup\Identity\Value\IdentityId) {
$queryBuilder
->andWhere('sf.identityId = :identityId')
->setParameter('identityId', (string)$query->identityId);
}
- if ($query->secondFactorId) {
+ if ($query->secondFactorId instanceof \Surfnet\Stepup\Identity\Value\SecondFactorId) {
$queryBuilder
->andWhere('sf.id = :secondFactorId')
->setParameter('secondFactorId', (string)$query->secondFactorId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
index cc5ea423f..ef86bb5d1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettedSecondFactorRepository.php
@@ -25,6 +25,9 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VettedSecondFactor;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\VettedSecondFactorQuery;
+/**
+ * @extends ServiceEntityRepository
+ */
class VettedSecondFactorRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -44,7 +47,7 @@ public function createSearchQuery(VettedSecondFactorQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('sf');
- if ($query->identityId) {
+ if ($query->identityId instanceof \Surfnet\Stepup\Identity\Value\IdentityId) {
$queryBuilder
->andWhere('sf.identityId = :identityId')
->setParameter('identityId', (string)$query->identityId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettingTypeHintRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettingTypeHintRepository.php
index e48f6eec3..a28dbc8a9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettingTypeHintRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VettingTypeHintRepository.php
@@ -22,6 +22,9 @@
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VettingTypeHint;
+/**
+ * @extends ServiceEntityRepository
+ */
class VettingTypeHintRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
index 7f8ca425f..5c6f67d69 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
@@ -24,6 +24,9 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\WhitelistEntry;
+/**
+ * @extends ServiceEntityRepository
+ */
class WhitelistEntryRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -85,7 +88,7 @@ public function remove(array $whitelistEntries): void
$entityManager->flush();
}
- public function hasEntryFor(mixed $institution): bool
+ public function hasEntryFor(string $institution): bool
{
$count = $this->createQueryBuilder('w')
->select('COUNT(w.institution)')
@@ -98,7 +101,7 @@ public function hasEntryFor(mixed $institution): bool
}
/**
- * @return ArrayCollection
+ * @return ArrayCollection
*/
public function getAll(): ArrayCollection
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
index add967864..eea808ed4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
@@ -28,7 +28,7 @@
class AbstractSearchService
{
protected function createPaginatorFrom(
- $doctrineQuery,
+ QueryBuilder|Query $doctrineQuery,
AbstractQuery $query,
bool $fetchCollection = true,
): Pagerfanta {
@@ -54,6 +54,9 @@ protected function createPaginatorFrom(
return $paginator;
}
+ /**
+ * @return array>
+ */
protected function getFilteredQueryOptions(Query $doctrineQuery): array
{
$filters = [];
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
index f6e39abb4..e520657c1 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AuditLogService.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Service;
use Pagerfanta\Pagerfanta;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\SecondFactorAuditLogQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\AuditLogRepository;
@@ -29,7 +30,7 @@ public function __construct(private readonly AuditLogRepository $repository)
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function searchSecondFactorAuditLog(SecondFactorAuditLogQuery $query): Pagerfanta
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
index 86785487d..82d01a89a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
@@ -46,15 +46,14 @@ public function __construct(
) {
}
- /**
- * @param string $id
- * @return Identity|null
- */
- public function find(mixed $id): ?Identity
+ public function find(string $id): ?Identity
{
return $this->repository->find($id);
}
+ /**
+ * @return Pagerfanta
+ */
public function search(IdentityQuery $query): Pagerfanta
{
$searchQuery = $this->repository->createSearchQuery($query);
@@ -109,9 +108,6 @@ public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(
return $this->findRegistrationAuthorityCredentialsByIdentity($identity);
}
- /**
- * @return null|RegistrationAuthorityCredentials
- */
private function findRegistrationAuthorityCredentialsByIdentity(Identity $identity): ?RegistrationAuthorityCredentials
{
$raListing = $this->raListingRepository->findByIdentityId(new IdentityId($identity->id));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
index cfe3b5908..570fb68b5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/ProfileService.php
@@ -45,9 +45,6 @@ public function __construct(
* Profile. Its possible to retrieve profile data for a non RA user, in that case no authorization data is set
* on the profile. The same goes for the SRAA user. As that user is allowed all authorizations for all institutions.
* An additional isSraa flag is set to true for these administrators.
- *
- * @param string $identityId
- * @return Profile|null
*/
public function createProfile(string $identityId): ?Profile
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
index 48b0f05a3..3fdd6d16f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
@@ -21,6 +21,7 @@
use Pagerfanta\Pagerfanta;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContext;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaCandidate;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaCandidateQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RaCandidateRepository;
@@ -31,7 +32,7 @@ public function __construct(private readonly RaCandidateRepository $raCandidateR
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function search(RaCandidateQuery $query): Pagerfanta
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
index 902d3c134..705828d56 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
@@ -50,7 +50,7 @@ public function findByIdentityIdAndRaInstitutionWithContext(
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function search(RaListingQuery $query): Pagerfanta
{
@@ -60,7 +60,7 @@ public function search(RaListingQuery $query): Pagerfanta
}
/**
- * @return array
+ * @return array>
*/
public function getFilterOptions(RaListingQuery $query): array
{
@@ -75,7 +75,7 @@ public function listRegistrationAuthoritiesFor(Institution $institution): array
$raListings = $this->raListingRepository->listRasFor($institution);
return $raListings
- ->map(fn(RaListing $raListing) => RegistrationAuthorityCredentials::fromRaListing($raListing))
+ ->map(fn(RaListing $raListing): \Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials => RegistrationAuthorityCredentials::fromRaListing($raListing))
->toArray();
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
index f58423391..1de65395c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Service;
use Pagerfanta\Pagerfanta;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaSecondFactor;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RaSecondFactorRepository;
@@ -29,7 +30,7 @@ public function __construct(private readonly RaSecondFactorRepository $repositor
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function search(RaSecondFactorQuery $query): Pagerfanta
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
index 3a3760e9b..6ddfdeaea 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
@@ -33,6 +33,9 @@ public function __construct(private readonly RecoveryTokenRepository $recoveryTo
{
}
+ /**
+ * @return Pagerfanta
+ */
public function search(RecoveryTokenQuery $query): Pagerfanta
{
$doctrineQuery = $this->recoveryTokenRepository->createSearchQuery($query);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
index cb2372df8..8ae2f6ae3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SecondFactorService.php
@@ -46,7 +46,7 @@ public function __construct(
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function searchUnverifiedSecondFactors(UnverifiedSecondFactorQuery $query): Pagerfanta
{
@@ -56,7 +56,7 @@ public function searchUnverifiedSecondFactors(UnverifiedSecondFactorQuery $query
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function searchVerifiedSecondFactors(VerifiedSecondFactorQuery $query): Pagerfanta
{
@@ -67,7 +67,7 @@ public function searchVerifiedSecondFactors(VerifiedSecondFactorQuery $query): P
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function searchVerifiedSecondFactorsOfIdentity(VerifiedSecondFactorOfIdentityQuery $query): Pagerfanta
{
@@ -77,7 +77,7 @@ public function searchVerifiedSecondFactorsOfIdentity(VerifiedSecondFactorOfIden
}
/**
- * @return Pagerfanta
+ * @return Pagerfanta
*/
public function searchVettedSecondFactors(VettedSecondFactorQuery $query): Pagerfanta
{
@@ -86,27 +86,16 @@ public function searchVettedSecondFactors(VettedSecondFactorQuery $query): Pager
return $this->createPaginatorFrom($doctrineQuery, $query);
}
- /**
- * @return null|UnverifiedSecondFactor
- */
public function findUnverified(SecondFactorId $id): ?UnverifiedSecondFactor
{
return $this->unverifiedRepository->find($id);
}
-
- /**
- * @return null|VerifiedSecondFactor
- */
public function findVerified(SecondFactorId $id): ?VerifiedSecondFactor
{
return $this->verifiedRepository->find($id);
}
-
- /**
- * @return null|VettedSecondFactor
- */
public function findVetted(SecondFactorId $id): ?VettedSecondFactor
{
return $this->vettedRepository->find($id);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
index 6a924103d..5ab04a439 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/SraaService.php
@@ -28,9 +28,6 @@ public function __construct(private readonly SraaRepository $sraaRepository)
{
}
- /**
- * @return Sraa|null
- */
public function findByNameId(NameId $nameId): ?Sraa
{
return $this->sraaRepository->findByNameId($nameId);
@@ -44,9 +41,6 @@ public function findAll(): array
return $this->sraaRepository->findAll();
}
- /**
- * @return bool
- */
public function contains(NameId $nameId): bool
{
return $this->sraaRepository->contains($nameId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
index 966deb0e4..ce2fd5af6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/WhitelistService.php
@@ -18,6 +18,8 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Service;
+use Doctrine\Common\Collections\ArrayCollection;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\WhitelistEntry;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\WhitelistEntryRepository;
class WhitelistService
@@ -26,12 +28,15 @@ public function __construct(private readonly WhitelistEntryRepository $whitelist
{
}
- public function isWhitelisted($institution): bool
+ public function isWhitelisted(string $institution): bool
{
return $this->whitelistEntryRepository->hasEntryFor($institution);
}
- public function getAllEntries(): \Doctrine\Common\Collections\ArrayCollection
+ /**
+ * @return ArrayCollection
+ */
+ public function getAllEntries(): ArrayCollection
{
return $this->whitelistEntryRepository->getAll();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
index 5d7900c57..d21ac121d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
@@ -22,8 +22,5 @@
interface SpecificationInterface
{
- /**
- * @return mixed
- */
public function apply(EntityRepository $entityRepository): mixed;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
index 6b3ff1ad1..c707a387b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorityRole.php
@@ -32,9 +32,9 @@ class AuthorityRole implements Stringable
/**
* @var string
*/
- private string $role;
+ private readonly string $role;
- public function __construct($role)
+ public function __construct(string $role)
{
if (!in_array($role, [self::ROLE_RA, self::ROLE_RAA, self::ROLE_SRAA])) {
throw InvalidArgumentException::invalidType(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
index 4b92abc0b..78eb988bd 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
@@ -23,10 +23,7 @@
class Profile implements JsonSerializable
{
- /**
- *
- * @param bool $isSraa
- */
+
public function __construct(
private readonly Identity $identity,
private readonly AuthorizedInstitutionCollection $authorizedInstitutionCollection,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
index 620c02113..38dee1844 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
@@ -34,9 +34,9 @@ class RegistrationAuthorityCredentials implements JsonSerializable
private CommonName $commonName;
- private ?Location $location;
+ private ?Location $location = null;
- private ?ContactInformation $contactInformation;
+ private ?ContactInformation $contactInformation = null;
private function __construct(
private readonly string $identityId,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
index 3588cd1bc..63f66c185 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/SecondFactorStatus.php
@@ -20,7 +20,7 @@
use Stringable;
-final class SecondFactorStatus implements Stringable
+final readonly class SecondFactorStatus implements Stringable
{
public static function unverified(): self
{
@@ -48,7 +48,6 @@ public static function forgotten(): self
}
/**
- * @param string $status
* @return bool
*/
public static function isValidStatus(string $status): bool
@@ -56,9 +55,6 @@ public static function isValidStatus(string $status): bool
return in_array($status, ['unverified', 'verified', 'vetted', 'revoked', 'forgotten', true]);
}
- /**
- * @param string $status
- */
private function __construct(private string $status)
{
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/VerifiedTokenInformation.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/VerifiedTokenInformation.php
index 89cb3210c..15bea2d24 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/VerifiedTokenInformation.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/VerifiedTokenInformation.php
@@ -18,30 +18,22 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Value;
+use Surfnet\Stepup\DateTime\DateTime;
+use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VerifiedSecondFactor;
class VerifiedTokenInformation
{
- /**
- * @param $email
- * @param $tokenId
- * @param $tokenType
- * @param $commonName
- * @param $requestedAt
- * @param $preferredLocale
- * @param $institution
- * @param $registrationCode
- */
public function __construct(
- private $email,
- private $tokenId,
- private $tokenType,
- private $commonName,
- private $requestedAt,
- private $preferredLocale,
- private $institution,
- private $registrationCode,
+ private readonly string $email,
+ private readonly string $tokenId,
+ private readonly string $tokenType,
+ private readonly string $commonName,
+ private readonly DateTime $requestedAt,
+ private readonly string $preferredLocale,
+ private readonly Institution $institution,
+ private readonly string $registrationCode,
) {
}
@@ -59,42 +51,42 @@ public static function fromEntity(VerifiedSecondFactor $token, Identity $identit
);
}
- public function getEmail()
+ public function getEmail(): string
{
return $this->email;
}
- public function getTokenId()
+ public function getTokenId(): string
{
return $this->tokenId;
}
- public function getTokenType()
+ public function getTokenType(): string
{
return $this->tokenType;
}
- public function getCommonName()
+ public function getCommonName(): string
{
return $this->commonName;
}
- public function getRequestedAt()
+ public function getRequestedAt(): DateTime
{
return $this->requestedAt;
}
- public function getPreferredLocale()
+ public function getPreferredLocale(): string
{
return $this->preferredLocale;
}
- public function getInstitution()
+ public function getInstitution(): Institution
{
return $this->institution;
}
- public function getRegistrationCode()
+ public function getRegistrationCode(): string
{
return $this->registrationCode;
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
index 380fe1185..55de2c5e7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/ConfigurationInstitutionParamConverter.php
@@ -43,7 +43,7 @@ public function supports(ParamConverter $configuration): bool
/**
* @return string
*/
- private function getInstitutionFromRequest(Request $request)
+ private function getInstitutionFromRequest(Request $request): string
{
$institution = $request->attributes->get(self::INSTITUTION);
$request->attributes->remove(self::INSTITUTION);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Resources/config/projection.yml b/src/Surfnet/StepupMiddleware/ApiBundle/Resources/config/projection.yml
index 0727dd4b0..1fc45e6a6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Resources/config/projection.yml
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Resources/config/projection.yml
@@ -49,7 +49,7 @@ services:
surfnet_stepup_middleware_api.projector.recovery_token:
class: Surfnet\StepupMiddleware\ApiBundle\Identity\Projector\RecoveryTokenProjector
arguments:
- - "@Surfnet\\StepupMiddleware\\ApiBundle\\Identity\\Repository\\RecoveryTokenRepository"
+ - '@Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\RecoveryTokenRepository'
tags: [ { name: event_bus.event_listener, disable_for_replay: false } ]
surfnet_stepup_middleware_api.projector.vetting_type_hint:
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php b/src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
index deac4f0ff..385b887ca 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
@@ -23,7 +23,7 @@
class JsonCollectionResponse extends JsonResponse
{
- public static function fromPaginator(Pagerfanta $paginator, $filters = []): self
+ public static function fromPaginator(Pagerfanta $paginator, array $filters = []): self
{
return new self(
$paginator->getNbResults(),
@@ -35,15 +35,7 @@ public static function fromPaginator(Pagerfanta $paginator, $filters = []): self
);
}
- /**
- * @param int $totalItems
- * @param int $page
- * @param int $pageSize
- * @param array $collection
- * @param array $headers
- * @param array $filters
- */
- public function __construct($totalItems, $page, $pageSize, array $collection, array $headers = [], $filters = [])
+ public function __construct(int $totalItems, int $page, int $pageSize, array $collection, array $headers = [], array $filters = [])
{
$data = [
'collection' => ['total_items' => $totalItems, 'page' => $page, 'page_size' => $pageSize],
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Security/Http/EntryPoint/JsonBasicAuthenticationEntryPoint.php b/src/Surfnet/StepupMiddleware/ApiBundle/Security/Http/EntryPoint/JsonBasicAuthenticationEntryPoint.php
index 961111ef4..692fd8063 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Security/Http/EntryPoint/JsonBasicAuthenticationEntryPoint.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Security/Http/EntryPoint/JsonBasicAuthenticationEntryPoint.php
@@ -29,7 +29,7 @@
*/
class JsonBasicAuthenticationEntryPoint implements AuthenticationEntryPointInterface
{
- public function __construct(private $realmName)
+ public function __construct(private string $realmName)
{
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
index 09ab832cb..1c798a628 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
@@ -46,24 +46,13 @@ class AuthorizationContextServiceTest extends TestCase
private AuthorizationContextService $service;
- /**
- * @var IdentityService|MockInterface
- */
- private $identityService;
+ private IdentityService&MockInterface $identityService;
- /**
- * @var SraaService|MockInterface
- */
- private $sraaService;
+ private SraaService&MockInterface $sraaService;
- /**
- * @var AuthorizationRepository|MockInterface
- */
- private $authorizationRepository;
- /**
- * @var MockInterface|ConfiguredInstitutionRepository
- */
- private $institutionRepo;
+ private AuthorizationRepository&MockInterface $authorizationRepository;
+
+ private MockInterface|ConfiguredInstitutionRepository $institutionRepo;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationServiceTest.php
index 46a2e78b4..85df68298 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationServiceTest.php
@@ -20,6 +20,7 @@
use Doctrine\Common\Collections\ArrayCollection;
use Mockery as m;
+use Mockery\MockInterface;
use Pagerfanta\Pagerfanta;
use PHPUnit\Framework\TestCase;
use Surfnet\Stepup\Configuration\Value\SelfAssertedTokensOption;
@@ -40,29 +41,14 @@ class AuthorizationServiceTest extends TestCase
{
use m\Adapter\Phpunit\MockeryPHPUnitIntegration;
- /**
- * @var m\MockInterface|IdentityService
- */
- private $identityService;
-
- /**
- * @var m\MockInterface|InstitutionConfigurationOptionsService
- */
- private $institutionConfigurationService;
-
- /**
- * @var m\MockInterface|SecondFactorService
- */
- private $secondFactorService;
-
- /**
- * @var m\MockInterface|RecoveryTokenService
- */
- private $recoveryTokenService;
-
- /**
- * @var AuthorizationService
- */
+ private MockInterface&IdentityService $identityService;
+
+ private MockInterface&InstitutionConfigurationOptionsService $institutionConfigurationService;
+
+ private MockInterface&SecondFactorService $secondFactorService;
+
+ private MockInterface&RecoveryTokenService $recoveryTokenService;
+
private AuthorizationService $service;
protected function setUp(): void
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index 294913a12..96482961e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -140,7 +140,7 @@ public function test_shared_ra_and_ss_commands_are_correctly_authorized(): void
* @test
* @dataProvider availableCommands
*/
- public function a_sraa_should_be_able_to_execute_all_commands($file, Command $command): void
+ public function a_sraa_should_be_able_to_execute_all_commands(string $file, Command $command): void
{
$this->assertInstanceOf(Command::class, $command);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
index f49a56fe3..712974d06 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
@@ -20,7 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
-use Mockery\Mock;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase as TestCase;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Configuration\Value\InstitutionRole;
@@ -31,15 +31,10 @@
class InstitutionAuthorizationServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var InstitutionAuthorizationService
- */
+
private InstitutionAuthorizationService $service;
- /**
- * @var InstitutionAuthorizationRepository|Mock
- */
- private $repository;
+ private InstitutionAuthorizationRepository&MockInterface $repository;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
index b52f02e8c..caed99a9a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionConfigurationOptionsServiceTest.php
@@ -109,7 +109,7 @@ public function test_nullable_tokens_per_identity_options_in_institution_configu
$this->assertEquals($expectedNumberOfTokens, $numberOfTokens);
}
- private function buildConfigurationOption(int $expectedNumberOfTokens)
+ private function buildConfigurationOption(int $expectedNumberOfTokens): InstitutionConfigurationOptions&MockInterface
{
$numberOfTokensOptionMock = m::mock(NumberOfTokensPerIdentityOption::class);
$numberOfTokensOptionMock
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
index dbb5fa8dd..cf8276298 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationContactInformationTypeTest.php
@@ -55,9 +55,8 @@ public function setUp(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_contact_information_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_contact_information_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
index 0ff23bd14..6eceb3e08 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationInstitutionTypeTest.php
@@ -66,9 +66,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_an_institution_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_an_institution_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
index 9a75ed0ff..2e6cb23b6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ConfigurationLocationTypeTest.php
@@ -68,9 +68,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_a_location_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_a_location_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
index 269546c2a..33ddfb91b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DocumentNumberTypeTest.php
@@ -95,9 +95,8 @@ public function a_null_value_remains_null_when_converting_from_db_to_php_value()
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_a_document_number_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_a_document_number_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
index 8199614fc..ef7bd8bc2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/NumberOfTokensPerIdentityTypeTest.php
@@ -67,9 +67,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RaLocationNameTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RaLocationNameTypeTest.php
index e05128fe9..cfdb117de 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RaLocationNameTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RaLocationNameTypeTest.php
@@ -82,9 +82,8 @@ public function a_non_null_value_is_converted_to_the_correct_format(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_an_ra_location_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_an_ra_location_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
index 0e3fa9571..33bf62589 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SelfVetOptionTypeTest.php
@@ -40,7 +40,7 @@ public static function setUpBeforeClass(): void
{
Type::addType(
SelfVetOptionType::NAME,
- \Surfnet\StepupMiddleware\ApiBundle\Doctrine\Type\SelfVetOptionType::class,
+ SelfVetOptionType::class,
);
}
@@ -67,9 +67,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
index 2e494ff83..1466d15cf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/ShowRaaContactInformationOptionTypeTest.php
@@ -68,10 +68,9 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
public function a_value_can_only_be_converted_to_sql_if_it_is_a_show_raa_contact_information_option_or_null(
- $incorrectValue,
+ mixed $incorrectValue,
): void {
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
index aa35e5b0e..4e7462fcb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/UseRaLocationsOptionTypeTest.php
@@ -67,9 +67,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_a_use_ra_locations_option_or_null($incorrectValue,): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_a_use_ra_locations_option_or_null(mixed $incorrectValue,): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
index 987336b6d..367fe53d4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/VerifyEmailOptionTypeTest.php
@@ -66,9 +66,8 @@ public function a_null_value_remains_null_in_to_sql_conversion(): void
* @group doctrine
*
* @dataProvider \Surfnet\StepupMiddleware\ApiBundle\Tests\TestDataProvider::notNull
- * @param $incorrectValue
*/
- public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null($incorrectValue): void
+ public function a_value_can_only_be_converted_to_sql_if_it_is_an_option_type_or_null(mixed $incorrectValue): void
{
$this->expectException(ConversionException::class);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
index 872b910c0..1a6590498 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
@@ -128,7 +128,7 @@ public function auditable_events(): array
new SecondFactorId('ijkl'),
new SecondFactorType('yubikey'),
new YubikeyPublicId('99992222'),
- self::$actorCommonName,
+ new CommonName(self::$actorCommonName),
),
],
];
@@ -187,7 +187,7 @@ private function createExpectedAuditLogEntry(
SecondFactorId $secondFactorId = null,
SecondFactorType $secondFactorType = null,
?YubikeyPublicId $secondFactorIdentifier = null,
- $actorCommonName = null,
+ ?CommonName $actorCommonName = null,
): AuditLogEntry {
$entry = new AuditLogEntry();
$entry->actorId = $actorId instanceof IdentityId ? $actorId : null;
@@ -207,7 +207,7 @@ private function createExpectedAuditLogEntry(
/**
* @return MatcherAbstract
*/
- private function spy(mixed &$spy)
+ private function spy(mixed &$spy): MatcherAbstract
{
return m::on(
function ($value) use (&$spy): bool {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Value/AuthorizedInstitutionCollectionTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Value/AuthorizedInstitutionCollectionTest.php
index 5e8552627..16edab40d 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Value/AuthorizedInstitutionCollectionTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Value/AuthorizedInstitutionCollectionTest.php
@@ -68,6 +68,9 @@ public function retrieve_institutions_only_raa(): void
$this->assertEquals('raa', $collection->getAuthorizations()['b'][0]);
}
+ /**
+ * @param string[] $institutions
+ */
private function buildInstitutionCollection(array $institutions): InstitutionCollection
{
$institutionList = [];
@@ -77,7 +80,7 @@ private function buildInstitutionCollection(array $institutions): InstitutionCol
return new InstitutionCollection($institutionList);
}
- private function buildInstitution($name): Institution
+ private function buildInstitution(string $name): Institution
{
return new Institution($name);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
index 9a6e6ecbe..12331883f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
@@ -40,9 +40,8 @@ class CommandParamConverterTest extends TestCase
* @test
* @group api-bundle
* @dataProvider invalidCommandJsonStructures
- * @param string $commandJson
*/
- public function it_validates_the_command_structure($commandJson): void
+ public function it_validates_the_command_structure(string $commandJson): void
{
$this->expectException(BadCommandRequestException::class);
@@ -62,9 +61,8 @@ public function it_validates_the_command_structure($commandJson): void
* @test
* @group api-bundle
* @dataProvider convertibleCommandNames
- * @param string $expectedCommandClass
*/
- public function it_can_convert_command_name_notation($expectedCommandClass, string $commandName): void
+ public function it_can_convert_command_name_notation(string $expectedCommandClass, string $commandName): void
{
$command = ['command' => ['name' => $commandName, 'uuid' => 'abcdef', 'payload' => new stdClass]];
@@ -189,7 +187,7 @@ public function convertibleCommandNames(): array
/**
* @return MatcherAbstract
*/
- private function spy(mixed &$spy)
+ private function spy(mixed &$spy): MatcherAbstract
{
return m::on(
function ($value) use (&$spy): bool {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
index 35da5e046..5649a960e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
@@ -80,7 +80,7 @@ public function an_institution_is_set_as_attribute(): void
$this->assertTrue($this->request->attributes->get('institution')->equals($equal));
}
- private function mockQuery(bool|string $returnValue)
+ private function mockQuery(bool|string $returnValue): ParameterBag&MockInterface
{
$query = m::mock(ParameterBag::class);
$query
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
index 7d37d865a..7cd181948 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Service/DeprovisionServiceTest.php
@@ -20,6 +20,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Surfnet\Stepup\Identity\EventSourcing\IdentityRepository;
@@ -34,25 +35,13 @@ class DeprovisionServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var DeprovisionService
- */
private DeprovisionService $deprovisionService;
- /**
- * @var m\LegacyMockInterface|m\MockInterface|Pipeline
- */
- private $pipeline;
+ private MockInterface&Pipeline $pipeline;
- /**
- * @var m\LegacyMockInterface|m\MockInterface|ApiIdentityRepository
- */
- private $apiRepo;
+ private MockInterface&ApiIdentityRepository $apiRepo;
- /**
- * @var m\LegacyMockInterface|m\MockInterface|IdentityRepository
- */
- private $eventRepo;
+ private MockInterface&IdentityRepository $eventRepo;
protected function setUp(): void
{
@@ -100,7 +89,6 @@ public function test_it_can_return_data(): void
$data = $this->deprovisionService->readUserData('urn:collab:person:example.com:maynard_keenan');
- $this->assertTrue(is_array($data));
$this->assertEquals($data['status'], 'OK');
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/TestDataProvider.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/TestDataProvider.php
index b8848eb4d..cdcb23745 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/TestDataProvider.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/TestDataProvider.php
@@ -22,6 +22,9 @@
final class TestDataProvider
{
+ /**
+ * @return array
+ */
public static function notNull(): array
{
return [
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
index c1e39f8df..6aacdff2b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/Metadata.php
@@ -28,11 +28,11 @@ final class Metadata
*/
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$~i')]
- public ?string $actorId;
+ public ?string $actorId = null;
/**
* @var string|null
*/
#[Assert\Type(type: 'string')]
- public ?string $actorInstitution;
+ public ?string $actorInstitution = null;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
index da41ba590..af4b27463 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
@@ -57,35 +57,35 @@ final class ReconfigureInstitutionConfigurationOptionsCommand extends AbstractCo
public int $numberOfTokensPerIdentityOption;
#[Assert\NotNull]
- public $allowedSecondFactors;
+ public array $allowedSecondFactors;
/**
* @var array|null
*/
- public ?array $useRaOption;
+ public ?array $useRaOption = null;
/**
* @var array|null
*/
- public ?array $useRaaOption;
+ public ?array $useRaaOption = null;
/**
* @var array|null
*/
- public ?array $selectRaaOption;
+ public ?array $selectRaaOption = null;
/**
* @var bool|null
*/
- public ?bool $selfVetOption;
+ public ?bool $selfVetOption = null;
/**
* @var bool|null
*/
- public ?bool $selfAssertedTokensOption;
+ public ?bool $selfAssertedTokensOption = null;
/**
* @var bool|null
*/
- public ?bool $ssoOn2faOption;
+ public ?bool $ssoOn2faOption = null;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
index 57a64f9d6..5704c91ce 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
@@ -34,7 +34,7 @@ public function __construct(
public function handleUpdateConfigurationCommand(UpdateConfigurationCommand $command): void
{
$configuration = $this->getConfiguration();
- if (!$configuration) {
+ if (!$configuration instanceof \Surfnet\Stepup\Configuration\Configuration) {
$configuration = Configuration::create();
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/Configuration.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/Configuration.php
index b0019bee2..31c6012b9 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/Configuration.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/DependencyInjection/Configuration.php
@@ -62,14 +62,14 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('name')
->isRequired()
->validate()
- ->ifTrue(fn($name): bool => !is_string($name) || empty($name))
+ ->ifTrue(fn($name): bool => !is_string($name) || ($name === '' || $name === '0'))
->thenInvalid("E-mail sender name must be non-empty string, got '%s'")
->end()
->end()
->scalarNode('email')
->isRequired()
->validate()
- ->ifTrue(fn($name): bool => !is_string($name) || empty($name))
+ ->ifTrue(fn($name): bool => !is_string($name) || ($name === '' || $name === '0'))
->thenInvalid("E-mail sender e-mail must be non-empty string, got '%s'")
->end()
->end()
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
index e3acc33d9..d55dc8fc3 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Dto/VettingLocation.php
@@ -20,11 +20,6 @@
class VettingLocation
{
- /**
- * @param string $name
- * @param string $location
- * @param string $contactInformation
- */
public function __construct(public string $name, public string $location, public string $contactInformation)
{
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
index 47e24d705..910e77220 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
@@ -26,7 +26,6 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\Exception;
use Throwable;
-
class BufferedEventBus implements EventBusInterface
{
/**
@@ -103,7 +102,7 @@ public function flush(): void
unset($buffer);
// if during the handling of events new events have been queued, we need to flush them
- if (!empty($this->buffer)) {
+ if ($this->buffer !== []) {
$this->flush();
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnrichingEventStreamDecorator.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnrichingEventStreamDecorator.php
index 15d3f0ed7..e3e1848e0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnrichingEventStreamDecorator.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventSourcing/MetadataEnrichingEventStreamDecorator.php
@@ -34,8 +34,8 @@ public function setMetadata(Metadata $metadata = null): void
}
public function decorateForWrite(
- $aggregateType,
- $aggregateIdentifier,
+ string $aggregateType,
+ string $aggregateIdentifier,
DomainEventStream $eventStream,
): DomainEventStream {
if (!$this->metadata instanceof Metadata) {
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
index c85f0eb47..2b2564231 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Exception/SecondFactorNotAllowedException.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Exception;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Exception\ProcessingAbortedException;
+use Throwable;
class SecondFactorNotAllowedException extends RuntimeException implements ProcessingAbortedException
{
@@ -35,7 +36,7 @@ public function getErrors(): array
return $this->errors;
}
- public function __construct($message = "", $code = 0, Exception $previous = null)
+ public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/Exception/DuplicateIdentityException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/Exception/DuplicateIdentityException.php
index 1716f2637..6521d1ba5 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/Exception/DuplicateIdentityException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/Exception/DuplicateIdentityException.php
@@ -17,14 +17,14 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\CommandHandler\Exception;
-use Exception;
use RuntimeException;
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
+use Throwable;
final class DuplicateIdentityException extends RuntimeException
{
- public function __construct($message = "", $code = 0, Exception $previous = null)
+ public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
index 3bc442271..96b28f315 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
@@ -370,7 +370,7 @@ public function handleSelfVetSecondFactorCommand(SelfVetSecondFactorCommand $com
// @todo remove this BC construct once we drop BC support for SelfService 3.5
if ($command->authoringSecondFactorIdentifier) {
$loaIdentifier = $command->authoringSecondFactorIdentifier;
- } elseif ($command->authoringSecondFactorLoa) {
+ } elseif ($command->authoringSecondFactorLoa !== '' && $command->authoringSecondFactorLoa !== '0') {
$loaIdentifier = $command->authoringSecondFactorLoa;
}
if (!$loaIdentifier) {
@@ -538,7 +538,7 @@ private function emailVerificationIsRequired(IdentityApi $identity): bool
$configuration = $this->institutionConfigurationOptionsService
->findInstitutionConfigurationOptionsFor($institution);
- if ($configuration === null) {
+ if (!$configuration instanceof \Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions) {
return true;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
index 6b13d8e67..9b8f57818 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/RegistrationAuthorityCommandHandler.php
@@ -126,8 +126,6 @@ public function handleSaveVettingTypeHintCommand(SaveVettingTypeHintCommand $com
}
/**
- * @param string $role
- * @param string $commandId
* @return RegistrationAuthorityRole
*/
private function assertValidRoleAndConvertIfValid(string $role, string $commandId): RegistrationAuthorityRole
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/EmailVerificationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/EmailVerificationMailService.php
index 76deea6b9..8db83e1a3 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/EmailVerificationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/EmailVerificationMailService.php
@@ -30,8 +30,6 @@
final class EmailVerificationMailService
{
- private TranslatorInterface $translator;
-
private readonly string $emailVerificationUrlTemplate;
/**
@@ -40,7 +38,7 @@ final class EmailVerificationMailService
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
string $emailVerificationUrlTemplate,
private readonly EmailTemplateService $emailTemplateService,
private readonly string $fallbackLocale,
@@ -50,7 +48,6 @@ public function __construct(
$emailVerificationUrlTemplate,
'Email verification URL template "%s" expected to be string, type %s given',
);
- $this->translator = $translator;
$this->emailVerificationUrlTemplate = $emailVerificationUrlTemplate;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
index b0eec1904..cb5a8e77a 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
@@ -38,24 +38,18 @@
*/
class RecoveryTokenMailService
{
- /**
- * @var TranslatorInterface
- */
- private TranslatorInterface $translator;
-
private readonly string $fallbackLocale;
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
private readonly EmailTemplateService $emailTemplateService,
string $fallbackLocale,
private readonly string $selfServiceUrl,
private readonly LoggerInterface $logger,
) {
Assertion::string($fallbackLocale, 'Fallback locale "%s" expected to be string, type %s given');
- $this->translator = $translator;
$this->fallbackLocale = $fallbackLocale;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
index 37fadf041..9a839df00 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
@@ -42,13 +42,6 @@
*/
class RegistrationMailService
{
- public InstitutionConfigurationOptionsService $institutionConfigurationOptionsService;
-
- /**
- * @var TranslatorInterface
- */
- private TranslatorInterface $translator;
-
private readonly string $fallbackLocale;
/**
@@ -57,11 +50,11 @@ class RegistrationMailService
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
private readonly EmailTemplateService $emailTemplateService,
string $fallbackLocale,
private readonly string $selfServiceUrl,
- InstitutionConfigurationOptionsService $institutionConfigurationOptionsService,
+ public InstitutionConfigurationOptionsService $institutionConfigurationOptionsService,
private readonly IdentityService $identityService,
private readonly SecondFactorService $secondFactorService,
private readonly RaLocationService $raLocationsService,
@@ -69,9 +62,7 @@ public function __construct(
private readonly LoggerInterface $logger,
) {
Assertion::string($fallbackLocale, 'Fallback locale "%s" expected to be string, type %s given');
- $this->translator = $translator;
$this->fallbackLocale = $fallbackLocale;
- $this->institutionConfigurationOptionsService = $institutionConfigurationOptionsService;
}
public function send(string $identityId, string $secondFactorId): void
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
index 0e556393b..3d6e0f53e 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
@@ -39,11 +39,6 @@
*/
final class SecondFactorRevocationMailService
{
- /**
- * @var TranslatorInterface
- */
- private TranslatorInterface $translator;
-
private readonly string $fallbackLocale;
private readonly string $selfServiceUrl;
@@ -54,7 +49,7 @@ final class SecondFactorRevocationMailService
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
private readonly EmailTemplateService $emailTemplateService,
string $fallbackLocale,
string $selfServiceUrl,
@@ -62,7 +57,6 @@ public function __construct(
) {
Assertion::string($fallbackLocale, 'Fallback locale "%s" expected to be string, type %s given');
Assertion::string($selfServiceUrl, 'Self Service URL "%s" expected to be string, type %s given');
- $this->translator = $translator;
$this->fallbackLocale = $fallbackLocale;
$this->selfServiceUrl = $selfServiceUrl;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
index 815f5f8e0..71838fe31 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
@@ -32,11 +32,6 @@
final class SecondFactorVettedMailService
{
- /**
- * @var TranslatorInterface
- */
- private TranslatorInterface $translator;
-
private readonly string $fallbackLocale;
/**
@@ -45,13 +40,12 @@ final class SecondFactorVettedMailService
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
private readonly EmailTemplateService $emailTemplateService,
string $fallbackLocale,
private readonly string $selfServiceUrl,
) {
Assertion::string($fallbackLocale, 'Fallback locale "%s" expected to be string, type %s given');
- $this->translator = $translator;
$this->fallbackLocale = $fallbackLocale;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
index b05321c92..ba291b5bd 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
@@ -18,10 +18,10 @@
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Exception;
-use Exception;
use RuntimeException;
use Symfony\Component\Validator\ConstraintViolationInterface;
use Symfony\Component\Validator\ConstraintViolationListInterface;
+use Throwable;
class InvalidCommandException extends RuntimeException implements ProcessingAbortedException
{
@@ -35,7 +35,7 @@ public static function createFromViolations(ConstraintViolationListInterface $vi
return new self(self::mapViolationsToErrorStrings($violations));
}
- public function __construct(array $errors, $code = 0, Exception $previous = null)
+ public function __construct(array $errors, int $code = 0, ?Throwable $previous = null)
{
parent::__construct(sprintf('Command is invalid: %s', implode('; ', $errors)), $code, $previous);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/EmailVerificationEmailProcessor.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/EmailVerificationEmailProcessor.php
index f39bcd505..ec16bed91 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/EmailVerificationEmailProcessor.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/EmailVerificationEmailProcessor.php
@@ -33,7 +33,7 @@ public function __construct(
public function handlePhonePossessionProvenEvent(PhonePossessionProvenEvent $event): void
{
- if ($event->emailVerificationRequired !== false) {
+ if ($event->emailVerificationRequired) {
$this->emailVerificationMailService->sendEmailVerificationEmail(
(string)$event->preferredLocale,
(string)$event->commonName,
@@ -45,7 +45,7 @@ public function handlePhonePossessionProvenEvent(PhonePossessionProvenEvent $eve
public function handleYubikeyPossessionProvenEvent(YubikeyPossessionProvenEvent $event): void
{
- if ($event->emailVerificationRequired !== false) {
+ if ($event->emailVerificationRequired) {
$this->emailVerificationMailService->sendEmailVerificationEmail(
(string)$event->preferredLocale,
(string)$event->commonName,
@@ -57,7 +57,7 @@ public function handleYubikeyPossessionProvenEvent(YubikeyPossessionProvenEvent
public function handleGssfPossessionProvenEvent(GssfPossessionProvenEvent $event): void
{
- if ($event->emailVerificationRequired !== false) {
+ if ($event->emailVerificationRequired) {
$this->emailVerificationMailService->sendEmailVerificationEmail(
(string)$event->preferredLocale,
(string)$event->commonName,
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
index 8d0b5e31c..bcb2df9f5 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessage.php
@@ -26,16 +26,9 @@ class SensitiveDataMessage
{
private readonly IdentityId $identityId;
- private readonly int $playhead;
-
- public function __construct(IdentityId $identityId, int $playhead, private SensitiveData $sensitiveData)
+ public function __construct(IdentityId $identityId, private readonly int $playhead, private SensitiveData $sensitiveData)
{
- if (!is_int($playhead)) {
- throw InvalidArgumentException::invalidType('int', 'playhead', $playhead);
- }
-
$this->identityId = new IdentityId($identityId);
- $this->playhead = $playhead;
}
/**
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
index d61b41f25..d5a21794b 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
@@ -26,6 +26,9 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\Exception\SensitiveDataApplicationException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\Forgettable;
+/**
+ * @implements IteratorAggregate
+ */
class SensitiveDataMessageStream implements IteratorAggregate
{
/**
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
index 56aa5d90b..aa4915d56 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
@@ -215,7 +215,7 @@ public function institution_configuration_options_are_not_changed_if_their_given
$command->showRaaContactInformationOption = $showRaaContactInformationOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $selfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->useRaOption = $useRaOption->jsonSerialize();
$command->useRaaOption = $useRaaOption->jsonSerialize();
@@ -291,7 +291,7 @@ public function use_ra_locations_option_is_changed_if_its_given_value_is_differe
$command->showRaaContactInformationOption = $showRaaContactInformationOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $selfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->useRaOption = $useRaOption->jsonSerialize();
$command->useRaaOption = $useRaaOption->jsonSerialize();
@@ -372,7 +372,7 @@ public function show_raa_contact_information_option_is_changed_if_its_given_valu
$command->useRaLocationsOption = $useRaLocationsOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $selfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->allowedSecondFactors = [];
@@ -455,7 +455,7 @@ public function allowed_second_factor_list_is_changed_if_its_values_are_differen
$command->showRaaContactInformationOption = $showRaaContactInformationOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $selfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->allowedSecondFactors = $secondFactorsToAllow;
@@ -537,7 +537,7 @@ public function allowed_second_factor_list_is_not_changed_if_its_values_are_the_
$command->showRaaContactInformationOption = $showRaaContactInformationOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $selfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->allowedSecondFactors = $secondFactorsToAllow;
@@ -975,7 +975,7 @@ public function the_self_vet_option_can_be_changed(): void
$command->showRaaContactInformationOption = $showRaaContactInformationOption->isEnabled();
$command->verifyEmailOption = $verifyEmailOption->isEnabled();
$command->selfVetOption = $newSelfVetOption->isEnabled();
- $command->allowedSecondFactors = $selfAssertedTokensOption->isEnabled();
+ $command->selfAssertedTokensOption = $selfAssertedTokensOption->isEnabled();
$command->numberOfTokensPerIdentityOption = $numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
$command->allowedSecondFactors = [];
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
index 7c12ca630..7e4d28679 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
@@ -23,17 +23,12 @@
final class HasInstitutionMatcher extends MatcherAbstract
{
- public function __construct($expected)
+ public function __construct(string $expected)
{
- if (!is_string($expected)) {
- throw new RuntimeException(
- sprintf('In order to use the %s, a string should be given.', self::class),
- );
- }
parent::__construct($expected);
}
- public function match(&$actual): bool
+ public function match(mixed &$actual): bool
{
if (!is_object($actual)) {
return false;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
index daf0896d5..b19a6bcb4 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
@@ -25,25 +25,12 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Mockery\TestObjects\ObjectWithInstitutionAccessor;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Mockery\TestObjects\ObjectWithInstitutionProperty;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Mockery\TestObjects\ObjectWithoutInstitutionPropertyAndAccessor;
+use TypeError;
class HasInstitutionMatcherTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @test
- * @group mockery
- * @group institution
- *
- * @dataProvider nonStringProvider
- */
- public function has_institution_matcher_only_matches_against_strings(bool|int|float|stdClass|array|null $nonString,): void
- {
- $this->expectException(RuntimeException::class);
-
- $hasInstitutionMatcher = new HasInstitutionMatcher($nonString);
- }
-
/**
* @test
* @group mockery
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionAccessor.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionAccessor.php
index 7814c8a28..f6dea7f94 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionAccessor.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionAccessor.php
@@ -20,11 +20,11 @@
final class ObjectWithInstitutionAccessor
{
- public function __construct(private $institution)
+ public function __construct(private string $institution)
{
}
- public function getInstitution()
+ public function getInstitution(): string
{
return $this->institution;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionProperty.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionProperty.php
index 251d50130..a2ec7b381 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionProperty.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/TestObjects/ObjectWithInstitutionProperty.php
@@ -20,7 +20,7 @@
final class ObjectWithInstitutionProperty
{
- public function __construct(public $institution)
+ public function __construct(public string $institution)
{
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
index 787dd9234..4b7838dc7 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Institution.php
@@ -30,7 +30,7 @@ final class Institution implements Stringable
*/
public function __construct(string $institution)
{
- if (!is_string($institution) || trim($institution) === '') {
+ if (trim($institution) === '') {
throw InvalidArgumentException::invalidType('non-empty string', 'institution', $institution);
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Sender.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Sender.php
index f87244419..02f4f1753 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Sender.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Value/Sender.php
@@ -23,27 +23,15 @@
class Sender implements Stringable
{
- private readonly string $name;
-
private readonly string $email;
- public function __construct(string $name, string $email)
+ public function __construct(private readonly string $name, string $email)
{
- if (!is_string($name)) {
- throw InvalidArgumentException::invalidType('string', 'name', $name);
- }
-
- if (!is_string($email)) {
- throw InvalidArgumentException::invalidType('string', 'email', $name);
- }
-
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new InvalidArgumentException(
sprintf("Invalid argument type: expected e-mail address for 'email', got '%s'", $email),
);
}
-
- $this->name = $name;
$this->email = $email;
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
index 580cb3883..5385f9bdd 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
@@ -20,28 +20,23 @@
namespace Surfnet\StepupMiddleware\GatewayBundle\Entity;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping as ORM;
use Surfnet\StepupMiddleware\GatewayBundle\Repository\InstitutionConfigurationRepository;
#[ORM\Entity(repositoryClass: InstitutionConfigurationRepository::class)]
class InstitutionConfiguration
{
- /**
- * @var string
- */
- #[ORM\Id]
- #[ORM\Column(length: 200)]
- public $institution;
-
- /**
- * @var bool is the SSO on 2FA feature enabled?
- */
- #[ORM\Column(type: 'boolean')]
- public $ssoOn2faEnabled;
-
- public function __construct(string $institution, bool $ssoOn2faEnabled)
+ public function __construct(
+ #[ORM\Id]
+ #[ORM\Column(length: 200)]
+ public string $institution,
+ /**
+ * @var bool is the SSO on 2FA feature enabled?
+ */
+ #[ORM\Column(type: 'boolean')]
+ public bool $ssoOn2faEnabled
+ )
{
- $this->institution = $institution;
- $this->ssoOn2faEnabled = $ssoOn2faEnabled;
}
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
index 923cae629..a8246af82 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
@@ -37,7 +37,7 @@ class SamlEntity
*/
#[ORM\Id]
#[ORM\Column(length: 36)]
- public $id;
+ public string $id;
private function __construct(
#[ORM\Column]
@@ -51,19 +51,17 @@ private function __construct(
}
/**
- * @param string $entityId
* @return SamlEntity
*/
- public static function createServiceProvider($entityId, array $configuration): self
+ public static function createServiceProvider(string $entityId, array $configuration): self
{
return new self($entityId, self::TYPE_SP, json_encode($configuration));
}
/**
- * @param string $entityId
* @return SamlEntity
*/
- public static function createIdentityProvider($entityId, array $configuration): self
+ public static function createIdentityProvider(string $entityId, array $configuration): self
{
return new self($entityId, self::TYPE_IDP, json_encode($configuration));
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
index 0801062e0..f1d5938f7 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
@@ -20,6 +20,9 @@
use Doctrine\ORM\EntityRepository;
+/**
+ * @extends EntityRepository
+ */
class SamlEntityRepository extends EntityRepository
{
/**
@@ -64,10 +67,8 @@ private function replaceAllOfType(string $type, array $newSamlEntities): void
/**
* Remove all configured SamlEntities of a specific type
- *
- * @param string $type
*/
- private function removeAllOfType($type): void
+ private function removeAllOfType(string $type): void
{
$this
->getEntityManager()
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
index 2a39787af..738e2bad8 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
@@ -108,7 +108,7 @@ private function isIdentityVetted(VettingType $vettingType): bool
return $vettingType->type() !== VettingType::TYPE_SELF_ASSERTED_REGISTRATION;
}
- protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event)
+ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event): void
{
$secondFactor = $this->repository->findOneBySecondFactorId($event->secondFactorId);
@@ -126,7 +126,8 @@ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevoked
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ) {
+ ): void
+ {
$secondFactor = $this->repository->findOneBySecondFactorId($event->secondFactorId);
if ($secondFactor === null) {
@@ -141,7 +142,7 @@ protected function applyCompliedWithVettedSecondFactorRevocationEvent(
$this->repository->remove($secondFactor);
}
- protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event)
+ protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event): void
{
$secondFactors = $this->repository->findByIdentityId($event->identityId);
@@ -151,7 +152,7 @@ protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressed
}
}
- protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
+ protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void
{
$this->repository->removeByIdentityId($event->identityId);
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php
index 79e8d51b1..8c9bd5838 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php
@@ -32,7 +32,7 @@ public function __construct(private readonly WhitelistEntryRepository $whitelist
{
}
- protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event)
+ protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event): void
{
$whitelistEntries = [];
foreach ($event->whitelistedInstitutions as $institution) {
@@ -42,7 +42,7 @@ protected function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event)
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
+ protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event): void
{
$this->whitelistEntryRepository->removeAll();
@@ -54,7 +54,7 @@ protected function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhitelistEvent $event)
+ protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhitelistEvent $event): void
{
$whitelistEntries = [];
foreach ($event->addedInstitutions as $institution) {
@@ -64,7 +64,7 @@ protected function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhi
$this->whitelistEntryRepository->saveEntries($whitelistEntries);
}
- protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemovedFromWhitelistEvent $event)
+ protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemovedFromWhitelistEvent $event): void
{
$institutions = [];
foreach ($event->removedInstitutions as $institution) {
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/InstitutionConfigurationRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/InstitutionConfigurationRepository.php
index 361998209..51f3a9409 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/InstitutionConfigurationRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/InstitutionConfigurationRepository.php
@@ -23,6 +23,9 @@
use Doctrine\ORM\EntityRepository;
use Surfnet\StepupMiddleware\GatewayBundle\Entity\InstitutionConfiguration;
+/**
+ * @extends EntityRepository
+ */
class InstitutionConfigurationRepository extends EntityRepository
{
public function findByInstitution(string $institution): ?InstitutionConfiguration
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
index a49c47817..ca0ab2592 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/SecondFactorRepository.php
@@ -23,10 +23,11 @@
use Surfnet\Stepup\Identity\Value\SecondFactorId;
use Surfnet\StepupMiddleware\GatewayBundle\Entity\SecondFactor;
+/**
+ * @extends EntityRepository
+ */
class SecondFactorRepository extends EntityRepository
{
- public $_entityName;
-
public function save(SecondFactor $secondFactor): void
{
$this->getEntityManager()->persist($secondFactor);
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/WhitelistEntryRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/WhitelistEntryRepository.php
index 54f33d9a3..37d44bb31 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/WhitelistEntryRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Repository/WhitelistEntryRepository.php
@@ -22,13 +22,16 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\GatewayBundle\Entity\WhitelistEntry;
+/**
+ * @extends EntityRepository
+ */
class WhitelistEntryRepository extends EntityRepository
{
/**
* @param Institution[] $institutions
- * @return array
+ * @return WhitelistEntry[]
*/
- public function findEntriesByInstitutions(array $institutions)
+ public function findEntriesByInstitutions(array $institutions): array
{
$qb = $this->createQueryBuilder('w');
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Tests/Projector/InstitutionConfigurationProjectorTest.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Tests/Projector/InstitutionConfigurationProjectorTest.php
index fa7527130..497b3a3e6 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Tests/Projector/InstitutionConfigurationProjectorTest.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Tests/Projector/InstitutionConfigurationProjectorTest.php
@@ -22,6 +22,7 @@
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid;
use Surfnet\Stepup\Configuration\Event\SsoOn2faOptionChangedEvent;
@@ -38,7 +39,7 @@ class InstitutionConfigurationProjectorTest extends TestCase
private InstitutionConfigurationProjector $projector;
- private $repository;
+ private InstitutionConfigurationRepository&MockInterface $repository;
protected function setUp(): void
{
@@ -58,7 +59,7 @@ public function test_create_row_when_non_existent(): void
$this->repository->shouldReceive('findByInstitution')->with('institution-a.nl')->andReturn(null);
$this->repository->shouldReceive('save')->withArgs(
fn(InstitutionConfiguration $configuration,
- ): bool => $configuration->institution === 'institution-a.nl' && $configuration->ssoOn2faEnabled === true,
+ ): bool => $configuration->institution === 'institution-a.nl' && $configuration->ssoOn2faEnabled,
);
$this->projector->applySsoOn2faOptionChangedEvent($event);
@@ -76,7 +77,7 @@ public function test_updates_existing_row(): void
$this->repository->shouldReceive('findByInstitution')->with('institution-a.nl')->andReturn($configuration);
$this->repository->shouldReceive('save')->withArgs(
fn(InstitutionConfiguration $configuration,
- ): bool => $configuration->institution === 'institution-a.nl' && $configuration->ssoOn2faEnabled === true,
+ ): bool => $configuration->institution === 'institution-a.nl' && $configuration->ssoOn2faEnabled,
);
$this->projector->applySsoOn2faOptionChangedEvent($event);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Entity/EmailTemplate.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Entity/EmailTemplate.php
index 8bdaba73b..be7f9d4b6 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Entity/EmailTemplate.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Entity/EmailTemplate.php
@@ -36,21 +36,21 @@ class EmailTemplate
* @var string
*/
#[ORM\Column]
- private $name;
+ private string $name;
/**
* @var string
*/
#[ORM\Column]
- private $locale;
+ private string $locale;
/**
* @var string
*/
#[ORM\Column(type: 'text')]
- private $htmlContent;
+ private string $htmlContent;
- public static function create($name, $locale, $htmlContent): self
+ public static function create(string $name, string $locale, string $htmlContent): self
{
$self = new self();
$self->id = (string)Uuid::uuid4();
@@ -73,7 +73,7 @@ public function getId(): string
/**
* @return string
*/
- public function getName()
+ public function getName(): string
{
return $this->name;
}
@@ -81,7 +81,7 @@ public function getName()
/**
* @return string
*/
- public function getLocale()
+ public function getLocale(): string
{
return $this->locale;
}
@@ -89,7 +89,7 @@ public function getLocale()
/**
* @return string
*/
- public function getHtmlContent()
+ public function getHtmlContent(): string
{
return $this->htmlContent;
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Repository/EmailTemplateRepository.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Repository/EmailTemplateRepository.php
index 1ebe15f50..c21759d3d 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Repository/EmailTemplateRepository.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Repository/EmailTemplateRepository.php
@@ -22,6 +22,9 @@
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\StepupMiddleware\ManagementBundle\Configuration\Entity\EmailTemplate;
+/**
+ * @extends ServiceEntityRepository
+ */
final class EmailTemplateRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
@@ -35,7 +38,7 @@ public function __construct(ManagerRegistry $registry)
* @param string $fallbackLocale
* @return EmailTemplate|null
*/
- public function findOneByName(mixed $name, mixed $preferredLocale, mixed $fallbackLocale)
+ public function findOneByName(mixed $name, mixed $preferredLocale, mixed $fallbackLocale): ?EmailTemplate
{
return $this
->createQueryBuilder('tpl')
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
index 0eb2fa7c3..30b5cd606 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Service/EmailTemplateService.php
@@ -45,7 +45,7 @@ public function findByName(string $name, string $preferredLocale, string $fallba
throw new RuntimeException($e->getMessage(), 0, $e);
}
- if (!$emailTemplateEntity) {
+ if (!$emailTemplateEntity instanceof \Surfnet\StepupMiddleware\ManagementBundle\Configuration\Entity\EmailTemplate) {
return null;
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index f1bd3941e..02154fb27 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -34,7 +34,7 @@ public function __construct(
) {
}
- public function update(Request $request)
+ public function update(Request $request): JsonResponse
{
$command = new UpdateConfigurationCommand();
$command->UUID = (string)Uuid::uuid4();
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
index 9c3556499..2e0e78ca5 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
@@ -47,7 +47,7 @@ public function __construct(
) {
}
- public function forgetIdentity(Request $request)
+ public function forgetIdentity(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
@@ -92,7 +92,7 @@ private function assertMayForget(NameId $nameId, Institution $institution): void
$credentials =
$this->identityService->findRegistrationAuthorityCredentialsByNameIdAndInstitution($nameId, $institution);
- if ($credentials === null) {
+ if (!$credentials instanceof \Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials) {
return;
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
index 132de9931..abf2f8e19 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
@@ -48,7 +48,7 @@ public function __construct(
) {
}
- public function replaceWhitelist(Request $request)
+ public function replaceWhitelist(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
@@ -59,7 +59,7 @@ public function replaceWhitelist(Request $request)
return $this->handleCommand($request, $command);
}
- public function addToWhitelist(Request $request)
+ public function addToWhitelist(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
@@ -70,7 +70,7 @@ public function addToWhitelist(Request $request)
return $this->handleCommand($request, $command);
}
- public function removeFromWhitelist(Request $request)
+ public function removeFromWhitelist(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
@@ -111,7 +111,7 @@ private function handleCommand(Request $request, AbstractCommand $command): Json
/**
* @return array
*/
- private function getInstitutionsFromBody(Request $request)
+ private function getInstitutionsFromBody(Request $request): array
{
$decoded = JsonHelper::decode($request->getContent());
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/UnknownDBALConnectionException.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/UnknownDBALConnectionException.php
index 9b4a7f1df..ca4ea355f 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/UnknownDBALConnectionException.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Exception/UnknownDBALConnectionException.php
@@ -22,7 +22,7 @@
final class UnknownDBALConnectionException extends DomainException
{
- public function __construct($connectionName)
+ public function __construct(string $connectionName)
{
parent::__construct(sprintf('DBAL Connection "%s" does not exist', $connectionName));
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Resources/config/services.yml b/src/Surfnet/StepupMiddleware/ManagementBundle/Resources/config/services.yml
index 4215a7ed5..968106cb9 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Resources/config/services.yml
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Resources/config/services.yml
@@ -18,9 +18,6 @@ services:
Surfnet\StepupMiddleware\ManagementBundle\Service\DBALConnectionHelper: "@surfnet_stepup_middleware_management.dbal_connection_helper"
Surfnet\StepupMiddleware\ManagementBundle\Validator\EmailTemplatesConfigurationValidator: "@surfnet_stepup_middleware_management.validator.email_templates_configuration"
-
- Liip\FunctionalTestBundle\Validator\DataCollectingValidator: '@validator'
-
surfnet_stepup_middleware_management.validator.configuration:
class: Surfnet\StepupMiddleware\ManagementBundle\Validator\ConfigurationStructureValidator
arguments:
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Service/DBALConnectionHelper.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Service/DBALConnectionHelper.php
index 26118013f..253cb5d06 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Service/DBALConnectionHelper.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Service/DBALConnectionHelper.php
@@ -74,10 +74,9 @@ public function rollBack(): void
}
/**
- * @param string $connectionName
* @return Connection
*/
- public function getConnection($connectionName)
+ public function getConnection(string $connectionName): Connection
{
if (!is_string($connectionName)) {
throw InvalidArgumentException::invalidType('string', 'connectionName', $connectionName);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
index e64be1f4d..3af35eae3 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
@@ -34,12 +34,12 @@ class ConfigurationControllerTest extends WebTestCase
/**
* @var string
*/
- private $password;
+ private string|array|bool|int|null|float|\UnitEnum $password;
/**
* @var string
*/
- private $passwordRo;
+ private string|array|bool|int|null|float|\UnitEnum $passwordRo;
private ORMSqliteDatabaseTool $databaseTool;
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
index c8fa63ef6..4cbf1df5b 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
@@ -34,12 +34,12 @@ class InstitutionConfigurationControllerTest extends WebTestCase
/**
* @var string
*/
- private $password;
+ private string|array|bool|int|null|float|\UnitEnum $password;
/**
* @var string
*/
- private $passwordRo;
+ private string|array|bool|int|null|float|\UnitEnum $passwordRo;
private ORMSqliteDatabaseTool $databaseTool;
@@ -153,7 +153,6 @@ public function requests_with_invalid_content_are_bad_requests(): void
* @group management
*
* @dataProvider invalidHttpMethodProvider
- * @param $invalidHttpMethod
*/
public function only_post_and_get_requests_are_accepted(string $invalidHttpMethod): void
{
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
index d622f73e1..922067a6e 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
@@ -57,10 +57,8 @@ public function invalidConfigurations(): array
* @test
* @group command-handler
* @dataProvider invalidConfigurations
- * @param array $configuration
- * @param string $expectedPropertyPath
*/
- public function it_rejects_invalid_configuration($configuration, $expectedPropertyPath): void
+ public function it_rejects_invalid_configuration(array $configuration, string $expectedPropertyPath): void
{
$builder = m::mock(ConstraintViolationBuilderInterface::class);
$builder->shouldReceive('addViolation')->with()->once();
@@ -90,7 +88,7 @@ public function it_rejects_invalid_configuration($configuration, $expectedProper
/**
* @return MatcherAbstract
*/
- private function spy(mixed &$spy)
+ private function spy(mixed &$spy): MatcherAbstract
{
return m::on(
function ($value) use (&$spy): bool {
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
index 7dfae19b4..39e5e4e5b 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
@@ -62,12 +62,10 @@ public function invalidReconfigureInstitutionRequests(): array
* @test
* @group validator
* @dataProvider invalidReconfigureInstitutionRequests
- * @param array $reconfigureRequest
- * @param string $expectedPropertyPath
*/
public function it_rejects_invalid_configuration(
- $reconfigureRequest,
- $expectedPropertyPath,
+ array $reconfigureRequest,
+ string $expectedPropertyPath,
string $expectErrorMessageToContain,
): void {
$existingInstitution = ConfiguredInstitution::createFrom(new Institution('surfnet.nl'));
@@ -259,7 +257,7 @@ public function valid_reconfigure_institution_requests_do_not_cause_any_violatio
/**
* @return MatcherAbstract
*/
- private function spy(mixed &$spy)
+ private function spy(mixed &$spy): MatcherAbstract
{
return Mockery::on(
function ($value) use (&$spy): bool {
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
index 96adb9048..319029029 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
@@ -22,7 +22,11 @@
final class Assert
{
- public static function keysMatch(array $value, array $keys, $message = null, $propertyPath = null): void
+ /**
+ * @param array $value
+ * @param array $keys
+ */
+ public static function keysMatch(array $value, array $keys, ?string $message = null, ?string $propertyPath = null): void
{
$keysOfValue = array_keys($value);
$extraKeys = array_diff($keysOfValue, $keys);
@@ -45,8 +49,8 @@ public static function requiredAndOptionalOptions(
array $value,
array $required,
array $optional,
- $message = null,
- $propertyPath = null,
+ ?string $message = null,
+ ?string $propertyPath = null,
): void {
// Filter out the optional items from the value array
$requiredValueSet = array_diff_key($value, array_flip($optional));
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
index 2af9aa23d..9d9d38cb3 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Validator;
use Assert\Assertion;
+use Assert\AssertionFailedException;
use Assert\InvalidArgumentException as AssertionException;
use InvalidArgumentException as CoreInvalidArgumentException;
use Surfnet\Stepup\Helper\JsonHelper;
@@ -26,6 +27,7 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Violation\ConstraintViolationBuilder;
+use TypeError;
/**
* Once the Assert 2.0 library has been built this should be converted to the lazy assertions so we can report
@@ -39,7 +41,7 @@ public function __construct(
) {
}
- public function validate($value, Constraint $constraint): void
+ public function validate(mixed $value, Constraint $constraint): void
{
/** @var ConstraintViolationBuilder|false $violation */
$violation = false;
@@ -51,7 +53,7 @@ public function validate($value, Constraint $constraint): void
// method is not in the interface yet, but the old method is deprecated.
$violation = $this->context->buildViolation($exception->getMessage());
$violation->atPath($exception->getPropertyPath());
- } catch (CoreInvalidArgumentException $exception) {
+ } catch (CoreInvalidArgumentException|TypeError $exception) {
$violation = $this->context->buildViolation($exception->getMessage());
}
@@ -61,15 +63,13 @@ public function validate($value, Constraint $constraint): void
}
}
- private function decodeJson($rawValue)
+ private function decodeJson(string $rawValue): mixed
{
return JsonHelper::decode($rawValue);
}
- public function validateRoot($configuration): void
+ public function validateRoot(array $configuration): void
{
- Assertion::isArray($configuration, 'Invalid body structure, must be an object', '(root)');
-
$acceptedProperties = ['gateway', 'sraa', 'email_templates'];
StepupAssert::keysMatch(
$configuration,
@@ -107,6 +107,10 @@ private function validateSraaConfiguration(array $configuration, string $propert
}
}
+ /**
+ * @param array $configuration
+ * @throws AssertionFailedException
+ */
private function validateEmailTemplatesConfiguration(array $configuration, string $propertyPath): void
{
Assertion::isArray(
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationValidatorInterface.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationValidatorInterface.php
index 2a2549395..c85b43277 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationValidatorInterface.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationValidatorInterface.php
@@ -23,9 +23,8 @@
interface ConfigurationValidatorInterface
{
/**
- * @param string $propertyPath
- * @return void
+ * @param array $configuration
* @throws InvalidArgumentException
*/
- public function validate(array $configuration, $propertyPath);
+ public function validate(array $configuration, string $propertyPath): void;
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
index e1da93fae..e045881f7 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
@@ -25,7 +25,7 @@
*/
class HasValidConfigurationStructure extends Constraint
{
- public $message = 'Invalid Configuration Structure';
+ public string $message = 'Invalid Configuration Structure';
public function validatedBy(): string
{
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/ValidReconfigureInstitutionsRequest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/ValidReconfigureInstitutionsRequest.php
index 6df2381fd..263432e17 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/ValidReconfigureInstitutionsRequest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/ValidReconfigureInstitutionsRequest.php
@@ -22,7 +22,7 @@
class ValidReconfigureInstitutionsRequest extends Constraint
{
- public $message = 'Invalid Reconfigure InstitutionConfiguration Structure';
+ public string $message = 'Invalid Reconfigure InstitutionConfiguration Structure';
public function validatedBy(): string
{
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/EmailTemplatesConfigurationValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/EmailTemplatesConfigurationValidator.php
index 0655fd118..aed37eb04 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/EmailTemplatesConfigurationValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/EmailTemplatesConfigurationValidator.php
@@ -38,7 +38,11 @@ public function __construct($requiredLocale)
$this->requiredLocale = $requiredLocale;
}
- public function validate(array $configuration, $propertyPath): void
+ /**
+ * @param array $configuration
+ * @throws \Assert\AssertionFailedException
+ */
+ public function validate(array $configuration, string $propertyPath): void
{
$templateNames = [
'confirm_email',
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php
index 2e7ee62b2..f590135d5 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Validator;
use Assert\Assertion;
+use Assert\AssertionFailedException;
use Surfnet\StepupMiddleware\ManagementBundle\Validator\Assert as StepupAssert;
class GatewayConfigurationValidator implements ConfigurationValidatorInterface
@@ -30,36 +31,33 @@ public function __construct(
}
/**
- * @param array $gatewayConfiguration
- * @param string $propertyPath
+ * @param array $configuration
*/
- public function validate(array $gatewayConfiguration, $propertyPath): void
+ public function validate(array $configuration, string $propertyPath): void
{
StepupAssert::keysMatch(
- $gatewayConfiguration,
+ $configuration,
['service_providers', 'identity_providers'],
"Expected properties 'service_providers' and 'identity_providers'",
$propertyPath,
);
$this->validateIdentityProviders(
- $gatewayConfiguration['identity_providers'],
+ $configuration['identity_providers'],
$propertyPath . '.identity_providers',
);
$this->validateServiceProviders(
- $gatewayConfiguration['service_providers'],
+ $configuration['service_providers'],
$propertyPath . '.service_providers',
);
}
- private function validateIdentityProviders($identityProviders, string $propertyPath): void
+ /**
+ * @param array> $identityProviders
+ * @throws AssertionFailedException
+ */
+ private function validateIdentityProviders(array $identityProviders, string $propertyPath): void
{
- Assertion::isArray(
- $identityProviders,
- 'identity_providers must have an array of identity provider configurations as value',
- $propertyPath,
- );
-
foreach ($identityProviders as $index => $identityProvider) {
$path = $propertyPath . '[' . $index . ']';
Assertion::isArray($identityProvider, 'Identity provider must be an object', $path);
@@ -68,13 +66,12 @@ private function validateIdentityProviders($identityProviders, string $propertyP
}
}
- private function validateServiceProviders($serviceProviders, string $propertyPath): void
+ /**
+ * @param array> $serviceProviders
+ * @throws AssertionFailedException
+ */
+ private function validateServiceProviders(array $serviceProviders, string $propertyPath): void
{
- Assertion::isArray(
- $serviceProviders,
- 'service_providers must have an array of service provider configurations as value',
- $propertyPath,
- );
Assertion::true(
count($serviceProviders) >= 1,
'at least one service_provider must be configured',
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
index b4ba68525..223127820 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
@@ -23,10 +23,11 @@
class IdentityProviderConfigurationValidator implements ConfigurationValidatorInterface
{
- public function validate(array $configuration, $propertyPath): void
+ /**
+ * @param array $configuration
+ */
+ public function validate(array $configuration, string $propertyPath): void
{
- Assertion::isArray($configuration, 'invalid configuration format, must be an object', $propertyPath);
-
$requiredProperties = [
'entity_id',
'loa',
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
index 53f54ecaa..1e954214d 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
@@ -52,7 +52,7 @@ public function __construct(
) {
}
- public function validate($value, Constraint $constraint): void
+ public function validate(mixed $value, Constraint $constraint): void
{
/** @var ConstraintViolationBuilder|false $violation */
$violation = false;
@@ -197,14 +197,14 @@ public function validateInstitutionConfigurationOptions(array $options, string $
*
* @return string[]
*/
- private function getConfiguredInstitutions()
+ private function getConfiguredInstitutions(): array
{
if ($this->configuredInstitutions !== null && $this->configuredInstitutions !== []) {
return $this->configuredInstitutions;
}
$this->configuredInstitutions = array_map(
- fn(ConfiguredInstitution $configuredInstitution) => $configuredInstitution->institution->getInstitution(),
+ fn(ConfiguredInstitution $configuredInstitution): string => $configuredInstitution->institution->getInstitution(),
$this->configuredInstitutionsService->getAll(),
);
@@ -216,7 +216,7 @@ private function getConfiguredInstitutions()
*
* @return string[]
*/
- private function getWhitelistedInstitutions()
+ private function getWhitelistedInstitutions(): array
{
if ($this->whitelistedInstitutions !== null && $this->whitelistedInstitutions !== []) {
return $this->whitelistedInstitutions;
@@ -232,10 +232,10 @@ private function getWhitelistedInstitutions()
/**
* @param string[] $institutions
- * @param $configuredInstitutions
+ * @param string[] $configuredInstitutions
* @return string[]
*/
- public function determineNonExistentInstitutions(array $institutions, $configuredInstitutions): array
+ public function determineNonExistentInstitutions(array $institutions, array $configuredInstitutions): array
{
$normalizedConfiguredInstitutions = array_map(
fn($institution): string => strtolower((string)$institution),
@@ -258,9 +258,6 @@ function ($institution) use ($normalizedConfiguredInstitutions): bool {
* - The optional options should contain whitelisted institutions
* - Or be empty
*
- * @param $authorizationSettings
- * @param $institution
- * @param $propertyPath
* @throws AssertionFailedException
*/
private function validateAuthorizationSettings(
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
index 188f8fae9..3da30b8a0 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
@@ -23,10 +23,11 @@
class ServiceProviderConfigurationValidator implements ConfigurationValidatorInterface
{
- public function validate(array $configuration, $propertyPath): void
+ /**
+ * @param array $configuration
+ */
+ public function validate(array $configuration, string $propertyPath): void
{
- Assertion::isArray($configuration, 'invalid configuration format, must be an object', $propertyPath);
-
$requiredProperties = [
'entity_id',
'public_key',
@@ -108,10 +109,7 @@ private function validateBooleanValue(array $configuration, string $name, string
Assertion::boolean($configuration[$name], 'value must be a boolean', $propertyPath . '.' . $name);
}
- /**
- * @param string $propertyPath
- */
- private function validateAssertionConsumerUrls(array $configuration, $propertyPath): void
+ private function validateAssertionConsumerUrls(array $configuration, string $propertyPath): void
{
$value = $configuration['acs'];
$propertyPath .= '.acs';
@@ -143,10 +141,7 @@ private function validateLoaDefinition(array $configuration, string $propertyPat
);
}
- /**
- * @param string $propertyPath
- */
- private function validateListOfNameIdPatterns(array $configuration, string $name, $propertyPath): void
+ private function validateListOfNameIdPatterns(array $configuration, string $name, string $propertyPath): void
{
$value = $configuration[$name];
$propertyPath = $propertyPath . '.' . $name;
@@ -165,7 +160,6 @@ private function validateListOfNameIdPatterns(array $configuration, string $name
* 'My.Institution' => 'loa2', // invalid
* ]
*
- * @param $propertyPath
*/
private function assertValidInstitutionIdentifiers(
array $spLoaConfiguration,
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
index f4e95ad3b..66a6e148b 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
@@ -124,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
/**
* @return string
*/
- private function createIdentity(NameId $targetNameId, Identity $sourceIdentity, InputInterface $input)
+ private function createIdentity(NameId $targetNameId, Identity $sourceIdentity, InputInterface $input): string
{
$newInstitution = $input->getArgument('target-institution');
$newEmail = $input->getArgument('email');
@@ -148,7 +148,7 @@ private function createIdentity(NameId $targetNameId, Identity $sourceIdentity,
private function tokenExists(array $targetSecondFactors, VettedSecondFactor $sourceSecondFactor): bool
{
foreach ($targetSecondFactors as $secondFactor) {
- if ($secondFactor->isEqual($secondFactor)) {
+ if ($secondFactor->isEqual($sourceSecondFactor)) {
return true;
}
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
index d439d0eb2..316bb3a64 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
@@ -72,7 +72,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($input->getOption(self::OPTION_LIST_EVENTS)) {
$output->writeln('The following events can be replayed:');
- $output->writeln(empty($availableEvents) ? 'None.' : $availableEvents);
+ $output->writeln($availableEvents === [] ? 'None.' : $availableEvents);
return 0;
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
index 76cb29d92..139c50a06 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
@@ -23,6 +23,7 @@
use Broadway\Domain\DomainMessage;
use Broadway\Serializer\SimpleInterfaceSerializer;
use Doctrine\DBAL\Connection;
+use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Statement;
use PDO;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\Forgettable;
@@ -72,7 +73,11 @@ public function getFromTill(int $limit, int $offset): DomainEventStream
return new DomainEventStream($events);
}
- public function fetchByEventTypes($eventTypes): DomainEventStream
+ /**
+ * @param string[] $eventTypes
+ * @throws Exception
+ */
+ public function fetchByEventTypes(array $eventTypes): DomainEventStream
{
$eventTypePlaceholders = implode(', ', array_fill(0, count($eventTypes), '?'));
@@ -116,9 +121,9 @@ private function deserializeEvent(array $row): DomainMessage
);
}
- private function prepareLoadStatement()
+ private function prepareLoadStatement(): Statement
{
- if ($this->loadStatement === null) {
+ if (!$this->loadStatement instanceof Statement) {
$query = str_replace(
['%es%', '%sd%'],
[$this->eventStreamTableName, $this->sensitiveDataTable],
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/EventCollection.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/EventCollection.php
index 0db6c3880..7c826b3fd 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/EventCollection.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/EventCollection.php
@@ -23,6 +23,9 @@
use IteratorAggregate;
use Surfnet\StepupMiddleware\MiddlewareBundle\Exception\InvalidArgumentException;
+/**
+ * @implements IteratorAggregate
+ */
final class EventCollection implements IteratorAggregate
{
/**
@@ -30,10 +33,13 @@ final class EventCollection implements IteratorAggregate
*/
private array $eventNames = [];
+ /**
+ * @param string[] $eventNames
+ */
public function __construct(array $eventNames)
{
foreach ($eventNames as $eventName) {
- if (!is_string($eventName) || empty($eventName)) {
+ if (!is_string($eventName) || ($eventName === '' || $eventName === '0')) {
throw InvalidArgumentException::invalidType('non-empty string', 'eventName', $eventName);
}
@@ -53,11 +59,14 @@ public function __construct(array $eventNames)
/**
* @return string[]
*/
- public function getEventNames()
+ public function getEventNames(): array
{
return $this->eventNames;
}
+ /**
+ * @return string[]
+ */
public function formatAsEventStreamTypes(): array
{
return array_map(
@@ -66,9 +75,6 @@ public function formatAsEventStreamTypes(): array
);
}
- /**
- * @return EventCollection
- */
public function select(array $subset): self
{
$nonAvailableEventNames = array_diff($subset, $this->eventNames);
@@ -85,15 +91,15 @@ public function select(array $subset): self
return new self($subset);
}
- /**
- * @param $eventName
- * @return bool
- */
- public function contains($eventName): bool
+
+ public function contains(string $eventName): bool
{
return in_array($eventName, $this->eventNames);
}
+ /**
+ * @return Iterator
+ */
public function getIterator(): Iterator
{
return new ArrayIterator($this->eventNames);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/ProjectorCollection.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/ProjectorCollection.php
index 452dd3f40..37f28af7e 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/ProjectorCollection.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/ProjectorCollection.php
@@ -24,6 +24,9 @@
use IteratorAggregate;
use Surfnet\StepupMiddleware\MiddlewareBundle\Exception\InvalidArgumentException;
+/**
+ * @implements IteratorAggregate
+ */
final class ProjectorCollection implements IteratorAggregate
{
/**
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/UnknownDBALConnectionException.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/UnknownDBALConnectionException.php
index 974a4401a..dbfa99fc0 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/UnknownDBALConnectionException.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Exception/UnknownDBALConnectionException.php
@@ -22,7 +22,7 @@
final class UnknownDBALConnectionException extends DomainException
{
- public function __construct($connectionName)
+ public function __construct(string $connectionName)
{
parent::__construct(sprintf('DBAL Connection "%s" does not exist', $connectionName));
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/InstitutionConfigurationState.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/InstitutionConfigurationState.php
index 5782a9e59..1b45df2c9 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/InstitutionConfigurationState.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/InstitutionConfigurationState.php
@@ -33,12 +33,12 @@
* @return InstitutionConfigurationState
*/
public static function load(
- $configuredInstitutions,
- $institutionConfigurationOptions,
- $raLocations,
+ array $configuredInstitutions,
+ array $institutionConfigurationOptions,
+ array $raLocations,
): self {
$optionInstitutions = array_map(
- fn(InstitutionConfigurationOptions $options) => $options->institution->getInstitution(),
+ fn(InstitutionConfigurationOptions $options): string => $options->institution->getInstitution(),
$institutionConfigurationOptions,
);
$mappedConfigurationOptions = array_combine($optionInstitutions, $institutionConfigurationOptions);
@@ -89,7 +89,7 @@ private function __construct(private array $mappedInstitutionConfigurations)
/**
* @return Generator
*/
- public function inferRemovalCommands()
+ public function inferRemovalCommands(): Generator
{
foreach ($this->mappedInstitutionConfigurations as $mappedInstitutionConfiguration) {
yield $mappedInstitutionConfiguration->inferRemoveInstitutionConfigurationByIdCommand();
@@ -99,7 +99,7 @@ public function inferRemovalCommands()
/**
* @return Generator
*/
- public function inferCreateCommands()
+ public function inferCreateCommands(): Generator
{
foreach ($this->mappedInstitutionConfigurations as $mappedInstitutionConfiguration) {
yield $mappedInstitutionConfiguration->inferCreateInstitutionConfigurationCommand();
@@ -109,7 +109,7 @@ public function inferCreateCommands()
/**
* @return Generator
*/
- public function inferReconfigureCommands()
+ public function inferReconfigureCommands(): Generator
{
foreach ($this->mappedInstitutionConfigurations as $mappedInstitutionConfiguration) {
yield $mappedInstitutionConfiguration->inferReconfigureInstitutionConfigurationCommand();
@@ -119,7 +119,7 @@ public function inferReconfigureCommands()
/**
* @return Generator
*/
- public function inferAddRaLocationCommands()
+ public function inferAddRaLocationCommands(): Generator
{
foreach ($this->mappedInstitutionConfigurations as $mappedInstitutionConfiguration) {
foreach ($mappedInstitutionConfiguration->inferAddRaLocationCommands() as $command) {
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
index 7e0bde2c4..d4ee0a008 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
@@ -49,6 +49,9 @@
*/
class BootstrapCommandService
{
+ /**
+ * @var string[]
+ */
private array $validRegistrationStatuses = ['unverified', 'verified', 'vetted'];
public function __construct(
@@ -68,10 +71,7 @@ public function setToken(TokenInterface $token): void
$this->tokenStorage->setToken($token);
}
- /**
- * @param string $registrationStatus
- */
- public function validRegistrationStatus($registrationStatus): void
+ public function validRegistrationStatus(string $registrationStatus): void
{
if (!in_array($registrationStatus, $this->validRegistrationStatuses)) {
throw new InvalidArgumentException(
@@ -84,12 +84,12 @@ public function validRegistrationStatus($registrationStatus): void
}
}
- public function requiresMailVerification(string $institution)
+ public function requiresMailVerification(string $institution): bool
{
$configuration = $this->institutionConfigurationRepository->findConfigurationOptionsFor(
new ConfigurationInstitution($institution),
);
- if ($configuration) {
+ if ($configuration instanceof \Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions) {
return $configuration->verifyEmailOption->isEnabled();
}
return true;
@@ -120,18 +120,12 @@ public function vetSecondFactor(
$this->pipeline->process($command);
}
- /**
- * @param $commonName
- * @param $email
- * @param $preferredLocale
- * @return CreateIdentityCommand
- */
public function createIdentity(
Institution $institution,
NameId $nameId,
- $commonName,
- $email,
- $preferredLocale,
+ string $commonName,
+ string $email,
+ string $preferredLocale,
): CreateIdentityCommand {
$command = new CreateIdentityCommand();
$command->UUID = (string)Uuid::uuid4();
@@ -147,8 +141,12 @@ public function createIdentity(
return $command;
}
- public function proveGsspPossession($secondFactorId, $identity, $tokenType, $tokenIdentifier): void
- {
+ public function proveGsspPossession(
+ string $secondFactorId,
+ Identity $identity,
+ string $tokenType,
+ string $tokenIdentifier
+ ): void {
$command = new ProveGssfPossessionCommand();
$command->UUID = (string)Uuid::uuid4();
$command->secondFactorId = $secondFactorId;
@@ -159,8 +157,11 @@ public function proveGsspPossession($secondFactorId, $identity, $tokenType, $tok
$this->pipeline->process($command);
}
- public function provePhonePossession($secondFactorId, $identity, $phoneNumber): void
- {
+ public function provePhonePossession(
+ string $secondFactorId,
+ Identity $identity,
+ string $phoneNumber
+ ): void {
$command = new ProvePhonePossessionCommand();
$command->UUID = (string)Uuid::uuid4();
$command->secondFactorId = $secondFactorId;
@@ -170,8 +171,11 @@ public function provePhonePossession($secondFactorId, $identity, $phoneNumber):
$this->pipeline->process($command);
}
- public function proveYubikeyPossession($secondFactorId, $identity, $yubikeyPublicId): void
- {
+ public function proveYubikeyPossession(
+ string $secondFactorId,
+ Identity $identity,
+ string $yubikeyPublicId
+ ): void {
$command = new ProveYubikeyPossessionCommand();
$command->UUID = (string)Uuid::uuid4();
$command->secondFactorId = $secondFactorId;
@@ -181,8 +185,10 @@ public function proveYubikeyPossession($secondFactorId, $identity, $yubikeyPubli
$this->pipeline->process($command);
}
- public function verifyEmail(Identity $identity, string $tokenType): void
- {
+ public function verifyEmail(
+ Identity $identity,
+ string $tokenType
+ ): void {
$unverifiedSecondFactor = $this->unverifiedSecondFactorRepository->findOneBy(
['identityId' => $identity->id, 'type' => $tokenType],
);
@@ -210,7 +216,7 @@ public function migrateVettedSecondFactor(
$this->pipeline->process($command);
}
- public function enrichEventMetadata($actorId): void
+ public function enrichEventMetadata(string $actorId): void
{
$actor = $this->identityRepository->findOneBy(['id' => $actorId]);
@@ -220,17 +226,11 @@ public function enrichEventMetadata($actorId): void
$this->enricher->setMetadata($metadata);
}
- /**
- * @return Identity
- */
- public function getIdentity(NameId $nameId, Institution $institution)
+ public function getIdentity(NameId $nameId, Institution $institution): Identity
{
return $this->identityRepository->findOneByNameIdAndInstitution($nameId, $institution);
}
- /**
- ** @return Identity
- */
public function getIdentityByNameId(NameId $nameId): ?Identity
{
return $this->identityRepository->findOneByNameId($nameId);
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
index 9b6c40399..05e60e10f 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
@@ -74,15 +74,10 @@ public function rollBack(): void
}
/**
- * @param string $connectionName
* @return Connection
*/
- public function getConnection($connectionName)
+ public function getConnection(string $connectionName): Connection
{
- if (!is_string($connectionName)) {
- throw InvalidArgumentException::invalidType('string', 'connectionName', $connectionName);
- }
-
if (!array_key_exists($connectionName, $this->connections)) {
throw new UnknownDBALConnectionException($connectionName);
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
index 49ba7e401..305ade0de 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
@@ -18,7 +18,6 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
-use Broadway\Domain\DomainEventStream;
use Broadway\Domain\DomainMessage;
use Doctrine\DBAL\Exception\InvalidArgumentException;
use Exception;
@@ -71,7 +70,7 @@ public function __construct(
);
}
- public function replayEvents(OutputInterface $output, $increments): void
+ public function replayEvents(OutputInterface $output, int $increments): void
{
$preparationProgress = new ProgressBar($output, 3);
$preparationProgress->setFormat('event_replay');
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/PastEventsService.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/PastEventsService.php
index 3da22acb2..bedf349ca 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/PastEventsService.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/PastEventsService.php
@@ -31,7 +31,7 @@ public function __construct(private DBALEventHydrator $eventHydrator)
/**
* @return DomainEventStream
*/
- public function findEventsBy(EventCollection $events)
+ public function findEventsBy(EventCollection $events): DomainEventStream
{
return $this->eventHydrator->fetchByEventTypes($events->formatAsEventStreamTypes());
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
index e61bda613..a8f9d296a 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
@@ -19,8 +19,9 @@
namespace Surfnet\StepupMiddleware\MiddlewareBundle\Service;
use Assert\Assertion;
-use DateTime;
use Surfnet\Stepup\Configuration\Value\Institution;
+use Surfnet\Stepup\DateTime\DateTime;
+use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\RaLocation;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\InstitutionConfigurationOptionsService;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\RaLocationService;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RaListingService;
@@ -39,17 +40,12 @@
*/
class VerifiedSecondFactorReminderMailService
{
- /**
- * @var TranslatorInterface
- */
- private $translator;
-
private readonly string $fallbackLocale;
public function __construct(
private readonly Mailer $mailer,
private readonly Sender $sender,
- TranslatorInterface $translator,
+ private readonly TranslatorInterface $translator,
private readonly EmailTemplateService $emailTemplateService,
private readonly InstitutionConfigurationOptionsService $institutionConfigurationOptionsService,
private readonly RaListingService $raListingService,
@@ -57,13 +53,15 @@ public function __construct(
string $fallbackLocale,
) {
Assertion::string($fallbackLocale, 'Fallback locale "%s" expected to be string, type %s given');
- $this->translator = $translator;
$this->fallbackLocale = $fallbackLocale;
}
+ /**
+ * @throws TransportExceptionInterface
+ */
public function sendReminder(VerifiedTokenInformation $tokenInformation): void
{
- $institution = new Institution((string)$tokenInformation->getInstitution());
+ $institution = new Institution($tokenInformation->getInstitution());
$institutionConfigurationOptions = $this->institutionConfigurationOptionsService
->findInstitutionConfigurationOptionsFor($institution);
if ($institutionConfigurationOptions->useRaLocationsOption->isEnabled()) {
@@ -105,21 +103,16 @@ public function sendReminder(VerifiedTokenInformation $tokenInformation): void
}
/**
- * @param string $locale
- * @param string $commonName
- * @param string $email
- * @param DateTime $requestedAt
- * @param $registrationCode
- * @return void
+ * @param RaLocation[]|null $raLocations
* @throws TransportExceptionInterface
*/
private function sendReminderWithInstitution(
- $locale,
- $commonName,
- $email,
- $requestedAt,
- $registrationCode,
- $raLocations,
+ string $locale,
+ string $commonName,
+ string $email,
+ DateTime $requestedAt,
+ string $registrationCode,
+ ?array $raLocations,
): void {
$subject = $this->translator->trans(
'ss.mail.registration_email.subject',
@@ -152,12 +145,16 @@ private function sendReminderWithInstitution(
$this->mailer->send($email);
}
+ /**
+ * @param RegistrationAuthorityCredentials[] $ras
+ * @throws TransportExceptionInterface
+ */
private function sendReminderWithRas(
- $locale,
- $commonName,
- $email,
- $requestedAt,
- $registrationCode,
+ string $locale,
+ string $commonName,
+ string $email,
+ DateTime$requestedAt,
+ string $registrationCode,
array $ras,
): void {
$subject = $this->translator->trans(
@@ -186,7 +183,7 @@ private function sendReminderWithRas(
->from(new Address($this->sender->getEmail(), $this->sender->getName()))
->to(new Address($email, $commonName))
->subject($subject)
- ->htmlTemplate('SurfnetStepupMiddlewareCommandHandling/SecondFactorMailService/email.html.twig')
+ ->htmlTemplate('@SurfnetStepupMiddlewareCommandHandling/SecondFactorMailService/email.html.twig')
->context($parameters);
$this->mailer->send($email);
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
index e1ad14b49..c2a61a62a 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
@@ -29,12 +29,12 @@
class EventCollectionTest extends TestCase
{
use MockeryPHPUnitIntegration;
+
/**
* @test
* @group event-replay
*
* @dataProvider emptyOrNonStringProvider
- * @param $emptyOrNonString
*/
public function an_event_collection_must_be_created_from_an_array_of_non_empty_strings(
bool|int|string|stdClass|array|null $emptyOrNonString,
@@ -155,6 +155,9 @@ public function events_in_an_event_collection_can_be_formatted_as_event_stream_c
);
}
+ /**
+ * @return array
+ */
public function emptyOrNonStringProvider(): array
{
return [
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
index 2a8d1fb88..dfc16c563 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Service/VerifiedSecondFactorReminderServiceTest.php
@@ -40,31 +40,15 @@ class VerifiedSecondFactorReminderServiceTest extends TestCase
{
use MockeryPHPUnitIntegration;
- /**
- * @var VerifiedSecondFactorReminderService
- */
private VerifiedSecondFactorReminderService $service;
- /**
- * @var VerifiedSecondFactorReminderMailService|MockInterface
+ private VerifiedSecondFactorReminderMailService&MockInterface $mailService;
- */
- private $mailService;
+ private LoggerInterface&MockInterface $logger;
- /**
- * @var LoggerInterface|MockInterface
- */
- private $logger;
-
- /**
- * @var VerifiedSecondFactorRepository|MockInterface
- */
- private $verifiedSecondFactorRepository;
- /**
- * @var IdentityRepository|MockInterface
- */
- private $identityRepository;
+ private VerifiedSecondFactorRepository&MockInterface $verifiedSecondFactorRepository;
+ private IdentityRepository&MockInterface $identityRepository;
public function setUp(): void
{
diff --git a/tests/database/AuthorizationRepositoryMatrixTest.php b/tests/database/AuthorizationRepositoryMatrixTest.php
index 94431dd35..08d5245b3 100644
--- a/tests/database/AuthorizationRepositoryMatrixTest.php
+++ b/tests/database/AuthorizationRepositoryMatrixTest.php
@@ -40,9 +40,9 @@ class AuthorizationRepositoryMatrixTest extends KernelTestCase
/**
* @var AuthorizationRepository
*/
- private $authzRepository;
+ private ?object $authzRepository;
- public function authorizationMatrix()
+ public function authorizationMatrix(): array
{
$ra = RegistrationAuthorityRole::ra();
$raa = RegistrationAuthorityRole::raa();
@@ -60,7 +60,7 @@ public function authorizationMatrix()
];
}
- public function selectRaaMatrix()
+ public function selectRaaMatrix(): array
{
$aRaa = new IdentityId('cccfece4-e5e5-40b7-9aa4-a800d7cd3633'); // Raa @ institution A
$ghRaa = new IdentityId('02b70719-243f-4c7d-8649-48952a816ddf'); // RAA @ institution H
@@ -93,7 +93,7 @@ public function test_get_institutions_for_role_matrix(
RegistrationAuthorityRole $requiredRole,
IdentityId $identity,
array $expectedInstitutions
- ) {
+ ): void {
$institutions = $this->authzRepository->getInstitutionsForRole($requiredRole, $identity);
$results = $this->flattenInstitutionResults($institutions);
@@ -102,8 +102,8 @@ public function test_get_institutions_for_role_matrix(
$expectedInstitutions,
sprintf(
'The results do not match the expected results. Actual "%s" versus expected: "%s"',
- implode($results, ','),
- implode($expectedInstitutions, ',')
+ implode(',', $results),
+ implode(',', $expectedInstitutions)
)
);
}
@@ -111,14 +111,17 @@ public function test_get_institutions_for_role_matrix(
/**
* @dataProvider selectRaaMatrix
*/
- public function test_select_raa_authorization(IdentityId $identityId, array $expected)
+ public function test_select_raa_authorization(IdentityId $identityId, array $expected): void
{
$institutions = $this->authzRepository->getInstitutionsForSelectRaaRole($identityId);
$this->assertEquals($expected, $this->flattenInstitutionResults($institutions));
}
- private function flattenInstitutionResults(InstitutionCollection $collection)
+ /**
+ * @return mixed[]
+ */
+ private function flattenInstitutionResults(InstitutionCollection $collection): array
{
$institutions = [];
/** @var Institution $institution */
From efa0cdc201d4060895b9053d2ee905b4cf752708 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Tue, 2 Apr 2024 08:38:59 +0200
Subject: [PATCH 44/89] Configure level 9, addding warnings to baseline
---
ci/qa/phpstan-baseline.neon | 3668 ++++++++++++++---
docs/postman/2.http | 6 +-
.../InstitutionAuthorizationOptionTest.php | 12 -
.../Value/InstitutionConfigurationIdTest.php | 6 +-
.../Tests/Identity/Value/GssfIdTest.php | 6 +-
.../Tests/Identity/Value/PhoneNumberTest.php | 6 +-
.../Identity/Value/StepupProviderTest.php | 6 +-
.../Entity/ConfiguredInstitution.php | 4 -
.../RegistrationAuthorityCredentials.php | 2 +
.../Request/CommandParamConverter.php | 2 +
.../AuthorizationContextServiceTest.php | 5 +-
.../CommandAuthorizationServiceTest.php | 8 +
.../Tests/Doctrine/Type/DateTimeTypeTest.php | 7 +-
.../ConfiguredInstitutionControllerTest.php | 28 +-
.../Tests/Endpoint/SraaControllerTest.php | 23 +-
.../Command/UpdateConfigurationCommand.php | 14 +-
.../ConfigurationCommandHandler.php | 2 +-
.../InstitutionConfigurationProcessor.php | 5 +-
.../Resources/config/processors.yml | 2 +-
.../ConfigurationCommandHandlerTest.php | 14 +-
.../InstitutionConfigurationProcessorTest.php | 30 +-
...tyCommandHandlerSelfAssertedTokensTest.php | 21 +-
.../IdentityCommandHandlerTest.php | 4 +-
...egistrationAuthorityCommandHandlerTest.php | 4 +-
.../Tests/SensitiveData/SensitiveDataTest.php | 7 +-
.../Tests/Value/InstitutionTest.php | 7 +-
.../GatewayBundle/Entity/SamlEntity.php | 20 +-
.../Controller/ConfigurationController.php | 3 +-
.../ConfigurationControllerTest.php | 43 +-
...InstitutionConfigurationControllerTest.php | 51 +-
.../Validator/ConfigurationValidationTest.php | 9 +-
...nfigureInstitutionRequestValidatorTest.php | 9 +-
...ilVerifiedSecondFactorRemindersCommand.php | 12 +-
.../EventSourcing/DBALEventHydrator.php | 10 +-
.../Service/EventStreamReplayer.php | 2 +-
.../EventSourcing/EventCollectionTest.php | 2 +-
.../MappedInstitutionConfigurationTest.php | 3 +
37 files changed, 3263 insertions(+), 800 deletions(-)
diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon
index 7d7761515..563d4f2d9 100644
--- a/ci/qa/phpstan-baseline.neon
+++ b/ci/qa/phpstan-baseline.neon
@@ -1,5 +1,10 @@
parameters:
ignoreErrors:
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20141125173004.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20141125173004\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
@@ -10,6 +15,21 @@ parameters:
count: 1
path: ../../src/Surfnet/Migrations/Version20141125173004.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Migrations/Version20141125173004.php
+
+ -
+ message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20141125173004.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20141209150426.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20141209150426\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
@@ -20,21 +40,96 @@ parameters:
count: 1
path: ../../src/Surfnet/Migrations/Version20141209150426.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Migrations/Version20141209150426.php
+
+ -
+ message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20141209150426.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20141210174213.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20141210174213\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20141210174213.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 7
+ path: ../../src/Surfnet/Migrations/Version20141210174213.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20150312162849.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20150312162849.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150508085838.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150508085838\\:\\:getGatewaySchema\\(\\) should return string but returns array\\|bool\\|float\\|int\\|string\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150508085838.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150522163053.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20150522163053\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20150522163053.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 8
+ path: ../../src/Surfnet/Migrations/Version20150522163053.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150522164907.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20150522164907\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20150522164907.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20150522164907.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150528154959.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20150528154959\\:\\:getGatewaySchema\\(\\) should return string but returns array\\|bool\\|float\\|int\\|string\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20150528154959.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20150615114646\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
@@ -50,21 +145,151 @@ parameters:
count: 1
path: ../../src/Surfnet/Migrations/Version20150615114646.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 6
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
+ -
+ message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20150615114646.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20180131150800.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20180131150800\\:\\:getGatewaySchema\\(\\) should return string but returns array\\|bool\\|float\\|int\\|string\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20180131150800.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20200114161618.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20200114161618\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20200114161618.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20200114161618.php
+
+ -
+ message: "#^Cannot access offset 'payload' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Cannot access offset 'vetting_type' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Method Surfnet\\\\Migrations\\\\Version20210610131957\\:\\:stripSensitiveData\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Parameter \\#1 \\$rawPayload of method Surfnet\\\\Migrations\\\\Version20210610131957\\:\\:stripSensitiveData\\(\\) expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Part \\$playhead \\(mixed\\) of encapsed string cannot be cast to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Part \\$uuid \\(mixed\\) of encapsed string cannot be cast to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20210610131957.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20220519134637.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20220519134637\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20220519134637.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20220519134637.php
+
+ -
+ message: "#^Cannot call method getParameter\\(\\) on Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Migrations/Version20221102143350.php
+
-
message: "#^Method Surfnet\\\\Migrations\\\\Version20221102143350\\:\\:getGatewaySchema\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/Migrations/Version20221102143350.php
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Migrations/Version20221102143350.php
+
+ -
+ message: "#^Cannot access offset 'email_templates' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Cannot access offset 'gateway' on mixed\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Cannot access offset 'identity_providers' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Cannot access offset 'service_providers' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Cannot access offset 'sraa' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Parameter \\#2 \\$emailTemplates of class Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\EmailTemplatesUpdatedEvent constructor expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Parameter \\#2 \\$identityProviders of class Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\IdentityProvidersUpdatedEvent constructor expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Parameter \\#2 \\$newConfiguration of class Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ConfigurationUpdatedEvent constructor expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Parameter \\#2 \\$serviceProviders of class Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\ServiceProvidersUpdatedEvent constructor expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
+ -
+ message: "#^Parameter \\#2 \\$sraaList of class Surfnet\\\\Stepup\\\\Configuration\\\\Event\\\\SraaUpdatedEvent constructor expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/Configuration.php
+
-
message: "#^Property Surfnet\\\\Stepup\\\\Configuration\\\\Configuration\\:\\:\\$configuration type has no value type specified in iterable type array\\.$#"
count: 1
@@ -340,6 +565,26 @@ parameters:
count: 1
path: ../../src/Surfnet/Stepup/Configuration/Event/VerifyEmailOptionChangedEvent.php
+ -
+ message: "#^Cannot call method add\\(\\) on Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationList\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+
+ -
+ message: "#^Cannot call method containsWithId\\(\\) on Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationList\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+
+ -
+ message: "#^Cannot call method getById\\(\\) on Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationList\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+
+ -
+ message: "#^Cannot call method removeWithId\\(\\) on Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationList\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+
-
message: "#^Method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:__construct\\(\\) has parameter \\$allowedSecondFactors with no value type specified in iterable type array\\.$#"
count: 1
@@ -480,6 +725,16 @@ parameters:
count: 1
path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+ -
+ message: "#^Parameter \\#1 \\$institution of method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:add\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
+ -
+ message: "#^Parameter \\#1 \\$institution of method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:remove\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Collection/InstitutionCollection.php
+
-
message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\:\\:\\$elements type has no value type specified in iterable type array\\.$#"
count: 1
@@ -511,1487 +766,3617 @@ parameters:
path: ../../src/Surfnet/Stepup/Identity/Collection/VettingTypeHintCollection.php
-
- message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\InstitutionCollection\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot cast mixed to string\\.$#"
count: 1
path: ../../src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\InstitutionCollection\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/InstitutionCollection.php
-
- message: "#^Class Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection extends generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
+ message: "#^Cannot call method getId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+ message: "#^Cannot call method getInstitution\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryToken\\:\\:getTokenId\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId but returns Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryToken\\:\\:getType\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType but returns Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$recoveryTokenId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$recoveryTokenId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$recoveryTokenType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$recoveryTokenType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryToken.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\:\\:first\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryToken but returns Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryToken\\|false\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RecoveryTokenCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method equals\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/RegistrationAuthorityCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Class Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection extends generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\:\\:getSecondFactorWithHighestLoa\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactor\\|null but returns mixed\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$callback of function array_reduce expects callable\\(mixed, mixed\\)\\: mixed, Closure\\(Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor, Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\)\\: Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/SecondFactorCollection.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getCommonName\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getEmail\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+ message: "#^Cannot call method getId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+ message: "#^Cannot call method getInstitution\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getPreferredLocale\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method isOpen\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\:\\:getType\\(\\) should return Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType but returns Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$id of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$identity of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity, Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithUnverifiedSecondFactorRevocationEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\UnverifiedSecondFactorRevokedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$type of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithUnverifiedSecondFactorRevocationEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\UnverifiedSecondFactorRevokedEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/UnverifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method add\\(\\) on Surfnet\\\\Stepup\\\\DateTime\\\\DateTime\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+ message: "#^Cannot call method getCommonName\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+ message: "#^Cannot call method getEmail\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+ message: "#^Cannot call method getId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+ message: "#^Cannot call method getInstitution\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+ message: "#^Cannot call method getNameId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsAddedToWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
+ message: "#^Cannot call method getPreferredLocale\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsRemovedFromWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:getType\\(\\) should return Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType but returns Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$id of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$secondFactorType of method Surfnet\\\\StepupBundle\\\\Service\\\\SecondFactorTypeService\\:\\:getLevel\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$identity of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity, Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithVerifiedSecondFactorRevocationEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VerifiedSecondFactorRevokedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$type of static method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:create\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithVerifiedSecondFactorRevocationEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VerifiedSecondFactorRevokedEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+ message: "#^Cannot call method getId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+ message: "#^Cannot call method getInstitution\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Api\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:getType\\(\\) should return Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType but returns Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:vettingType\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType but returns Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithVettedSecondFactorRevocationEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorRevokedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithVettedSecondFactorRevocationEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$secondFactorType of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorRevokedEvent constructor expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Entity/VettedSecondFactor.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\AppointedAsRaaForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRecoveryCodeRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\CompliedWithRevocationEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\EmailVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\GssfPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistReplacedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityAccreditedAsRaaEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$contactInformation of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\ContactInformation constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$location of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Location constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\EventSourcing\\\\IdentityRepository\\:\\:obtainInformation\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$contactInformation of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\ContactInformation constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/EventSourcing/IdentityRepository.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$location of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Location constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityCreatedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityEmailChangedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\UnknownVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityForgottenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeFactory\\:\\:fromData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeFactory.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\IdentityRenamedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:institutionConfigurationEventsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsAddedToWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:availableSecondFactorTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\InstitutionsRemovedFromWhitelistEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:differentAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:sameAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\LocalePreferenceExpressedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+ path: ../../src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhonePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\PhoneRecoveryTokenPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RecoveryTokenRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityInformationAmendedForInstitutionEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\RegistrationAuthorityRetractedForInstitutionEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+
+ -
+ message: "#^Property Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SafeStoreSecretRecoveryTokenPossessionPromisedEvent\\:\\:\\$secret \\(Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenIdentifier\\) does not accept Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenIdentifier\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+
+ -
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:withVettingType\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+
+ -
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:withVettingType\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\U2fDevicePossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettedSecondFactorsAllRevokedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\VettingTypeHintsSavedEvent\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistCreatedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\WhitelistReplacedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenAndVerifiedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeyPossessionProvenEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\YubikeySecondFactorBootstrappedEvent\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\EventSourcing\\\\IdentityRepository\\:\\:obtainInformation\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/EventSourcing/IdentityRepository.php
+
+ -
+ message: "#^Argument of an invalid type Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null supplied for foreach, only iterables are supported\\.$#"
+ count: 8
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method asVetted\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method complyWithRevocation\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method count\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method count\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method count\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method exists\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method first\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method get\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method get\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 7
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method get\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 11
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method getIdentifier\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method getSecondFactorWithHighestLoa\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method getValues\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method getValues\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method hasType\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method isEmpty\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method remove\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method remove\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method remove\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 9
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method revoke\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method set\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RecoveryTokenCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method set\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\RegistrationAuthorityCollection\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method set\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null\\.$#"
+ count: 13
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method typeAndIdentifierAreEqual\\(\\) on mixed\\.$#"
+ count: 3
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Cannot call method vet\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Identity\\:\\:getVerifiedSecondFactor\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Identity\\:\\:getVettedSecondFactorById\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\SecondFactorCollection\\|null given\\.$#"
+ count: 4
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:asVetted\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Parameter \\#4 \\$secondFactorId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorMigratedToEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Identity.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\EmailVerificationWindow\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/EmailVerificationWindow.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\OnPremiseVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/OnPremiseVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RegistrationAuthorityRole\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/RegistrationAuthorityRole.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfAssertedRegistrationVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfAssertedRegistrationVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SelfVetVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/SelfVetVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\UnknownVettingType\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/UnknownVettingType.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeFactory\\:\\:fromData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeFactory.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Value/VettingTypeHint.php
+
+ -
+ message: "#^Cannot call method addAllFrom\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Whitelist.php
+
+ -
+ message: "#^Cannot call method contains\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Whitelist.php
+
+ -
+ message: "#^Cannot call method removeAllIn\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Identity/Whitelist.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Identity/Whitelist.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:institutionConfigurationEventsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:availableSecondFactorTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:differentAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\AllowedSecondFactorListTest\\:\\:sameAllowedSecondFactorListsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$other of method Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\:\\:equals\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionHasInstitutionProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionSetComparisonProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationA with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationB with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:the_has_institution_method_should_check_for_institutions\\(\\) has parameter \\$institutionList with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionConfigurationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:institutionTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$type of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionRole constructor expects string, bool\\|int\\|string given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:dirtyInstitutionListProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:factory_method_can_build_from_array_of_string_and_rejects_invalid_types\\(\\) has parameter \\$invalid with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$institutions of static method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionSet\\:\\:create\\(\\) expects array\\, array\\ given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationListTest\\:\\:getRaLocationsArray\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationListTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationNameTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\JsonHelperTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\UserDataFilterTest\\:\\:test_filtering_is_applied_with_expected_result\\(\\) has parameter \\$expectation with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Collection\\\\InstitutionCollectionTest\\:\\:getInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Entity\\\\ConfigurableSettingsTest\\:\\:localeVerifications\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Entity/ConfigurableSettingsTest.php
+
+ -
+ message: "#^Cannot call method setSensitiveData\\(\\) on mixed\\.$#"
+ count: 2
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:serializedDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of static method Broadway\\\\Serializer\\\\Serializable\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\\\|T of object, string given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
+
+ -
+ message: "#^Parameter \\#2 \\$array of function array_map expects array, array\\\\|false given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\WhitelistEventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\CommonNameTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\DocumentNumberTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidEmailProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\GssfIdTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\InstitutionTest\\:\\:invalidValueProviderInvalidString\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\PhoneNumberTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\StepupProviderTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\TimeFrameTest\\:\\:invalidValueProviderInt\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:invalidFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+
+ -
+ message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:validFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Filter/InstitutionAuthorizationRepositoryFilter.php
+
+ -
+ message: "#^Cannot call method getIdentityId\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Service/CommandAuthorizationService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:__construct\\(\\) has parameter \\$errorMessages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:denied\\(\\) has parameter \\$messages with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:getErrorMessages\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionAuthorizationContext\\:\\:getInstitutions\\(\\) should return Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection but returns Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\InstitutionCollection\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionAuthorizationContext.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:__construct\\(\\) has parameter \\$institutionRoles with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSetInterface\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\ConfiguredInstitution\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\RaLocation\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
+
+ -
+ message: "#^Parameter \\#2 \\$secondFactorType of static method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\AllowedSecondFactor\\:\\:createFrom\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/AllowedSecondFactorListProjector.php
+
+ -
+ message: "#^Cannot access property \\$numberOfTokensPerIdentityOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$selfAssertedTokensOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$selfVetOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$showRaaContactInformationOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$ssoOn2faOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$useRaLocationsOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$verifyEmailOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$institutionConfigurationOptions of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\InstitutionConfigurationOptionsRepository\\:\\:save\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null given\\.$#"
+ count: 7
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\AllowedSecondFactorRepository\\:\\:getAllowedSecondFactorsFor\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/AllowedSecondFactorRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\InstitutionAuthorizationRepository\\:\\:findAuthorizationOptionsForInstitution\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\InstitutionAuthorizationRepository\\:\\:findAuthorizationOptionsForInstitutionByRole\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\InstitutionAuthorizationRepository\\:\\:findSelectRaasForInstitution\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\InstitutionConfigurationOptionsRepository\\:\\:findConfigurationOptionsFor\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionConfigurationOptionsRepository.php
+
+ -
+ message: "#^Cannot call method getInstitution\\(\\) on string\\|Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\Institution\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\RaLocationRepository\\:\\:findByInstitution\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\RaLocationRepository\\:\\:findByRaLocationId\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\RaLocation\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Repository\\\\RaLocationRepository\\:\\:search\\(\\) should return array\\\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/RaLocationRepository.php
+
+ -
+ message: "#^Cannot access an offset on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\AllowedSecondFactor\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
+
+ -
+ message: "#^Parameter \\#1 \\$allowedSecondFactors of static method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:ofTypes\\(\\) expects array, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\AllowedSecondFactor given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Service\\\\InstitutionAuthorizationOptionMap\\:\\:fromInstitutionAuthorizations\\(\\) has parameter \\$institutionAuthorizations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\AbstractQuery\\:\\:\\$pageNumber \\(int\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\SecondFactorAuditLogQuery\\:\\:\\$orderBy \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\SecondFactorAuditLogQuery\\:\\:\\$orderDirection \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+
+ -
+ message: "#^Access to an undefined property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\CreateIdentityCommand\\|Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\UpdateIdentityCommand\\:\\:\\$institution\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, string\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\IdentityQuery\\:\\:\\$commonName \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\IdentityQuery\\:\\:\\$email \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\IdentityQuery\\:\\:\\$nameId \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Parameter \\#1 \\$identityId of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:findOneByIdentityId\\(\\) expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaCandidateQuery\\:\\:\\$commonName \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaCandidateQuery\\:\\:\\$email \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaCandidateQuery\\:\\:\\$institution \\(string\\|Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaCandidateQuery\\:\\:\\$raInstitution \\(string\\|Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaCandidateQuery\\:\\:\\$secondFactorTypes \\(array\\\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$email \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$institution \\(string\\|Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$name \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$orderBy \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$orderDirection \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$raInstitution \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaListingQuery\\:\\:\\$role \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+
+ -
+ message: "#^Parameter \\#1 \\$raLocationId of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+
+ -
+ message: "#^Parameter \\#4 \\$collection of class Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse constructor expects array, array\\\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Query\\\\RaLocationQuery\\:\\:\\$orderBy \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Query\\\\RaLocationQuery\\:\\:\\$orderDirection \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$email \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$institution \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$name \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$orderBy \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$orderDirection \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$secondFactorId \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$status \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RaSecondFactorQuery\\:\\:\\$type \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+
+ -
+ message: "#^Cannot call method getRoles\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$email \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$identityId \\(Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$institution \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$name \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$orderBy \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$orderDirection \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$status \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\RecoveryTokenQuery\\:\\:\\$type \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\UnverifiedSecondFactorQuery\\:\\:\\$identityId \\(Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\UnverifiedSecondFactorQuery\\:\\:\\$verificationNonce \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId constructor expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\VerifiedSecondFactorQuery\\:\\:\\$registrationCode \\(string\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Query\\\\VettedSecondFactorQuery\\:\\:\\$identityId \\(Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId\\|null\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php
+
+ -
+ message: "#^Parameter \\#1 \\$role of class Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\AuthorityRole constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/AuthorityRoleType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
+
+ -
+ message: "#^Parameter \\#1 \\$commonName of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\CommonName constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/CommonNameType.php
+
+ -
+ message: "#^Parameter \\#1 \\$contactInformation of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\ContactInformation constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationContactInformationType.php
+
+ -
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationInstitutionType.php
+
+ -
+ message: "#^Parameter \\#1 \\$location of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\Location constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ConfigurationLocationType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php
+
+ -
+ message: "#^Parameter \\#1 \\$contactInformation of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\ContactInformation constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/ContactInformationType.php
+
+ -
+ message: "#^Cannot call method format\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\DateTimeType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+
+ -
+ message: "#^Parameter \\#2 \\$datetime of static method DateTime\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+
+ -
+ message: "#^Parameter \\#1 \\$documentNumber of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\DocumentNumber constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DocumentNumberType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php
+
+ -
+ message: "#^Parameter \\#1 \\$email of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Email constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/EmailType.php
+
+ -
+ message: "#^Parameter \\#1 \\$type of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\InstitutionRole constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionRoleType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php
+
+ -
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/InstitutionType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php
+
+ -
+ message: "#^Parameter \\#1 \\$locale of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Locale constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocaleType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php
+
+ -
+ message: "#^Parameter \\#1 \\$location of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Location constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/LocationType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php
+
+ -
+ message: "#^Parameter \\#1 \\$raLocationName of class Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\RaLocationName constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/RaLocationNameType.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\SecondFactorStatusType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php
+
+ -
+ message: "#^Parameter \\#1 \\$type of class Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType constructor expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorTypeType.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VettingTypeHintsType.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\Stepup\\\\Identity\\\\Collection\\\\VettingTypeHintCollection\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/VettingTypeHintsType.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\EventListener\\\\ExceptionListener\\:\\:createJsonErrorResponse\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadApiRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadCommandRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\AuditLogEntry\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\IdentitySelfAssertedTokenOptions\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\InstitutionListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaCandidate\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettingTypeHint.php
+
+ -
+ message: "#^Cannot call method getCommonName\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\CommonName\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$type of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType constructor expects string, string\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php
+
+ -
+ message: "#^Cannot access property \\$commonName on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php
+
+ -
+ message: "#^Cannot access property \\$email on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php
+
+ -
+ message: "#^Cannot access property \\$preferredLocale on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$identity of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\IdentityRepository\\:\\:save\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Projector\\\\IdentityProjector\\:\\:determinePossessionOfSelfAssertedToken\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Projector\\\\IdentitySelfAssertedTokenOptionsProjector\\:\\:determinePossessionOfToken\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentitySelfAssertedTokenOptionsProjector.php
+
+ -
+ message: "#^Cannot access property \\$commonName on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+
+ -
+ message: "#^Cannot access property \\$email on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+
+ -
+ message: "#^Cannot access property \\$role on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$raListingEntry of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:save\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+
+ -
+ message: "#^Cannot access property \\$documentNumber on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Cannot access property \\$id on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Cannot access property \\$institution on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Cannot access property \\$status on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\|null\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Cannot call method getDocumentNumber\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaSecondFactorRepository\\:\\:save\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\|null given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+
+ -
+ message: "#^Cannot access property \\$status on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$entry of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RecoveryTokenRepository\\:\\:save\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php
+
+ -
+ message: "#^Cannot access property \\$secondFactorIdentifier on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\UnverifiedSecondFactorRepository\\:\\:remove\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\|null given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\VerifiedSecondFactorRepository\\:\\:remove\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null given\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\VettedSecondFactorRepository\\:\\:remove\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettedSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettedSecondFactor\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$institution of static method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\WhitelistEntry\\:\\:createFrom\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php
+
+ -
+ message: "#^Parameter \\#1 \\$institutions of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) expects array\\, array\\, mixed\\> given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:findByIdentityId\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:findEntriesWhereIdentityIsActorOnly\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:saveAll\\(\\) has parameter \\$entries with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+
+ -
+ message: "#^Cannot access offset 'institution' on mixed\\.$#"
+ count: 5
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedIdentityRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedInstitutionRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\IdentityRepository\\:\\:findByNameIdsIndexed\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\IdentityRepository\\:\\:findOneByNameIdAndInstitution\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) should return array\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:findByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:findByIdentityIdAndRaInstitutionWithContext\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\|null but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:listRasFor\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Parameter \\#1 \\$elements of class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection constructor expects array\\, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\SraaRepository\\:\\:saveAll\\(\\) has parameter \\$sraaList with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\VerifiedSecondFactorRepository\\:\\:findByDate\\(\\) should return array\\ but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) should return array but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:getAll\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+
+ -
+ message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\AbstractSearchService\\:\\:createPaginatorFrom\\(\\) return type with generic class Pagerfanta\\\\Pagerfanta does not specify its types\\: T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+
+ -
+ message: "#^Parameter \\#1 \\$raListings of static method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:fromRaListings\\(\\) expects array\\, array\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/IdentityService.php
+
+ -
+ message: "#^Cannot call method getInstitution\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) has parameter \\$raCandidate with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+
+ -
+ message: "#^Parameter \\#1 \\$func of method Doctrine\\\\Common\\\\Collections\\\\ArrayCollection\\<\\(int\\|string\\),mixed\\>\\:\\:map\\(\\) expects Closure\\(mixed\\)\\: Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials, Closure\\(Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\)\\: Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:searchUnpaginated\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:searchUnpaginated\\(\\) should return array but returns mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RecoveryTokenService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Specification\\\\SpecificationInterface\\:\\:apply\\(\\) has parameter \\$entityRepository with generic class Doctrine\\\\ORM\\\\EntityRepository but does not specify its types\\: TEntityClass$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\AuthorizedInstitutionCollection\\:\\:getAuthorizations\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\Profile\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:getContactInformation\\(\\) should return string but returns Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\ContactInformation\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:getLocation\\(\\) should return string but returns Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Location\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+
+ -
+ message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot access offset 'command' on mixed\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot access offset 'name' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot access offset 'payload' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot access offset 'uuid' on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot cast mixed to string\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Command\\\\AbstractCommand\\:\\:\\$UUID \\(string\\) does not accept mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+
+ -
+ message: "#^Cannot access property \\$meta on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonAuthorizationResponse\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonAuthorizationResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$collection with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$paginator with generic class Pagerfanta\\\\Pagerfanta but does not specify its types\\: T$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonNotFoundResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonNotFoundResponse.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionHasInstitutionProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionService\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionService.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institutionSetComparisonProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionServiceInterface\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionServiceInterface.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationA with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getValue\\(\\) on Doctrine\\\\ORM\\\\Query\\\\Parameter\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Filter/InstitutionAuthorizationRepositoryFilterTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:institution_option_instances_can_be_compared\\(\\) has parameter \\$configurationB with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getInstitution\\(\\) on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Configuration\\\\Service\\\\InstitutionAuthorizationServiceTest\\:\\:buildAuthorizations\\(\\) has parameter \\$expectedInstitutions with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:invalid_types_are_rejected_during_construction\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionAuthorizationOptionTest\\:\\:the_has_institution_method_should_check_for_institutions\\(\\) has parameter \\$institutionList with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionConfigurationIdTest\\:\\:an_institution_configuration_id_cannot_be_created_from_something_other_than_a_string\\(\\) has parameter \\$nonStringOrEmptyString with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionConfigurationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:institutionTypeProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$other of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RecoveryTokenStatus\\:\\:equals\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RecoveryTokenStatus, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionRoleTest\\:\\:invalidConstructorArgumentsProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method equals\\(\\) on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionRoleTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:dirtyInstitutionListProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionSetTest\\:\\:factory_method_can_build_from_array_of_string_and_rejects_invalid_types\\(\\) has parameter \\$invalid with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionSetTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationIdTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\ConfiguredInstitutionControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\SraaControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Identity\\\\Projector\\\\AuditLogProjectorTest\\:\\:auditable_events\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:convertibleCommandNames\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:invalidCommandJsonStructures\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+
+ -
+ message: "#^Cannot call method equals\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+
+ -
+ message: "#^Property Symfony\\\\Component\\\\HttpFoundation\\\\Request\\:\\:\\$query \\(Symfony\\\\Component\\\\HttpFoundation\\\\InputBag\\\\) does not accept Mockery\\\\MockInterface&Symfony\\\\Component\\\\HttpFoundation\\\\ParameterBag\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$allowedSecondFactors type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selectRaaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaaOption type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+
+ -
+ message: "#^Cannot call method getInstitution\\(\\) on mixed\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Processor/InstitutionConfigurationProcessor.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\EventHandling\\\\BufferedEventBus\\:\\:\\$buffer \\(array\\\\) does not accept array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+
+ -
+ message: "#^Strict comparison using \\!\\=\\= between array\\{\\} and array\\{\\} will always evaluate to false\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\AddToWhitelistCommand\\:\\:\\$institutionsToBeAdded type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AddToWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\RemoveFromWhitelistCommand\\:\\:\\$institutionsToBeRemoved type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RemoveFromWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\ReplaceWhitelistCommand\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ReplaceWhitelistCommand.php
+
+ -
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\SaveVettingTypeHintCommand\\:\\:\\$hints type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
+
+ -
+ message: "#^Cannot call method getType\\(\\) on Surfnet\\\\Stepup\\\\Identity\\\\Entity\\\\VettedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandler\\:\\:mapArrayToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
+
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/EmailVerificationMailService.php
+
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 6
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RecoveryTokenMailService.php
+
+ -
+ message: "#^Cannot access property \\$commonName on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$email on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 6
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$institution on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$preferredLocale on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$registrationCode on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$registrationRequestedAt on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$showRaaContactInformationOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$useRaLocationsOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRaLocations\\(\\) has parameter \\$raLocations with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRas\\(\\) has parameter \\$ras with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Parameter \\#6 \\$raLocations of method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRaLocations\\(\\) expects array, array\\\\|null given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorRevocationMailService.php
+
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/SecondFactorVettedMailService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:__construct\\(\\) has parameter \\$locales with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:collectionFrom\\(\\) has parameter \\$hints with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\AuthorizingStage\\:\\:clientHasAtLeastOneRole\\(\\) has parameter \\$rolesToCheck with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:mapViolationsToErrorStrings\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+
+ -
+ message: "#^Cannot call method getIdentityId\\(\\) on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessage\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
+
+ -
+ message: "#^Cannot call method getSensitiveData\\(\\) on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessage\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventSourcing/SensitiveDataMessageStream.php
+
+ -
+ message: "#^Cannot call method getPayload\\(\\) on mixed\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventStore/SensitiveDataEventStoreDecorator.php
+
+ -
+ message: "#^Parameter \\#1 \\$identityId of class Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessage constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventStore/SensitiveDataEventStoreDecorator.php
+
+ -
+ message: "#^Parameter \\#1 \\$identityId of method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\Repository\\\\SensitiveDataMessageRepository\\:\\:findByIdentityId\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\IdentityId, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/EventStore/SensitiveDataEventStoreDecorator.php
+
+ -
+ message: "#^Cannot cast mixed to int\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
+
+ -
+ message: "#^Parameter \\#1 \\$json of static method Surfnet\\\\Stepup\\\\Helper\\\\JsonHelper\\:\\:decode\\(\\) expects string, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/Repository/SensitiveDataMessageRepository.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:getAllowlist\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationListTest\\:\\:getRaLocationsArray\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationListTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Configuration\\\\Value\\\\RaLocationNameTest\\:\\:nonStringOrEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Configuration/Value/RaLocationNameTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\JsonHelperTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$type of static method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenIdentifierFactory\\:\\:forType\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\RecoveryTokenType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Helper/JsonHelperTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Helper\\\\UserDataFilterTest\\:\\:test_filtering_is_applied_with_expected_result\\(\\) has parameter \\$expectation with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$type of static method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorIdentifierFactory\\:\\:forType\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Helper/UserDataFilterTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Collection\\\\InstitutionCollectionTest\\:\\:getInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$type of static method Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\SecondFactorIdentifierFactory\\:\\:unknownForType\\(\\) expects Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType, Surfnet\\\\StepupBundle\\\\Value\\\\SecondFactorType\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Collection/InstitutionCollectionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Entity\\\\ConfigurableSettingsTest\\:\\:localeVerifications\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$newConfiguration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Entity/ConfigurableSettingsTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$oldConfiguration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\EventSerializationAndDeserializationTest\\:\\:serializedDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Event/EventSerializationAndDeserializationTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Event\\\\WhitelistEventSerializationAndDeserializationTest\\:\\:eventProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createUpdateCommand\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Event/WhitelistEventSerializationAndDeserializationTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\CommonNameTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\IdentityCommandHandlerMoveTokenTest\\:\\:setUpInstitutionConfiguration\\(\\) has parameter \\$allowedTokenTypes with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/CommonNameTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\DocumentNumberTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$nameId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedEvent constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/DocumentNumberTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidArgumentProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+ message: "#^Parameter \\#2 \\$nameId of class Surfnet\\\\Stepup\\\\Identity\\\\Event\\\\SecondFactorVettedWithoutTokenProofOfPossession constructor expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId\\|null given\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\EmailTest\\:\\:invalidEmailProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot call method getPayload\\(\\) on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/EmailTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityIdEnforcingEventStoreDecorator.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\GssfIdTest\\:\\:a_gssf_id_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\GssfIdTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\InstitutionTest\\:\\:invalidValueProviderInvalidString\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/InstitutionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcher.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\PhoneNumberTest\\:\\:a_phone_number_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:has_institution_matcher_only_matches_objects_against_a_given_institution\\(\\) has parameter \\$nonObject with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\PhoneNumberTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonObjectProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\StepupProviderTest\\:\\:a_stepup_provider_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\StepupProviderTest\\:\\:invalidValueProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Pipeline\\\\AuthorizingStageTest\\:\\:interfaceToRoleMappingProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\TimeFrameTest\\:\\:invalidValueProviderInt\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access property \\$sensitiveData on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/TimeFrameTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:invalidFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$domainMessages with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
-
- message: "#^Method Surfnet\\\\Stepup\\\\Tests\\\\Identity\\\\Value\\\\YubikeyPublicIdTest\\:\\:validFormatProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$sensitiveDataMessages with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/Stepup/Tests/Identity/Value/YubikeyPublicIdTest.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:__construct\\(\\) has parameter \\$errorMessages with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:it_serialises_and_deserialises\\(\\) has parameter \\$getterExpectations with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:denied\\(\\) has parameter \\$messages with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:sensitiveDataToSerialise\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\AuthorizationDecision\\:\\:getErrorMessages\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/AuthorizationDecision.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:__construct\\(\\) has parameter \\$institutionRoles with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+ path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSet\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createIdentityProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSet.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Authorization\\\\Value\\\\InstitutionRoleSetInterface\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createServiceProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Authorization/Value/InstitutionRoleSetInterface.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\ConfiguredInstitution\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllIdps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\RaLocation\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllOfType\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/RaLocation.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
-
- message: "#^Parameter \\#1 \\$allowedSecondFactors of static method Surfnet\\\\Stepup\\\\Configuration\\\\Value\\\\AllowedSecondFactorList\\:\\:ofTypes\\(\\) expects array, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\AllowedSecondFactor given\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllSps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/AllowedSecondFactorMap.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Service\\\\InstitutionAuthorizationOptionMap\\:\\:fromInstitutionAuthorizations\\(\\) has parameter \\$institutionAuthorizations with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionAuthorizationOptionMap.php
+ message: "#^Parameter \\#1 \\$vettingType of method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Projector\\\\SecondFactorProjector\\:\\:isIdentityVetted\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType, Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\VettingType\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\DateTimeType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php
+ message: "#^Parameter \\#1 \\$institution of static method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\WhitelistEntry\\:\\:createFrom\\(\\) expects Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Doctrine\\\\Type\\\\SecondFactorStatusType\\:\\:getSQLDeclaration\\(\\) has parameter \\$column with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institutions of method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) expects array\\, array\\, mixed\\> given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SecondFactorStatusType.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\EventListener\\\\ExceptionListener\\:\\:createJsonErrorResponse\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) should return array\\ but returns mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/EventListener/ExceptionListener.php
+ path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Repository/WhitelistEntryRepository.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadApiRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Configuration\\\\Entity\\\\EmailTemplate\\:\\:getId\\(\\) should return string but returns string\\|null\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadApiRequestException.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Entity/EmailTemplate.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Exception\\\\BadCommandRequestException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Configuration\\\\Repository\\\\EmailTemplateRepository\\:\\:findOneByName\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Configuration\\\\Entity\\\\EmailTemplate\\|null but returns mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Exception/BadCommandRequestException.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Repository/EmailTemplateRepository.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\AuditLogEntry\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'allow_self_asserted…' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/Identity.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\IdentitySelfAssertedTokenOptions\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'allowed_second…' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/IdentitySelfAssertedTokenOptions.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\InstitutionListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'number_of_tokens…' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/InstitutionListing.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaCandidate\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'select_raa' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaCandidate.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaListing\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'self_vet' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaListing.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RaSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'show_raa_contact…' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RaSecondFactor.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\RecoveryToken\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'sso_on_2fa' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/RecoveryToken.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'use_ra' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'use_ra_locations' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VerifiedSecondFactor.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettedSecondFactor\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'use_raa' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VettingTypeHint\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'verify_email' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettingTypeHint.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:saveAll\\(\\) has parameter \\$entries with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$allowedSecondFactors \\(array\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedIdentityRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$institution \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedInstitutionRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$numberOfTokensPerIdentityOption \\(int\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selectRaaOption \\(array\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:findByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selfAssertedTokensOption \\(bool\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:listRasFor\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selfVetOption \\(bool\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\SraaRepository\\:\\:saveAll\\(\\) has parameter \\$sraaList with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$showRaaContactInformationOption \\(bool\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$ssoOn2faOption \\(bool\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:getAll\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaLocationsOption \\(bool\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/WhitelistEntryRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\AbstractSearchService\\:\\:createPaginatorFrom\\(\\) return type with generic class Pagerfanta\\\\Pagerfanta does not specify its types\\: T$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaOption \\(array\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaaOption \\(array\\|null\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$verifyEmailOption \\(bool\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) has parameter \\$raCandidate with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'institution' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaCandidateService\\:\\:setUseRaInstitutionsOnRaCandidate\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'name_id' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaCandidateService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RaSecondFactorService\\:\\:searchUnpaginated\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaSecondFactorService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Service\\\\RecoveryTokenService\\:\\:getFilterOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\ForgetIdentityCommand\\:\\:\\$institution \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RecoveryTokenService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Specification\\\\SpecificationInterface\\:\\:apply\\(\\) has parameter \\$entityRepository with generic class Doctrine\\\\ORM\\\\EntityRepository but does not specify its types\\: TEntityClass$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\ForgetIdentityCommand\\:\\:\\$nameId \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Specification/SpecificationInterface.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\AuthorizedInstitutionCollection\\:\\:getAuthorizations\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 'institutions' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\Profile\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Controller\\\\WhitelistController\\:\\:getInstitutionsFromBody\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/Profile.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Value\\\\RegistrationAuthorityCredentials\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonAuthorizationResponse\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonAuthorizationResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$collection with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ConfigurationValidationTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ReconfigureInstitutionRequestValidatorTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$reconfigureRequest with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonCollectionResponse\\:\\:fromPaginator\\(\\) has parameter \\$paginator with generic class Pagerfanta\\\\Pagerfanta but does not specify its types\\: T$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$optional with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonCollectionResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonNotFoundResponse\\:\\:__construct\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$required with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Response/JsonNotFoundResponse.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionService\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionService.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Service\\\\DeprovisionServiceInterface\\:\\:readUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateGatewayConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Service/DeprovisionServiceInterface.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Configuration\\\\Service\\\\InstitutionAuthorizationServiceTest\\:\\:buildAuthorizations\\(\\) has parameter \\$expectedInstitutions with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Configuration/Service/InstitutionAuthorizationServiceTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateSraaConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$configuration of method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateRoot\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$path of method Symfony\\\\Component\\\\Validator\\\\Violation\\\\ConstraintViolationBuilderInterface\\:\\:atPath\\(\\) expects string, string\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\RecoveryTokenStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$rawValue of method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:decodeJson\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/RecoveryTokenStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$identityProviders of method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\GatewayConfigurationValidator\\:\\:validateIdentityProviders\\(\\) expects array\\\\>, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:invalidPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$serviceProviders of method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\GatewayConfigurationValidator\\:\\:validateServiceProviders\\(\\) expects array\\\\>, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/GatewayConfigurationValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validDatabaseValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Doctrine\\\\Type\\\\SecondFactorStatusTypeTest\\:\\:validPhpValues\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/SecondFactorStatusTypeTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\ConfiguredInstitutionControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Endpoint\\\\SraaControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateAuthorizationSettings\\(\\) has parameter \\$authorizationSettings with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Identity\\\\Projector\\\\AuditLogProjectorTest\\:\\:auditable_events\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionConfigurationOptions\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:convertibleCommandNames\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionsExist\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:invalidCommandJsonStructures\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Property Symfony\\\\Component\\\\HttpFoundation\\\\Request\\:\\:\\$query \\(Symfony\\\\Component\\\\HttpFoundation\\\\InputBag\\\\) does not accept Mockery\\\\MockInterface&Symfony\\\\Component\\\\HttpFoundation\\\\ParameterBag\\.$#"
- count: 2
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+ message: "#^Parameter \\#1 \\$configuration of method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateRoot\\(\\) expects array, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$allowedSecondFactors type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$path of method Symfony\\\\Component\\\\Validator\\\\Violation\\\\ConstraintViolationBuilderInterface\\:\\:atPath\\(\\) expects string, string\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$selectRaaOption type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:assertValidInstitutionIdentifiers\\(\\) has parameter \\$spLoaConfiguration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaOption type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateAssertionConsumerUrls\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Command\\\\ReconfigureInstitutionConfigurationOptionsCommand\\:\\:\\$useRaaOption type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/ReconfigureInstitutionConfigurationOptionsCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Strict comparison using \\!\\=\\= between array\\{\\} and array\\{\\} will always evaluate to false\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateListOfNameIdPatterns\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/EventHandling/BufferedEventBus.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\AddToWhitelistCommand\\:\\:\\$institutionsToBeAdded type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/AddToWhitelistCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\RemoveFromWhitelistCommand\\:\\:\\$institutionsToBeRemoved type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RemoveFromWhitelistCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\ReplaceWhitelistCommand\\:\\:\\$institutions type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValues\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/ReplaceWhitelistCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\SaveVettingTypeHintCommand\\:\\:\\$hints type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:enrichEventMetadata\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/SaveVettingTypeHintCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandler\\:\\:mapArrayToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/WhitelistCommandHandler.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRaLocations\\(\\) has parameter \\$raLocations with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:requiresMailVerification\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\RegistrationMailService\\:\\:sendRegistrationEmailWithRas\\(\\) has parameter \\$ras with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$registrationStatus of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:validRegistrationStatus\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:__construct\\(\\) has parameter \\$locales with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$tokenType of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Service\\\\VettingTypeHintService\\:\\:collectionFrom\\(\\) has parameter \\$hints with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\AuthorizingStage\\:\\:clientHasAtLeastOneRole\\(\\) has parameter \\$rolesToCheck with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/AuthorizingStage.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+ message: "#^Parameter \\#2 \\$tokenType of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:verifyEmail\\(\\) expects string, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Pipeline\\\\Exception\\\\InvalidCommandException\\:\\:mapViolationsToErrorStrings\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Pipeline/Exception/InvalidCommandException.php
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 9
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:getAllowlist\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
+ message: "#^Parameter \\#3 \\$tokenType of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:proveGsspPossession\\(\\) expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\RightToObtainDataInterface\\:\\:obtainUserData\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/RightToObtainDataInterface.php
+ message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+ message: "#^Parameter \\#4 \\$tokenIdentifier of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:proveGsspPossession\\(\\) expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$secondFactorIdentifier of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/SensitiveData/SensitiveData.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$newConfiguration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:enrichEventMetadata\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) has parameter \\$oldConfiguration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createConfigurationUpdatedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Configuration\\\\CommandHandler\\\\ConfigurationCommandHandlerTest\\:\\:createUpdateCommand\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\IdentityCommandHandlerMoveTokenTest\\:\\:setUpInstitutionConfiguration\\(\\) has parameter \\$allowedTokenTypes with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#3 \\$commonName of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:createIdentity\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerMoveTokenTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$email of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:createIdentity\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Identity\\\\CommandHandler\\\\WhitelistCommandHandlerTest\\:\\:mapStringValuesToInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$preferredLocale of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:createIdentity\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/WhitelistCommandHandlerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:has_institution_matcher_only_matches_objects_against_a_given_institution\\(\\) has parameter \\$nonObject with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonObjectProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Mockery\\\\HasInstitutionMatcherTest\\:\\:nonStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$commonName \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Mockery/HasInstitutionMatcherTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Pipeline\\\\AuthorizingStageTest\\:\\:interfaceToRoleMappingProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$email \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Pipeline/AuthorizingStageTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$domainMessages with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$institution \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\EventSourcing\\\\SensitiveDataMessageStreamTest\\:\\:apply\\(\\) has parameter \\$sensitiveDataMessages with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$nameId \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/EventSourcing/SensitiveDataMessageStreamTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:it_serialises_and_deserialises\\(\\) has parameter \\$getterExpectations with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$preferredLocale \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\SensitiveData\\\\SensitiveDataTest\\:\\:sensitiveDataToSerialise\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\BootstrapIdentityWithYubikeySecondFactorCommand\\:\\:\\$yubikeyPublicId \\(string\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Value\\\\InstitutionTest\\:\\:an_institution_cannot_be_created_with_anything_but_a_nonempty_string\\(\\) has parameter \\$invalidValue with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:enrichEventMetadata\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Tests\\\\Value\\\\InstitutionTest\\:\\:nonStringOrNonEmptyStringProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createIdentityProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:requiresMailVerification\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntity\\:\\:createServiceProvider\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$registrationStatus of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:validRegistrationStatus\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllIdps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllOfType\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\GatewayBundle\\\\Entity\\\\SamlEntityRepository\\:\\:replaceAllSps\\(\\) has parameter \\$newSamlEntities with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Controller\\\\WhitelistController\\:\\:getInstitutionsFromBody\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
+ message: "#^Parameter \\#3 \\$phoneNumber of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:provePhonePossession\\(\\) expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$secondFactorIdentifier of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapSmsSecondFactorCommand.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:\\$password type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:enrichEventMetadata\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\ConfigurationControllerTest\\:\\:\\$passwordRo type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:invalidHttpMethodProvider\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:requiresMailVerification\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:\\$password type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$registrationStatus of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:validRegistrationStatus\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Controller\\\\InstitutionConfigurationControllerTest\\:\\:\\$passwordRo type has no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ConfigurationValidationTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$actorId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Tests\\\\Validator\\\\ReconfigureInstitutionRequestValidatorTest\\:\\:it_rejects_invalid_configuration\\(\\) has parameter \\$reconfigureRequest with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+ message: "#^Parameter \\#3 \\$yubikeyPublicId of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:proveYubikeyPossession\\(\\) expects string, mixed given\\.$#"
+ count: 3
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:keysMatch\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#5 \\$secondFactorIdentifier of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:vetSecondFactor\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapYubikeySecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$optional with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$value of static method Assert\\\\Assertion\\:\\:nullOrDate\\(\\) expects string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$required with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$datetime of static method DateTime\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\Assert\\:\\:requiredAndOptionalOptions\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Assert.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateGatewayConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Identity\\\\Command\\\\SendVerifiedSecondFactorRemindersCommand\\:\\:\\$dryRun \\(bool\\) does not accept mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+ message: "#^Cannot access property \\$id on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ConfigurationStructureValidator\\:\\:validateSraaConfiguration\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Console\\\\Command\\\\MigrateSecondFactorCommand\\:\\:tokenExists\\(\\) has parameter \\$targetSecondFactors with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ConfigurationStructureValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+ message: "#^Parameter \\#1 \\$identity of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:getVettedSecondFactorsFromIdentity\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$institution of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\Institution constructor expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\IdentityProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$sourceIdentity of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:migrateVettedSecondFactor\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/IdentityProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateAuthorizationSettings\\(\\) has parameter \\$authorizationSettings with no value type specified in iterable type array\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+ message: "#^Parameter \\#1 \\$value of class Surfnet\\\\Stepup\\\\Identity\\\\Value\\\\NameId constructor expects string, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionConfigurationOptions\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$sourceIdentity of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Console\\\\Command\\\\MigrateSecondFactorCommand\\:\\:createIdentity\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateInstitutionsExist\\(\\) has parameter \\$institutions with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\$targetIdentity of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:migrateVettedSecondFactor\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ReconfigureInstitutionRequestValidator\\:\\:validateRoot\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#4 \\$email of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\BootstrapCommandService\\:\\:createIdentity\\(\\) expects string, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:assertValidInstitutionIdentifiers\\(\\) has parameter \\$spLoaConfiguration with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot cast mixed to int\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateAssertionConsumerUrls\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateBooleanValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$projector of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\TransactionAwareEventDispatcher\\:\\:registerProjector\\(\\) expects Broadway\\\\EventHandling\\\\EventListener, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateListOfNameIdPatterns\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$projectorNames of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\ProjectorCollection\\:\\:selectByNames\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateLoaDefinition\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$subset of method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\EventCollection\\:\\:select\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplaySpecificEventsCommand.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValue\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Cannot cast mixed to int\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ManagementBundle\\\\Validator\\\\ServiceProviderConfigurationValidator\\:\\:validateStringValues\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\DBALEventHydrator\\:\\:deserializeEvent\\(\\) has parameter \\$row with no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Console\\\\Command\\\\MigrateSecondFactorCommand\\:\\:tokenExists\\(\\) has parameter \\$targetSecondFactors with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$data of static method Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\SensitiveData\\\\SensitiveData\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\EventSourcing\\\\DBALEventHydrator\\:\\:deserializeEvent\\(\\) has parameter \\$row with no value type specified in iterable type array\\.$#"
+ message: "#^Parameter \\#1 \\$serializedObject of method Broadway\\\\Serializer\\\\SimpleInterfaceSerializer\\:\\:deserialize\\(\\) expects array, mixed given\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+
+ -
+ message: "#^Parameter \\#3 \\$metadata of class Broadway\\\\Domain\\\\DomainMessage constructor expects Broadway\\\\Domain\\\\Metadata, mixed given\\.$#"
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
@@ -2010,16 +4395,61 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Migrations/InstitutionConfiguration/MappedInstitutionConfiguration.php
+ -
+ message: "#^Cannot access property \\$id on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
+
+ -
+ message: "#^Cannot access property \\$institution on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
+
+ -
+ message: "#^Cannot access property \\$registrationCode on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
+
+ -
+ message: "#^Cannot access property \\$verificationNonce on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/BootstrapCommandService.php
+
-
message: "#^Parameter \\#2 \\$criteria of method Doctrine\\\\DBAL\\\\Connection\\:\\:delete\\(\\) expects array\\, array\\ given\\.$#"
count: 2
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+ -
+ message: "#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
+
+ -
+ message: "#^Parameter \\#1 \\$domainMessage of method Broadway\\\\EventHandling\\\\EventListener\\:\\:handle\\(\\) expects Broadway\\\\Domain\\\\DomainMessage, mixed given\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
+
-
message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Service\\\\SecondFactorDisplayNameResolverService\\:\\:__construct\\(\\) has parameter \\$secondFactors with no value type specified in iterable type array\\.$#"
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/SecondFactorDisplayNameResolverService.php
+ -
+ message: "#^Cannot access property \\$htmlContent on Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Configuration\\\\Dto\\\\EmailTemplate\\|null\\.$#"
+ count: 2
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
+
+ -
+ message: "#^Cannot access property \\$showRaaContactInformationOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
+
+ -
+ message: "#^Cannot access property \\$useRaLocationsOption on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Configuration\\\\Entity\\\\InstitutionConfigurationOptions\\|null\\.$#"
+ count: 1
+ path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/VerifiedSecondFactorReminderMailService.php
+
-
message: "#^Method Surfnet\\\\StepupMiddleware\\\\MiddlewareBundle\\\\Tests\\\\EventSourcing\\\\EventCollectionTest\\:\\:an_event_collection_must_be_created_from_an_array_of_non_empty_strings\\(\\) has parameter \\$emptyOrNonString with no value type specified in iterable type array\\.$#"
count: 1
diff --git a/docs/postman/2.http b/docs/postman/2.http
index 72f042408..e5fb2fcd6 100644
--- a/docs/postman/2.http
+++ b/docs/postman/2.http
@@ -126,6 +126,7 @@ Content-Type: application/json
POST http://middleware.dev.openconext.local/management/whitelist/add
Accept: application/json
Content-Type: application/json
+Authorization: Basic ra ra_secret
{
"institutions": [
@@ -193,15 +194,16 @@ Content-Type: application/json
###
# @name /management/institution-configuration
# GET the institution configuration options
-GET http://middleware.stepup.example.com/management/institution-configuration?
+GET http://middleware.dev.openconext.local/management/institution-configuration?
XDEBUG_SESSION_START=PHPSTORM
Accept: application/json
Content-Type: application/json
+Authorization: Basic ra ra_secret
###
# @name /management/institution-configuration
# POST the institution configuration options to reconfigure
-POST http://middleware.stepup.example.com/management/institution-configuration?
+POST http://middleware.dev.openconext.local/management/institution-configuration?
XDEBUG_SESSION_START=PHPSTORM
Accept: application/json
Content-Type: application/json
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
index 1b513f315..0b3351fe5 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionAuthorizationOptionTest.php
@@ -111,18 +111,6 @@ public function can_be_retrieved_json_serializable_on_empty_set(): void
$this->assertEquals(null, $institutionOption->jsonSerialize());
}
- /**
- * @test
- * @group domain
- * @dataProvider invalidConstructorArgumentsProvider
- */
- public function invalid_types_are_rejected_during_construction(bool|int|array $arguments): void
- {
- $this->expectException(InvalidArgumentException::class);
-
- InstitutionAuthorizationOption::fromInstitutionConfig($this->institutionRole, $arguments);
- }
-
/**
* @test
* @group domain
diff --git a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
index c8220e100..181b6d41e 100644
--- a/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Configuration/Value/InstitutionConfigurationIdTest.php
@@ -48,7 +48,7 @@ public function two_institution_configuration_ids_created_for_the_different_inst
* @dataProvider nonStringOrEmptyStringProvider
*/
public function an_institution_configuration_id_cannot_be_created_from_something_other_than_a_string(
- string|int|float|StdClass|array $nonStringOrEmptyString,
+ string $nonStringOrEmptyString,
): void {
$this->expectException(InvalidArgumentException::class);
@@ -125,10 +125,6 @@ public function nonStringOrEmptyStringProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
];
}
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
index 5e50dff84..9c8fc1eab 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/GssfIdTest.php
@@ -34,7 +34,7 @@ class GssfIdTest extends UnitTest
* @dataProvider invalidValueProvider
*/
public function a_gssf_id_cannot_be_created_with_anything_but_a_nonempty_string(
- string|int|float|StdClass|array $invalidValue,
+ string $invalidValue,
): void {
$this->expectException(InvalidArgumentException::class);
@@ -65,10 +65,6 @@ public function invalidValueProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
];
}
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
index d5aca4494..9b969f12e 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/PhoneNumberTest.php
@@ -34,7 +34,7 @@ class PhoneNumberTest extends UnitTest
* @dataProvider invalidValueProvider
*/
public function a_phone_number_cannot_be_created_with_anything_but_a_nonempty_string(
- string|int|float|StdClass|array $invalidValue,
+ string $invalidValue,
): void {
$this->expectException(InvalidArgumentException::class);
@@ -65,10 +65,6 @@ public function invalidValueProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
];
}
}
diff --git a/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php b/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
index fa53c77ac..f89f665fe 100644
--- a/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
+++ b/src/Surfnet/Stepup/Tests/Identity/Value/StepupProviderTest.php
@@ -34,7 +34,7 @@ class StepupProviderTest extends UnitTest
* @dataProvider invalidValueProvider
*/
public function a_stepup_provider_cannot_be_created_with_anything_but_a_nonempty_string(
- string|int|float|StdClass|array $invalidValue,
+ string $invalidValue,
): void {
$this->expectException(InvalidArgumentException::class);
@@ -63,10 +63,6 @@ public function invalidValueProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
];
}
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
index 5f6187205..d1abfdabb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Entity/ConfiguredInstitution.php
@@ -25,10 +25,6 @@
#[ORM\Entity(repositoryClass: ConfiguredInstitutionRepository::class)]
class ConfiguredInstitution
{
- /**
- *
- * @var Institution
- */
#[ORM\Id]
#[ORM\Column(type: 'stepup_configuration_institution')]
public Institution $institution;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
index 38dee1844..12892943a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
@@ -27,6 +27,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Sraa;
+use function assert;
class RegistrationAuthorityCredentials implements JsonSerializable
{
@@ -62,6 +63,7 @@ public static function fromSraa(Sraa $sraa, Identity $identity): self
public static function fromRaListings(array $raListings): self
{
$raListingCredentials = current($raListings);
+ assert($raListingCredentials instanceof RaListing, 'The provided raListings are empty');
$isRa = false;
$isRaa = false;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php b/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
index 74690dc45..0047bb9f0 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
@@ -21,6 +21,7 @@
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Surfnet\StepupMiddleware\ApiBundle\Exception\BadCommandRequestException;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\Command;
use Symfony\Component\HttpFoundation\Request;
@@ -40,6 +41,7 @@ public function apply(Request $request, ParamConverter $configuration): bool
str_replace('.', '\\', $commandName[2]),
);
+ /** @var AbstractCommand $command */
$command = new $commandClassName;
$command->UUID = $data['command']['uuid'];
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
index 1c798a628..0e0aaec99 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/AuthorizationContextServiceTest.php
@@ -22,6 +22,7 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
+use Surfnet\Stepup\Configuration\Value\Institution as StepupConfigurationInstitution;
use Surfnet\Stepup\Identity\Collection\InstitutionCollection;
use Surfnet\Stepup\Identity\Value\CommonName;
use Surfnet\Stepup\Identity\Value\Email;
@@ -52,7 +53,7 @@ class AuthorizationContextServiceTest extends TestCase
private AuthorizationRepository&MockInterface $authorizationRepository;
- private MockInterface|ConfiguredInstitutionRepository $institutionRepo;
+ private MockInterface&ConfiguredInstitutionRepository $institutionRepo;
public function setUp(): void
{
@@ -174,7 +175,7 @@ public function it_can_build_a_context_with_sraa_actor(): void
$configuredInstitutions = [];
foreach ($institutions as $institution) {
$ci = new ConfiguredInstitution();
- $ci->institution = $institution->getInstitution();
+ $ci->institution = new StepupConfigurationInstitution($institution->getInstitution());
$configuredInstitutions[] = $ci;
}
$this->institutionRepo->shouldReceive('findAll')->andReturn($configuredInstitutions);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
index 96482961e..276a28616 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Authorization/Service/CommandAuthorizationServiceTest.php
@@ -78,6 +78,8 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\VerifyEmailCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\VetSecondFactorCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\Command\FixedUuidStubCommand;
+use function is_array;
+use function is_string;
use function property_exists;
class CommandAuthorizationServiceTest extends TestCase
@@ -483,18 +485,24 @@ public function all_available_commands_should_be_tested(): void
public function availableCommands(): array
{
$rootPath = realpath(__DIR__ . '/../../../../../../../src');
+ assert(is_string($rootPath), 'Root path could not be determined correctly');
$basePath = realPath($rootPath . '/Surfnet/StepupMiddleware/CommandHandlingBundle') . '/*';
$commands = [];
// get folders
$folders = glob($basePath, GLOB_ONLYDIR);
+ assert(is_array($folders), 'Unable to grab the CommandHandlingBundle folders');
foreach ($folders as $folder) {
$commandPath = $folder . '/Command/*Command.php';
$files = glob($commandPath);
if ($files === false) {
continue;
}
+ assert(
+ is_array($files),
+ sprintf('Unable to grab the files from %s with pattern %s', $folder , $commandPath)
+ );
foreach ($files as $file) {
$className = str_replace($rootPath, '', $file);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
index d0dd1ddaf..4bb52952b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Doctrine/Type/DateTimeTypeTest.php
@@ -27,6 +27,7 @@
use PHPUnit\Framework\TestCase as UnitTest;
use Surfnet\Stepup\DateTime\DateTime;
use Surfnet\StepupMiddleware\ApiBundle\Doctrine\Type\DateTimeType;
+use function assert;
class DateTimeTypeTest extends UnitTest
{
@@ -99,9 +100,9 @@ public function a_string_is_converted_to_the_stepup_datetime_object(): void
$databaseValue = '2015-02-17 10:48:22';
$actualDateTime = $dateTime->convertToPHPValue($databaseValue, $this->platform);
- $expectedDateTime = new DateTime(
- CoreDateTime::createFromFormat('Y-m-d H:i:s', $databaseValue, new DateTimeZone('UTC')),
- );
+ $coreDateTime = CoreDateTime::createFromFormat('Y-m-d H:i:s', $databaseValue, new DateTimeZone('UTC'));
+ assert($coreDateTime instanceof CoreDateTime, 'Unable to create a DateTime object');
+ $expectedDateTime = new DateTime($coreDateTime);
$this->assertInstanceOf(DateTime::class, $actualDateTime);
$this->assertEquals($expectedDateTime, $actualDateTime);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
index b587bffb2..ca9b22330 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
@@ -26,6 +26,7 @@
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
+use function is_string;
class ConfiguredInstitutionControllerTest extends WebTestCase
{
@@ -51,8 +52,15 @@ public function setUp(): void
self::ensureKernelShutdown();
$this->client = static::createClient();
- $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
- $this->databaseTool->setRegistry(static::getContainer()->get(ManagerRegistry::class));
+ $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
+ }
+ $this->databaseTool = $tool;
+ $registry = static::getContainer()->get(ManagerRegistry::class);
+ assert($registry instanceof ManagerRegistry, 'ManagerRegistry could not be fetched from the container');
+ $this->databaseTool->setRegistry($registry);
+
$this->databaseTool->setObjectManagerName('middleware');
// Initialises schema.
$this->databaseTool->loadFixtures();
@@ -62,6 +70,10 @@ public function setUp(): void
$passwordRa = $this->client->getKernel()->getContainer()->getParameter('registration_authority_api_password');
$passwordRo = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+ assert(is_string($passwordSs), 'Parameter selfservice_api_password must be of type string');
+ assert(is_string($passwordRa), 'Parameter registration_authority_api_password must be of type string');
+ assert(is_string($passwordRo), 'Parameter readonly_api_password must be of type string');
+
$this->accounts = ['ss' => $passwordSs, 'ra' => $passwordRa, 'apireader' => $passwordRo];
$this->endpoint = '/institution-listing';
@@ -89,7 +101,7 @@ public function only_get_requests_are_accepted(string $invalidHttpMethod): void
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_METHOD_NOT_ALLOWED, $this->client->getResponse()->getStatusCode());
@@ -113,7 +125,7 @@ public function no_access_for_not_allowed_account(string $account): void
'PHP_AUTH_USER' => $account,
'PHP_AUTH_PW' => $this->accounts[$account],
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_FORBIDDEN, $this->client->getResponse()->getStatusCode());
@@ -136,7 +148,7 @@ public function json_is_returned_from_the_api(): void
'PHP_AUTH_USER' => 'ra',
'PHP_AUTH_PW' => $this->accounts['ra'],
],
- json_encode([]),
+ '[]',
);
$this->assertTrue(
@@ -165,11 +177,13 @@ public function correct_institutions_are_returned(string $account): void
'PHP_AUTH_USER' => $account,
'PHP_AUTH_PW' => $this->accounts[$account],
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());
- $response = json_decode($this->client->getResponse()->getContent());
+ $content = $this->client->getResponse()->getContent();
+ assert(is_string($content), 'Unable to get the Response Content from the browser client');
+ $response = json_decode($content);
$this->assertEquals([], $response);
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
index 56d4d90be..45e2ad78b 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
@@ -27,6 +27,7 @@
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
+use function is_string;
class SraaControllerTest extends WebTestCase
{
@@ -45,7 +46,11 @@ class SraaControllerTest extends WebTestCase
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
+ }
+ $this->databaseTool = $tool;
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
@@ -55,6 +60,10 @@ public function setUp(): void
$passwordRa = $this->client->getKernel()->getContainer()->getParameter('registration_authority_api_password');
$passwordRo = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+ assert(is_string($passwordSs));
+ assert(is_string($passwordRa));
+ assert(is_string($passwordRo));
+
$this->accounts = ['ss' => $passwordSs, 'ra' => $passwordRa, 'apireader' => $passwordRo];
$this->endpoint = '/sraa';
@@ -82,7 +91,7 @@ public function only_get_requests_are_accepted(string $invalidHttpMethod): void
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_METHOD_NOT_ALLOWED, $this->client->getResponse()->getStatusCode());
@@ -106,7 +115,7 @@ public function no_access_for_not_allowed_account(string $account): void
'PHP_AUTH_USER' => $account,
'PHP_AUTH_PW' => $this->accounts[$account],
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_FORBIDDEN, $this->client->getResponse()->getStatusCode());
@@ -129,7 +138,7 @@ public function json_is_returned_from_the_api(): void
'PHP_AUTH_USER' => 'ra',
'PHP_AUTH_PW' => $this->accounts['ra'],
],
- json_encode([]),
+ '[]',
);
$this->assertTrue(
@@ -158,11 +167,13 @@ public function correct_institutions_are_returned(string $account): void
'PHP_AUTH_USER' => $account,
'PHP_AUTH_PW' => $this->accounts[$account],
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());
- $response = json_decode($this->client->getResponse()->getContent());
+ $content = $this->client->getResponse()->getContent();
+ assert(is_string($content), 'Response content must be of type string');
+ $response = json_decode($content);
$this->assertEquals([], $response);
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
index bfff29f15..b123e20e3 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
@@ -24,10 +24,12 @@
class UpdateConfigurationCommand extends AbstractCommand implements ManagementExecutable
{
- /**
- * @var string configuration as json as received in the request
- *
- * @ManagementAssert\HasValidConfigurationStructure
- */
- public string $configuration;
+
+ public function __construct(
+ /**
+ * @ManagementAssert\HasValidConfigurationStructure
+ */
+ public string $configuration
+ ) {
+ }
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
index 5704c91ce..4b84fdede 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/CommandHandler/ConfigurationCommandHandler.php
@@ -34,7 +34,7 @@ public function __construct(
public function handleUpdateConfigurationCommand(UpdateConfigurationCommand $command): void
{
$configuration = $this->getConfiguration();
- if (!$configuration instanceof \Surfnet\Stepup\Configuration\Configuration) {
+ if (!$configuration instanceof Configuration) {
$configuration = Configuration::create();
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Processor/InstitutionConfigurationProcessor.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Processor/InstitutionConfigurationProcessor.php
index bbdeac85a..99d372a7d 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Processor/InstitutionConfigurationProcessor.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Processor/InstitutionConfigurationProcessor.php
@@ -27,6 +27,7 @@
use Surfnet\Stepup\Identity\Event\WhitelistReplacedEvent;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Repository\ConfiguredInstitutionRepository;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\CreateInstitutionConfigurationCommand;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\Pipeline;
use Symfony\Component\DependencyInjection\ContainerInterface;
final class InstitutionConfigurationProcessor extends Processor
@@ -37,7 +38,7 @@ final class InstitutionConfigurationProcessor extends Processor
*/
public function __construct(
private readonly ConfiguredInstitutionRepository $configuredInstitutionRepository,
- private readonly ContainerInterface $container,
+ private readonly Pipeline $pipeline,
) {
}
@@ -97,6 +98,6 @@ private function createConfigurationFor(Institution $institution): void
$command->UUID = (string)Uuid::uuid4();
$command->institution = $institution->getInstitution();
- $this->container->get('pipeline')->process($command);
+ $this->pipeline->process($command);
}
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Resources/config/processors.yml b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Resources/config/processors.yml
index 0b3bde601..ef93f73d4 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Resources/config/processors.yml
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Resources/config/processors.yml
@@ -100,5 +100,5 @@ services:
class: Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Processor\InstitutionConfigurationProcessor
arguments:
- "@surfnet_stepup_middleware_api.repository.configured_institution"
- - "@service_container"
+ - "@pipeline"
tags: [ { name: event_bus.event_listener, disable_for_replay: true } ]
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
index f09810fae..7e83cc716 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
@@ -23,6 +23,7 @@
use Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory;
use Broadway\EventStore\EventStore as EventStoreInterface;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+use RuntimeException;
use Surfnet\Stepup\Configuration\Configuration;
use Surfnet\Stepup\Configuration\Event\ConfigurationUpdatedEvent;
use Surfnet\Stepup\Configuration\Event\EmailTemplatesUpdatedEvent;
@@ -34,6 +35,7 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\UpdateConfigurationCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\CommandHandler\ConfigurationCommandHandler;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Tests\CommandHandlerTest;
+use function is_string;
final class ConfigurationCommandHandlerTest extends CommandHandlerTest
{
@@ -147,15 +149,13 @@ protected function createCommandHandler(
);
}
- /**
- * @return UpdateConfigurationCommand
- */
private function createUpdateCommand(array $configuration): UpdateConfigurationCommand
{
- $command = new UpdateConfigurationCommand();
- $command->configuration = json_encode($configuration);
-
- return $command;
+ $encodedConfiguration = json_encode($configuration);
+ if (!is_string($encodedConfiguration)) {
+ throw new RuntimeException('The configuration could not be json_encoded');
+ }
+ return new UpdateConfigurationCommand($encodedConfiguration);
}
/**
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
index 01e34a921..f73c5211f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/Processor/InstitutionConfigurationProcessorTest.php
@@ -79,7 +79,7 @@ public function a_create_institution_configuration_command_is_processed_when_an_
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleIdentityCreatedEvent($identityCreatedEvent);
@@ -112,7 +112,7 @@ public function no_create_institution_configuration_command_is_processed_when_an
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleIdentityCreatedEvent($identityCreatedEvent);
@@ -153,7 +153,7 @@ public function create_institution_configuration_commands_are_processed_when_a_w
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleWhitelistCreatedEvent($whitelistCreatedEvent);
@@ -198,7 +198,7 @@ public function no_create_institution_configuration_command_is_processed_for_an_
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleWhitelistCreatedEvent($whitelistCreatedEvent);
@@ -241,7 +241,7 @@ public function create_institution_configuration_commands_are_created_when_a_whi
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleWhitelistReplacedEvent($whitelistReplacedEvent);
@@ -286,7 +286,7 @@ public function no_create_institution_configuration_command_is_processed_for_an_
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleWhitelistReplacedEvent($whitelistCreatedEvent);
@@ -329,7 +329,7 @@ public function create_institution_configuration_commands_are_created_when_non_c
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleInstitutionsAddedToWhitelistEvent($institutionsAddedToWhitelistEvent);
@@ -374,24 +374,10 @@ public function no_create_institution_configuration_command_is_created_for_an_al
$institutionConfigurationProcessor = new InstitutionConfigurationProcessor(
$repositoryMock,
- $this->getContainerMock(),
+ $this->pipelineMock,
);
$institutionConfigurationProcessor->handleInstitutionsAddedToWhitelistEvent($whitelistCreatedEvent);
$this->assertInstanceOf(InstitutionConfigurationProcessor::class, $institutionConfigurationProcessor);
}
-
- /**
- * @return ContainerInterface
- */
- private function getContainerMock(): ContainerInterface
- {
- $containerMock = Mockery::mock(ContainerInterface::class);
- $containerMock
- ->shouldReceive('get')
- ->with('pipeline')
- ->andReturn($this->pipelineMock);
-
- return $containerMock;
- }
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
index b218ad001..37099b9c0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerSelfAssertedTokensTest.php
@@ -105,34 +105,17 @@ class IdentityCommandHandlerSelfAssertedTokensTest extends CommandHandlerTest
private LoaResolutionService&MockInterface $loaResolutionService;
- /**
- * @var IdentityId
- */
private IdentityId $id;
- /**
- * @var Institution
- */
private Institution $institution;
- /**
- * @var Email
- */
private Email $email;
- /**
- * @var CommonName
- */
private CommonName $commonName;
- /**
- * @var Locale
- */
private Locale $preferredLocale;
- /**
- * @var RecoveryTokenSecretHelper|MockInterface
- */
- private RecoveryTokenSecretHelper|MockInterface $recoveryTokenSecretHelper;
+
+ private RecoveryTokenSecretHelper&MockInterface $recoveryTokenSecretHelper;
private ?NameId $nameId = null;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
index 5f0fb6de4..ff7cf5bc5 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
@@ -107,11 +107,11 @@ class IdentityCommandHandlerTest extends CommandHandlerTest
private SecondFactorProvePossessionHelper&MockInterface $secondFactorProvePossessionHelper;
- private InstitutionConfigurationOptionsService|MockInterface $configService;
+ private InstitutionConfigurationOptionsService&MockInterface $configService;
private LoaResolutionService&MockInterface $loaResolutionService;
- private RegistrationMailService|MockInterface $registrationMailService;
+ private RegistrationMailService&MockInterface $registrationMailService;
public function setUp(): void
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
index 17449496a..c990989d0 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RegistrationAuthorityCommandHandlerTest.php
@@ -63,9 +63,9 @@
class RegistrationAuthorityCommandHandlerTest extends CommandHandlerTest
{
- private MockInterface|InstitutionConfigurationRepository $institutionConfigurationRepositoryMock;
+ private MockInterface&InstitutionConfigurationRepository $institutionConfigurationRepositoryMock;
- private MockInterface|InstitutionConfiguration $institutionConfiguration;
+ private MockInterface&InstitutionConfiguration $institutionConfiguration;
/**
* Create a command handler for the given scenario test case.
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
index 9e8c5d1b4..8fe429397 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/SensitiveData/SensitiveDataTest.php
@@ -29,6 +29,7 @@
use Surfnet\Stepup\Identity\Value\YubikeyPublicId;
use Surfnet\StepupBundle\Value\SecondFactorType;
use Surfnet\StepupMiddleware\CommandHandlingBundle\SensitiveData\SensitiveData;
+use function is_string;
class SensitiveDataTest extends TestCase
{
@@ -111,7 +112,11 @@ public function it_serialises_and_deserialises(
SensitiveData $sensitiveData,
array $getterExpectations,
): void {
- $sensitiveData = SensitiveData::deserialize(json_decode(json_encode($sensitiveData->serialize()), true));
+ $serializedData = json_encode($sensitiveData->serialize());
+ if (!is_string($serializedData)) {
+ $this->fail('Unable to json_encode the serialized sensitive data');
+ }
+ $sensitiveData = SensitiveData::deserialize(json_decode($serializedData, true));
foreach ($getterExpectations as $data => $expectedValue) {
$this->assertEquals(
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
index 9d5f0966b..9a0595132 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Value/InstitutionTest.php
@@ -20,7 +20,6 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase as UnitTest;
-use StdClass;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\InvalidArgumentException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Value\Institution;
@@ -33,7 +32,7 @@ class InstitutionTest extends UnitTest
* @dataProvider nonStringOrNonEmptyStringProvider
*/
public function an_institution_cannot_be_created_with_anything_but_a_nonempty_string(
- string|int|float|StdClass|array $invalidValue,
+ string $invalidValue,
): void {
$this->expectException(InvalidArgumentException::class);
@@ -60,10 +59,6 @@ public function nonStringOrNonEmptyStringProvider(): array
return [
'empty string' => [''],
'blank string' => [' '],
- 'array' => [[]],
- 'integer' => [1],
- 'float' => [1.2],
- 'object' => [new StdClass()],
];
}
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
index a8246af82..e31509a93 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntity.php
@@ -20,6 +20,8 @@
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
+use Surfnet\StepupMiddleware\GatewayBundle\Exception\RuntimeException;
+use function is_string;
#[ORM\Table]
#[ORM\UniqueConstraint(name: 'unq_saml_entity_entity_id_type', columns: ['entity_id', 'type'])]
@@ -50,19 +52,21 @@ private function __construct(
$this->id = (string)Uuid::uuid4();
}
- /**
- * @return SamlEntity
- */
public static function createServiceProvider(string $entityId, array $configuration): self
{
- return new self($entityId, self::TYPE_SP, json_encode($configuration));
+ $encodedConfiguration = json_encode($configuration);
+ if (!is_string($encodedConfiguration)) {
+ throw new RuntimeException('Unable to json_encode the configuration array in SamlEntity::createServiceProvider');
+ }
+ return new self($entityId, self::TYPE_SP, $encodedConfiguration);
}
- /**
- * @return SamlEntity
- */
public static function createIdentityProvider(string $entityId, array $configuration): self
{
- return new self($entityId, self::TYPE_IDP, json_encode($configuration));
+ $encodedConfiguration = json_encode($configuration);
+ if (!is_string($encodedConfiguration)) {
+ throw new RuntimeException('Unable to json_encode the configuration array in SamlEntity::createServiceProvider');
+ }
+ return new self($entityId, self::TYPE_IDP, $encodedConfiguration);
}
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index 02154fb27..5b23a4abb 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -36,9 +36,8 @@ public function __construct(
public function update(Request $request): JsonResponse
{
- $command = new UpdateConfigurationCommand();
+ $command = new UpdateConfigurationCommand($request->getContent());
$command->UUID = (string)Uuid::uuid4();
- $command->configuration = $request->getContent();
return $this->handleCommand($request, $command);
}
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
index 3af35eae3..27e344c65 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
@@ -31,28 +31,37 @@ class ConfigurationControllerTest extends WebTestCase
private KernelBrowser $client;
- /**
- * @var string
- */
- private string|array|bool|int|null|float|\UnitEnum $password;
+ private string $password;
- /**
- * @var string
- */
- private string|array|bool|int|null|float|\UnitEnum $passwordRo;
+ private string $passwordRo;
private ORMSqliteDatabaseTool $databaseTool;
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
+ }
+ $this->databaseTool = $tool;
// Initialises schema.
$this->databaseTool->loadFixtures([]);
// Initialises schema.
$this->client = static::createClient();
- $this->password = $this->client->getKernel()->getContainer()->getParameter('management_password');
- $this->passwordRo = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+
+ $managementPassword = $this->client->getKernel()->getContainer()->getParameter('management_password');
+ if (!is_string($managementPassword)) {
+ $this->fail('Unable to grab the management_password parameter from the container');
+ }
+ $this->password = $managementPassword;
+
+ $readOnlyPassword = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+ if (!is_string($readOnlyPassword)) {
+ $this->fail('Unable to grab the readonly_api_password parameter from the container');
+ }
+ $this->passwordRo = $readOnlyPassword;
+
}
public function tearDown(): void
@@ -77,13 +86,13 @@ public function requests_with_invalid_content_are_bad_requests(): void
'PHP_AUTH_USER' => 'management',
'PHP_AUTH_PW' => $this->password,
],
- json_encode([]),
+ '[]',
);
$this->assertSame(
Response::HTTP_BAD_REQUEST,
$this->client->getResponse()->getStatusCode(),
- $this->client->getResponse()->getContent(),
+ (string) $this->client->getResponse()->getContent(),
);
}
@@ -102,7 +111,7 @@ public function authorization_is_required(): void
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_UNAUTHORIZED, $this->client->getResponse()->getStatusCode());
@@ -125,7 +134,7 @@ public function readonly_user_cannot_modify_configuration(): void
'PHP_AUTH_USER' => 'apireader',
'PHP_AUTH_PW' => $this->passwordRo,
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_FORBIDDEN, $this->client->getResponse()->getStatusCode());
@@ -148,7 +157,7 @@ public function only_post_requests_are_accepted(string $invalidHttpMethod): void
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_METHOD_NOT_ALLOWED, $this->client->getResponse()->getStatusCode());
@@ -171,7 +180,7 @@ public function json_is_returned_from_the_configuration_api(): void
'PHP_AUTH_USER' => 'management',
'PHP_AUTH_PW' => $this->password,
],
- json_encode([]),
+ '[]',
);
$this->assertTrue(
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
index 4cbf1df5b..f1c0e831b 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
@@ -24,6 +24,7 @@
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
+use function is_string;
class InstitutionConfigurationControllerTest extends WebTestCase
{
@@ -31,28 +32,36 @@ class InstitutionConfigurationControllerTest extends WebTestCase
private KernelBrowser $client;
- /**
- * @var string
- */
- private string|array|bool|int|null|float|\UnitEnum $password;
+ private string $password;
- /**
- * @var string
- */
- private string|array|bool|int|null|float|\UnitEnum $passwordRo;
+ private string $passwordRo;
private ORMSqliteDatabaseTool $databaseTool;
public function setUp(): void
{
- $this->databaseTool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
+ if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
+ }
+ $this->databaseTool = $tool;
// Initialises schema.
- $this->databaseTool->loadFixtures([]);
+ $this->databaseTool->loadFixtures();
// Initialises schema.
$this->client = static::createClient();
- $this->password = $this->client->getKernel()->getContainer()->getParameter('management_password');
- $this->passwordRo = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+
+ $managementPassword = $this->client->getKernel()->getContainer()->getParameter('management_password');
+ if (!is_string($managementPassword)) {
+ $this->fail('Unable to grab the management_password parameter from the container');
+ }
+ $this->password = $managementPassword;
+
+ $readOnlyPassword = $this->client->getKernel()->getContainer()->getParameter('readonly_api_password');
+ if (!is_string($readOnlyPassword)) {
+ $this->fail('Unable to grab the readonly_api_password parameter from the container');
+ }
+ $this->passwordRo = $readOnlyPassword;
}
public function tearDown(): void
@@ -75,7 +84,7 @@ public function authorization_is_required_for_reconfiguring_institution_configur
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_UNAUTHORIZED, $this->client->getResponse()->getStatusCode());
@@ -98,7 +107,7 @@ public function readonly_user_cannot_reconfigure_institution_configuration_optio
'PHP_AUTH_USER' => 'apireader',
'PHP_AUTH_PW' => $this->passwordRo,
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_FORBIDDEN, $this->client->getResponse()->getStatusCode());
@@ -119,7 +128,7 @@ public function authorization_is_required_for_querying_institution_configuration
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_UNAUTHORIZED, $this->client->getResponse()->getStatusCode());
@@ -131,6 +140,10 @@ public function authorization_is_required_for_querying_institution_configuration
*/
public function requests_with_invalid_content_are_bad_requests(): void
{
+ $content = json_encode(['non-existing.organisation.test' => []]);
+ if (!is_string($content)) {
+ $this->fail('Unable to json_encode the content of the request content');
+ }
$this->client->request(
'POST',
'/management/institution-configuration',
@@ -142,7 +155,7 @@ public function requests_with_invalid_content_are_bad_requests(): void
'PHP_AUTH_USER' => 'management',
'PHP_AUTH_PW' => $this->password,
],
- json_encode(['non-existing.organisation.test' => []]),
+ $content,
);
$this->assertEquals(Response::HTTP_BAD_REQUEST, $this->client->getResponse()->getStatusCode());
@@ -165,7 +178,7 @@ public function only_post_and_get_requests_are_accepted(string $invalidHttpMetho
'HTTP_ACCEPT' => 'application/json',
'CONTENT_TYPE' => 'application/json',
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_METHOD_NOT_ALLOWED, $this->client->getResponse()->getStatusCode());
@@ -188,7 +201,7 @@ public function a_get_request_without_content_is_valid(): void
'PHP_AUTH_USER' => 'management',
'PHP_AUTH_PW' => $this->password,
],
- json_encode([]),
+ '[]',
);
$this->assertEquals(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());
@@ -211,7 +224,7 @@ public function json_is_returned_from_the_institution_configuration_api(): void
'PHP_AUTH_USER' => 'management',
'PHP_AUTH_PW' => $this->password,
],
- json_encode([]),
+ '[]',
);
$this->assertTrue(
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
index 922067a6e..e9b6d6874 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ConfigurationValidationTest.php
@@ -22,6 +22,7 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Mockery\Matcher\MatcherAbstract;
use PHPUnit\Framework\TestCase as TestCase;
+use RuntimeException;
use Surfnet\StepupMiddleware\ManagementBundle\Validator\ConfigurationStructureValidator;
use Surfnet\StepupMiddleware\ManagementBundle\Validator\Constraints\HasValidConfigurationStructure;
use Surfnet\StepupMiddleware\ManagementBundle\Validator\EmailTemplatesConfigurationValidator;
@@ -41,8 +42,12 @@ final class ConfigurationValidationTest extends TestCase
public function invalidConfigurations(): array
{
$dataSet = [];
-
- foreach (glob(__DIR__ . '/Fixtures/invalid_configuration/*.php') as $invalidConfiguration) {
+ $fixtureDir = __DIR__ . '/Fixtures/invalid_configuration/*.php';
+ $requestData = glob($fixtureDir);
+ if ($requestData === false) {
+ throw new RuntimeException(sprintf('No fixture data found in "%s"', $fixtureDir));
+ }
+ foreach ($requestData as $invalidConfiguration) {
$fixture = include $invalidConfiguration;
$dataSet[basename($invalidConfiguration)] = [
$fixture['configuration'],
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
index 39e5e4e5b..1e656e485 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/ReconfigureInstitutionRequestValidatorTest.php
@@ -23,6 +23,7 @@
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Mockery\Matcher\MatcherAbstract;
use PHPUnit\Framework\TestCase;
+use RuntimeException;
use Surfnet\Stepup\Configuration\Value\Institution;
use Surfnet\Stepup\Identity\Value\Institution as IdentityInstitution;
use Surfnet\StepupBundle\Service\SecondFactorTypeService;
@@ -45,8 +46,12 @@ class ReconfigureInstitutionRequestValidatorTest extends TestCase
public function invalidReconfigureInstitutionRequests(): array
{
$dataSet = [];
-
- foreach (glob(__DIR__ . '/Fixtures/invalid_reconfigure_institution_request/*.php') as $invalidConfiguration) {
+ $fixtureDir = __DIR__ . '/Fixtures/invalid_reconfigure_institution_request/*.php';
+ $requestData = glob($fixtureDir);
+ if ($requestData === false) {
+ throw new RuntimeException(sprintf('No fixture data found in "%s"', $fixtureDir));
+ }
+ foreach ($requestData as $invalidConfiguration) {
$fixture = include $invalidConfiguration;
$dataSet[basename($invalidConfiguration)] = [
$fixture['reconfigureInstitutionRequest'],
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
index 65bb0e8fd..9f9b11964 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php
@@ -86,7 +86,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$date = new DateTime();
$date->sub(new DateInterval('P7D'));
if ($input->hasOption('date') && !is_null($input->getOption('date'))) {
- $date = DateTime::createFromFormat('Y-m-d', $input->getOption('date'));
+ $receivedDate = $input->getOption('date');
+ $date = DateTime::createFromFormat('Y-m-d', $receivedDate);
+ if ($date === false) {
+ $output->writeln(
+ sprintf(
+ 'Error processing the "date" option. Please review the received input: "%s" ',
+ $receivedDate
+ )
+ );
+ return 1;
+ }
}
$dryRun = false;
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
index 139c50a06..67702b702 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/EventSourcing/DBALEventHydrator.php
@@ -46,14 +46,18 @@ public function __construct(
) {
}
- public function getCount(): string
+ public function getCount(): int
{
$statement = $this->connection->prepare('SELECT COUNT(1) AS cnt FROM ' . $this->eventStreamTableName);
$result = $statement->executeQuery();
$row = $result->fetchAssociative();
- return $row['cnt'];
+ if (!$row) {
+ return 0;
+ }
+
+ return (int) $row['cnt'];
}
public function getFromTill(int $limit, int $offset): DomainEventStream
@@ -97,7 +101,7 @@ public function fetchByEventTypes(array $eventTypes): DomainEventStream
$results = $statement->executeQuery($eventTypes);
$events = [];
- foreach ($results->fetchAssociative() as $row) {
+ foreach ($results->fetchAllAssociative() as $row) {
$events[] = $this->deserializeEvent($row);
}
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
index 305ade0de..72c50cb22 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/EventStreamReplayer.php
@@ -85,7 +85,7 @@ public function replayEvents(OutputInterface $output, int $increments): void
$preparationProgress->advance();
$preparationProgress->setMessage('Determining amount of events to replay...');
- $totalEvents = (int) $this->eventHydrator->getCount();
+ $totalEvents = $this->eventHydrator->getCount();
$preparationProgress->advance();
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
index c2a61a62a..2f20311e5 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/EventSourcing/EventCollectionTest.php
@@ -42,7 +42,7 @@ public function an_event_collection_must_be_created_from_an_array_of_non_empty_s
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid argument type: "non-empty string" expected');
- new EventCollection([$emptyOrNonString]);
+ new EventCollection([$emptyOrNonString]); // @phpstan-ignore-line argument.type: Warning about a faulty constructor argument is exactly what we are testing here
}
/**
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Migrations/InstitutionConfiguration/MappedInstitutionConfigurationTest.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Migrations/InstitutionConfiguration/MappedInstitutionConfigurationTest.php
index c59303552..fa9802a14 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Migrations/InstitutionConfiguration/MappedInstitutionConfigurationTest.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Tests/Migrations/InstitutionConfiguration/MappedInstitutionConfigurationTest.php
@@ -200,6 +200,9 @@ public function a_single_ra_location_means_a_single_correct_add_ra_location_comm
$this->assertEquals(1, count($commands));
$command = reset($commands);
+ if (!$command) {
+ $this->fail('The command should be in the set of commands');
+ }
$this->assertCommandMatches($command, $institution, $raLocation);
}
From a6adafc86993a6bfb33096faeebca0151bb0f957 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Tue, 2 Apr 2024 08:46:17 +0200
Subject: [PATCH 45/89] Address PHP MD issues that were introduced
During fixing of PHPStan issues, some additional mess was created. Two
of which I ignored for now. But left with some explanation on how to fix
them at a later point.
---
.../Validator/ReconfigureInstitutionRequestValidator.php | 5 +++--
.../Console/Command/BootstrapGsspSecondFactorCommand.php | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
index 1e954214d..29c5e93c7 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ReconfigureInstitutionRequestValidator.php
@@ -33,6 +33,9 @@
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Violation\ConstraintViolationBuilder;
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) Coupling to assertion classes is rather high, might be a good candidate for refactoring
+ */
final class ReconfigureInstitutionRequestValidator extends ConstraintValidator
{
/**
@@ -74,7 +77,6 @@ public function validate(mixed $value, Constraint $constraint): void
public function validateRoot(array $configuration): void
{
- Assertion::isArray($configuration, 'Invalid body structure, must be an object', '(root)');
$this->validateInstitutionsExist(array_keys($configuration));
foreach ($configuration as $institution => $options) {
@@ -98,7 +100,6 @@ public function validateInstitutionsExist(array $institutions): void
public function validateInstitutionConfigurationOptions(array $options, string $institution): void
{
$propertyPath = sprintf('Institution(%s)', $institution);
- Assertion::isArray($options, 'Invalid institution configuration, must be an object', $propertyPath);
$requiredOptions = [
'use_ra_locations',
'show_raa_contact_information',
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
index de18d2685..bc3fb07f8 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
@@ -62,6 +62,9 @@ protected function configure(): void
->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor');
}
+ /**
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength) Method length could be reduced by deconstructing the bootstrapping of the required data and the vetting of the GSSP
+ */
protected function execute(InputInterface $input, OutputInterface $output): int
{
$registrationStatus = $input->getArgument('registration-status');
From 47983674ed317b25c37a6ee7f5a421304c868304 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Tue, 2 Apr 2024 09:02:02 +0200
Subject: [PATCH 46/89] Address PHP CS issues that were introduced
---
ci/qa/docheader | 5 ++++
ci/qa/phpcbf | 6 +++++
composer.json | 3 +++
...ewInstitutionConfigurationCreatedEvent.php | 16 +++++++++----
.../Event/RaLocationAddedEvent.php | 10 ++++++--
...LocationContactInformationChangedEvent.php | 7 ++++--
.../Event/RaLocationRelocatedEvent.php | 7 ++++--
.../Event/RaLocationRenamedEvent.php | 7 ++++--
.../InstitutionConfiguration.php | 18 +++++---------
.../Identity/Entity/RegistrationAuthority.php | 9 ++++---
.../Identity/Event/AppointedAsRaEvent.php | 2 +-
.../AppointedAsRaForInstitutionEvent.php | 4 ++--
.../Identity/Event/AppointedAsRaaEvent.php | 2 +-
.../AppointedAsRaaForInstitutionEvent.php | 4 ++--
...ompliedWithRecoveryCodeRevocationEvent.php | 2 +-
.../Event/CompliedWithRevocationEvent.php | 2 +-
.../Identity/Event/EmailVerifiedEvent.php | 2 +-
.../GssfPossessionProvenAndVerifiedEvent.php | 4 ++--
.../Event/GssfPossessionProvenEvent.php | 4 ++--
.../Event/IdentityAccreditedAsRaEvent.php | 2 +-
...ntityAccreditedAsRaForInstitutionEvent.php | 2 +-
.../Event/IdentityAccreditedAsRaaEvent.php | 2 +-
...tityAccreditedAsRaaForInstitutionEvent.php | 2 +-
.../Identity/Event/IdentityCreatedEvent.php | 4 ++--
.../Event/IdentityEmailChangedEvent.php | 4 ++--
.../Identity/Event/IdentityForgottenEvent.php | 4 ++--
.../Identity/Event/IdentityRenamedEvent.php | 4 ++--
.../InstitutionsAddedToWhitelistEvent.php | 2 +-
.../InstitutionsRemovedFromWhitelistEvent.php | 2 +-
.../Event/LocalePreferenceExpressedEvent.php | 4 ++--
.../PhonePossessionProvenAndVerifiedEvent.php | 4 ++--
.../Event/PhonePossessionProvenEvent.php | 4 ++--
...honeRecoveryTokenPossessionProvenEvent.php | 4 ++--
.../Event/RecoveryTokenRevokedEvent.php | 2 +-
...rationAuthorityInformationAmendedEvent.php | 2 +-
...yInformationAmendedForInstitutionEvent.php | 2 +-
.../RegistrationAuthorityRetractedEvent.php | 2 +-
...nAuthorityRetractedForInstitutionEvent.php | 4 ++--
...etRecoveryTokenPossessionPromisedEvent.php | 4 ++--
.../Event/SecondFactorMigratedEvent.php | 4 ++--
.../Event/SecondFactorMigratedToEvent.php | 4 ++--
.../Event/SecondFactorRevokedEvent.php | 2 +-
.../Event/SecondFactorVettedEvent.php | 4 ++--
...torVettedWithoutTokenProofOfPossession.php | 4 ++--
...DevicePossessionProvenAndVerifiedEvent.php | 4 ++--
.../Event/U2fDevicePossessionProvenEvent.php | 4 ++--
.../VettedSecondFactorsAllRevokedEvent.php | 2 +-
.../Event/VettingTypeHintsSavedEvent.php | 2 +-
.../Identity/Event/WhitelistCreatedEvent.php | 2 +-
.../Identity/Event/WhitelistReplacedEvent.php | 2 +-
...ubikeyPossessionProvenAndVerifiedEvent.php | 4 ++--
.../Event/YubikeyPossessionProvenEvent.php | 4 ++--
.../YubikeySecondFactorBootstrappedEvent.php | 4 ++--
src/Surfnet/Stepup/Identity/Identity.php | 24 +++++++------------
...InstitutionConfigurationOptionsService.php | 14 ++++-------
.../Identity/Entity/AuditLogEntry.php | 2 +-
.../Identity/Projector/RaListingProjector.php | 1 -
.../Projector/RaSecondFactorProjector.php | 9 +++----
.../Projector/SecondFactorProjector.php | 9 +++----
.../SecondFactorRevocationProjector.php | 6 ++---
.../Repository/AuditLogRepository.php | 9 ++++++-
.../Repository/RecoveryTokenRepository.php | 7 +++---
.../Identity/Service/RaListingService.php | 8 ++-----
.../Entity/InstitutionConfiguration.php | 3 +--
.../Projector/SecondFactorProjector.php | 3 +--
.../BootstrapGsspSecondFactorCommand.php | 3 ++-
...IdentityWithYubikeySecondFactorCommand.php | 3 ++-
.../Console/Command/ReplayEventsCommand.php | 12 +++++-----
.../Service/ReplayingEventDispatcher.php | 3 ++-
69 files changed, 176 insertions(+), 160 deletions(-)
create mode 100755 ci/qa/docheader
create mode 100755 ci/qa/phpcbf
diff --git a/ci/qa/docheader b/ci/qa/docheader
new file mode 100755
index 000000000..fedbc2e74
--- /dev/null
+++ b/ci/qa/docheader
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+cd $(dirname $0)/../../
+
+./vendor/bin/docheader --no-ansi check src/ tests/
diff --git a/ci/qa/phpcbf b/ci/qa/phpcbf
new file mode 100755
index 000000000..138015bd6
--- /dev/null
+++ b/ci/qa/phpcbf
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+cd $(dirname $0)/../../
+
+# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically
+./vendor/bin/phpcbf --standard=ci/qa/phpcs.xml --extensions=php src $1
diff --git a/composer.json b/composer.json
index 446a54242..458927657 100644
--- a/composer.json
+++ b/composer.json
@@ -90,12 +90,15 @@
"@phpcs",
"@phpstan",
"@phpcpd",
+ "@license-headers",
"@phpunit"
],
"phplint": "./ci/qa/phplint",
"phpmd": "./ci/qa/phpmd",
+ "license-headers": "./ci/qa/docheader",
"phpstan": "./ci/qa/phpstan",
"phpcs": "./ci/qa/phpcs",
+ "phpcbf": "./ci/qa/phpcbf",
"phpcpd": "./ci/qa/phpcpd",
"phpunit": "./ci/qa/phpunit --",
diff --git a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
index d4350ee85..5f13ec8f1 100644
--- a/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php
@@ -35,8 +35,17 @@
*/
class NewInstitutionConfigurationCreatedEvent implements SerializableInterface
{
- public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public Institution $institution, public UseRaLocationsOption $useRaLocationsOption, public ShowRaaContactInformationOption $showRaaContactInformationOption, public VerifyEmailOption $verifyEmailOption, public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption, public SsoOn2faOption $ssoOn2faOption, public SelfVetOption $selfVetOption, public SelfAssertedTokensOption $selfAssertedTokensOption)
- {
+ public function __construct(
+ public InstitutionConfigurationId $institutionConfigurationId,
+ public Institution $institution,
+ public UseRaLocationsOption $useRaLocationsOption,
+ public ShowRaaContactInformationOption $showRaaContactInformationOption,
+ public VerifyEmailOption $verifyEmailOption,
+ public NumberOfTokensPerIdentityOption $numberOfTokensPerIdentityOption,
+ public SsoOn2faOption $ssoOn2faOption,
+ public SelfVetOption $selfVetOption,
+ public SelfAssertedTokensOption $selfAssertedTokensOption
+ ) {
}
public static function deserialize(array $data): self
@@ -80,8 +89,7 @@ public function serialize(): array
'use_ra_locations_option' => $this->useRaLocationsOption->isEnabled(),
'show_raa_contact_information_option' => $this->showRaaContactInformationOption->isEnabled(),
'verify_email_option' => $this->verifyEmailOption->isEnabled(),
- 'number_of_tokens_per_identity_option' => $this->numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity(
- ),
+ 'number_of_tokens_per_identity_option' => $this->numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity(),
'sso_on_2fa_option' => $this->ssoOn2faOption->isEnabled(),
'self_vet_option' => $this->selfVetOption->isEnabled(),
'self_asserted_tokens_option' => $this->selfAssertedTokensOption->isEnabled(),
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
index 64627f6d6..0faaeb315 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationAddedEvent.php
@@ -28,8 +28,14 @@
class RaLocationAddedEvent implements SerializableInterface
{
- public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public Institution $institution, public RaLocationId $raLocationId, public RaLocationName $raLocationName, public Location $location, public ContactInformation $contactInformation)
- {
+ public function __construct(
+ public InstitutionConfigurationId $institutionConfigurationId,
+ public Institution $institution,
+ public RaLocationId $raLocationId,
+ public RaLocationName $raLocationName,
+ public Location $location,
+ public ContactInformation $contactInformation
+ ) {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
index f8179e345..bc102b5af 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationContactInformationChangedEvent.php
@@ -25,8 +25,11 @@
class RaLocationContactInformationChangedEvent implements SerializableInterface
{
- public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public ContactInformation $contactInformation)
- {
+ public function __construct(
+ public InstitutionConfigurationId $institutionConfigurationId,
+ public RaLocationId $raLocationId,
+ public ContactInformation $contactInformation
+ ) {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
index b583e0b35..5aa13e4d6 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRelocatedEvent.php
@@ -25,8 +25,11 @@
class RaLocationRelocatedEvent implements SerializableInterface
{
- public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public Location $location)
- {
+ public function __construct(
+ public InstitutionConfigurationId $institutionConfigurationId,
+ public RaLocationId $raLocationId,
+ public Location $location
+ ) {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
index 7fc9a32ba..4c023d18d 100644
--- a/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
+++ b/src/Surfnet/Stepup/Configuration/Event/RaLocationRenamedEvent.php
@@ -25,8 +25,11 @@
class RaLocationRenamedEvent implements SerializableInterface
{
- public function __construct(public InstitutionConfigurationId $institutionConfigurationId, public RaLocationId $raLocationId, public RaLocationName $raLocationName)
- {
+ public function __construct(
+ public InstitutionConfigurationId $institutionConfigurationId,
+ public RaLocationId $raLocationId,
+ public RaLocationName $raLocationName
+ ) {
}
public static function deserialize(array $data): self
diff --git a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
index 1c29b2156..82f7fede0 100644
--- a/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
+++ b/src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php
@@ -564,43 +564,37 @@ protected function applyUseRaLocationsOptionChangedEvent(UseRaLocationsOptionCha
protected function applyShowRaaContactInformationOptionChangedEvent(
ShowRaaContactInformationOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->showRaaContactInformationOption = $event->showRaaContactInformationOption;
}
protected function applyVerifyEmailOptionChangedEvent(
VerifyEmailOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->verifyEmailOption = $event->verifyEmailOption;
}
protected function applySelfVetOptionChangedEvent(
SelfVetOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->selfVetOption = $event->selfVetOption;
}
protected function applySelfAssertedTokensOptionChangedEvent(
SelfAssertedTokensOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->selfAssertedTokensOption = $event->selfAssertedTokensOption;
}
protected function applySsoOn2faOptionChangedEvent(
SsoOn2faOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->ssoOn2faOption = $event->ssoOn2faOption;
}
protected function applyNumberOfTokensPerIdentityOptionChangedEvent(
NumberOfTokensPerIdentityOptionChangedEvent $event,
- ): void
- {
+ ): void {
$this->numberOfTokensPerIdentityOption = $event->numberOfTokensPerIdentityOption;
}
diff --git a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
index 92bdcf620..aec69096a 100644
--- a/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
+++ b/src/Surfnet/Stepup/Identity/Entity/RegistrationAuthority.php
@@ -31,11 +31,14 @@ final class RegistrationAuthority extends SimpleEventSourcedEntity
{
private ?RegistrationAuthorityRole $role = null;
- private ?Location $location = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
+ // @phpstan-ignore-next-line PHPStan can not see that this field is written when serialized to the database
+ private ?Location $location = null;
- private ?ContactInformation $contactInformation = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
+ // @phpstan-ignore-next-line PHPStan can not see that this field is written when serialized to the database
+ private ?ContactInformation $contactInformation = null;
- private ?Institution $institution = null; // @phpstan-ignore-line PHPStan can not see that this field is written when serialized to the database
+ // @phpstan-ignore-next-line PHPStan can not see that this field is written when serialized to the database
+ private ?Institution $institution = null;
public static function accreditWith(
RegistrationAuthorityRole $role,
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
index d9f3bbd73..da4b91d7f 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php
@@ -30,7 +30,7 @@
class AppointedAsRaEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
index 5bfda2f8f..bacc1789b 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php
@@ -27,7 +27,7 @@
class AppointedAsRaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -67,7 +67,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
index 33a8bf8b5..429a16376 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaEvent.php
@@ -30,7 +30,7 @@
class AppointedAsRaaEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
index 123a0255d..f54123eee 100644
--- a/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/AppointedAsRaaForInstitutionEvent.php
@@ -27,7 +27,7 @@
class AppointedAsRaaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -67,7 +67,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
index 1d19efd39..fff696365 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRecoveryCodeRevocationEvent.php
@@ -28,7 +28,7 @@
class CompliedWithRecoveryCodeRevocationEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
index 235161a51..5e3c48419 100644
--- a/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/CompliedWithRevocationEvent.php
@@ -32,7 +32,7 @@
abstract class CompliedWithRevocationEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
index e3a0120c1..64d8f6dad 100644
--- a/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/EmailVerifiedEvent.php
@@ -39,7 +39,7 @@ class EmailVerifiedEvent extends IdentityEvent implements
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
index 484d5b2e8..a516cd6a1 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenAndVerifiedEvent.php
@@ -39,7 +39,7 @@ class GssfPossessionProvenAndVerifiedEvent extends IdentityEvent implements
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -117,7 +117,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
index 6a64ba7f3..63d32f304 100644
--- a/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/GssfPossessionProvenEvent.php
@@ -36,7 +36,7 @@
class GssfPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -106,7 +106,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
index 1df5a9190..8e9d1300a 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaEvent.php
@@ -33,7 +33,7 @@
class IdentityAccreditedAsRaEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
index 71c9b0d03..1edea699e 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaForInstitutionEvent.php
@@ -30,7 +30,7 @@
class IdentityAccreditedAsRaForInstitutionEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
index c3bfe3f1d..f9738c66c 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaEvent.php
@@ -34,7 +34,7 @@ class IdentityAccreditedAsRaaEvent extends IdentityEvent implements RightToObtai
{
/** @var string[] */
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
index 00ea52dc7..438bc1aa4 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityAccreditedAsRaaForInstitutionEvent.php
@@ -31,7 +31,7 @@ class IdentityAccreditedAsRaaForInstitutionEvent extends IdentityEvent implement
{
/** @var string[] */
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
index 124f65040..856f8cf4a 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityCreatedEvent.php
@@ -32,7 +32,7 @@
class IdentityCreatedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'id',
@@ -77,7 +77,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
index c55cd923e..ff71f5403 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php
@@ -29,7 +29,7 @@
class IdentityEmailChangedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'id',
@@ -66,7 +66,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
index 552037111..137b3eee6 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityForgottenEvent.php
@@ -26,7 +26,7 @@
class IdentityForgottenEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -52,7 +52,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
index 0acfdc71f..00c4aa0b7 100644
--- a/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/IdentityRenamedEvent.php
@@ -29,7 +29,7 @@
class IdentityRenamedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'id',
@@ -66,7 +66,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
index 52f27f3d3..0d6824c42 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php
@@ -38,7 +38,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
index 4457c3446..d32d5a281 100644
--- a/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php
@@ -38,7 +38,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
index 07057161a..a24c6a765 100644
--- a/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/LocalePreferenceExpressedEvent.php
@@ -27,7 +27,7 @@
class LocalePreferenceExpressedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'id',
@@ -65,7 +65,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
index 9fb8d4a80..1fffea16e 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenAndVerifiedEvent.php
@@ -38,7 +38,7 @@ class PhonePossessionProvenAndVerifiedEvent extends IdentityEvent implements
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -111,7 +111,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
index 56ae17f69..e2994aef2 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhonePossessionProvenEvent.php
@@ -35,7 +35,7 @@
class PhonePossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -111,7 +111,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
index fa27c8dee..4c8d9a283 100644
--- a/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/PhoneRecoveryTokenPossessionProvenEvent.php
@@ -40,7 +40,7 @@
class PhoneRecoveryTokenPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -91,7 +91,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
index 074997bf2..19c8592d9 100644
--- a/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RecoveryTokenRevokedEvent.php
@@ -28,7 +28,7 @@
class RecoveryTokenRevokedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
index bab676149..46c013e18 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedEvent.php
@@ -32,7 +32,7 @@
class RegistrationAuthorityInformationAmendedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
index 0574df110..887318a3f 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityInformationAmendedForInstitutionEvent.php
@@ -30,7 +30,7 @@ class RegistrationAuthorityInformationAmendedForInstitutionEvent extends Identit
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
index c7dd0b6d5..e92961302 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedEvent.php
@@ -34,7 +34,7 @@
class RegistrationAuthorityRetractedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
index 3cbe8a920..4aeabc5d9 100644
--- a/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/RegistrationAuthorityRetractedForInstitutionEvent.php
@@ -33,7 +33,7 @@ class RegistrationAuthorityRetractedForInstitutionEvent extends IdentityEvent im
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -78,7 +78,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
index 911a39406..7ec7f3149 100644
--- a/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SafeStoreSecretRecoveryTokenPossessionPromisedEvent.php
@@ -43,7 +43,7 @@ class SafeStoreSecretRecoveryTokenPossessionPromisedEvent extends IdentityEvent
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -92,7 +92,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
index 41350c661..eab9c6949 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedEvent.php
@@ -43,7 +43,7 @@
class SecondFactorMigratedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -119,7 +119,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
index c4d042990..aaf1caa3c 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorMigratedToEvent.php
@@ -35,7 +35,7 @@
class SecondFactorMigratedToEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -90,7 +90,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
index 3a98fbe7d..45bed7e9e 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorRevokedEvent.php
@@ -32,7 +32,7 @@
abstract class SecondFactorRevokedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
index fefdb55e4..c5e0fd903 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php
@@ -41,7 +41,7 @@
class SecondFactorVettedEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -109,7 +109,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
index a3c1a776b..7ad05ede4 100644
--- a/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
+++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedWithoutTokenProofOfPossession.php
@@ -44,7 +44,7 @@ class SecondFactorVettedWithoutTokenProofOfPossession extends IdentityEvent impl
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -117,7 +117,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
index 96fb8ff3a..2026408b6 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenAndVerifiedEvent.php
@@ -41,7 +41,7 @@ class U2fDevicePossessionProvenAndVerifiedEvent extends IdentityEvent implements
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -114,7 +114,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
index b5475b8c2..200254f7c 100644
--- a/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/U2fDevicePossessionProvenEvent.php
@@ -38,7 +38,7 @@
class U2fDevicePossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -114,7 +114,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php b/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
index c475589b8..0debdb176 100644
--- a/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/VettedSecondFactorsAllRevokedEvent.php
@@ -26,7 +26,7 @@
class VettedSecondFactorsAllRevokedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
index d46ff8d1d..842bdc9a4 100644
--- a/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/VettingTypeHintsSavedEvent.php
@@ -27,7 +27,7 @@
class VettingTypeHintsSavedEvent extends IdentityEvent implements RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
index 2feb528e9..1dc60b7d4 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php
@@ -37,7 +37,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
index 1c5918295..74bd0bd93 100644
--- a/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php
@@ -38,7 +38,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
index aca867439..c74513f05 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php
@@ -38,7 +38,7 @@ class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -114,7 +114,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
index 8eee90db7..31dc8a188 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php
@@ -36,7 +36,7 @@
class YubikeyPossessionProvenEvent extends IdentityEvent implements Forgettable, RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -112,7 +112,7 @@ public static function deserialize(array $data): self
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
index b9f147d0b..4f629293f 100644
--- a/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
+++ b/src/Surfnet/Stepup/Identity/Event/YubikeySecondFactorBootstrappedEvent.php
@@ -37,7 +37,7 @@ final class YubikeySecondFactorBootstrappedEvent extends IdentityEvent implement
RightToObtainDataInterface
{
/**
- * @var string[]
+ * @var string[]
*/
private array $allowlist = [
'identity_id',
@@ -84,7 +84,7 @@ public function getAuditLogMetadata(): Metadata
/**
* The data ending up in the event_stream, be careful not to include sensitive data here!
- *
+ *
* @return array
*/
public function serialize(): array
diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php
index 561751ff2..f84a0baed 100644
--- a/src/Surfnet/Stepup/Identity/Identity.php
+++ b/src/Surfnet/Stepup/Identity/Identity.php
@@ -1183,8 +1183,7 @@ protected function applyPhoneRecoveryTokenPossessionProvenEvent(PhoneRecoveryTok
protected function applySafeStoreSecretRecoveryTokenPossessionPromisedEvent(
SafeStoreSecretRecoveryTokenPossessionPromisedEvent $event,
- ): void
- {
+ ): void {
$recoveryToken = RecoveryTokenEntity::create($event->recoveryTokenId, RecoveryTokenType::safeStore(), $this);
$this->recoveryTokens->set($recoveryToken);
@@ -1231,8 +1230,7 @@ protected function applySecondFactorVettedEvent(SecondFactorVettedEvent $event):
protected function applySecondFactorVettedWithoutTokenProofOfPossession(
SecondFactorVettedWithoutTokenProofOfPossession $event,
- ): void
- {
+ ): void {
$secondFactorId = (string)$event->secondFactorId;
/** @var VerifiedSecondFactor $verified */
@@ -1250,8 +1248,7 @@ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFacto
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->unverifiedSecondFactors->remove((string)$event->secondFactorId);
}
@@ -1262,8 +1259,7 @@ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRev
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->verifiedSecondFactors->remove((string)$event->secondFactorId);
}
@@ -1274,8 +1270,7 @@ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevoked
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->vettedSecondFactors->remove((string)$event->secondFactorId);
}
@@ -1317,8 +1312,7 @@ protected function applyIdentityAccreditedAsRaaForInstitutionEvent(IdentityAccre
protected function applyRegistrationAuthorityInformationAmendedForInstitutionEvent(
RegistrationAuthorityInformationAmendedForInstitutionEvent $event,
- ): void
- {
+ ): void {
$this->registrationAuthorities->get($event->raInstitution)->amendInformation(
$event->location,
$event->contactInformation,
@@ -1334,8 +1328,7 @@ protected function applyAppointedAsRaaForInstitutionEvent(AppointedAsRaaForInsti
protected function applyRegistrationAuthorityRetractedForInstitutionEvent(
RegistrationAuthorityRetractedForInstitutionEvent $event,
- ): void
- {
+ ): void {
$this->registrationAuthorities->remove($event->raInstitution);
}
@@ -1415,8 +1408,7 @@ protected function applyAppointedAsRaForInstitutionEvent(AppointedAsRaForInstitu
*/
protected function applyRegistrationAuthorityInformationAmendedEvent(
RegistrationAuthorityInformationAmendedEvent $event,
- ): void
- {
+ ): void {
$this->registrationAuthorities->get($event->identityInstitution)->amendInformation(
$event->location,
$event->contactInformation,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
index b06d9686a..71a7ab6d9 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Service/InstitutionConfigurationOptionsService.php
@@ -24,12 +24,9 @@
class InstitutionConfigurationOptionsService
{
- /**
- * @param int $numberOfTokensPerIdentity
- */
public function __construct(
private readonly InstitutionConfigurationOptionsRepository $repository,
- private $numberOfTokensPerIdentity,
+ private int $numberOfTokensPerIdentity,
) {
}
@@ -41,9 +38,6 @@ public function findAllInstitutionConfigurationOptions(): array
return $this->repository->findAll();
}
- /**
- * @return InstitutionConfigurationOptions|null
- */
public function findInstitutionConfigurationOptionsFor(Institution $institution): ?InstitutionConfigurationOptions
{
return $this->repository->findConfigurationOptionsFor($institution);
@@ -54,14 +48,14 @@ public function findInstitutionConfigurationOptionsFor(Institution $institution)
*
* When the DISABLED value is set on the institution (when no specific configuration was pushed) the application
* default is returned.
- *
- * @return int
*/
public function getMaxNumberOfTokensFor(Institution $institution): int
{
$configuration = $this->findInstitutionConfigurationOptionsFor($institution);
- if ($configuration instanceof \Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\InstitutionConfigurationOptions && $configuration->numberOfTokensPerIdentityOption->isEnabled()) {
+ if ($configuration instanceof InstitutionConfigurationOptions &&
+ $configuration->numberOfTokensPerIdentityOption->isEnabled()
+ ) {
return $configuration->numberOfTokensPerIdentityOption->getNumberOfTokensPerIdentity();
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
index 561bc86b1..f047a96f7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php
@@ -168,7 +168,7 @@ public function jsonSerialize(): array
{
return [
'actor_id' => $this->actorId,
- 'actor_institution' => $this->actorInstitution instanceof \Surfnet\Stepup\Identity\Value\Institution ? (string)$this->actorInstitution : null,
+ 'actor_institution' => $this->actorInstitution instanceof Institution ? (string)$this->actorInstitution : null,
'actor_common_name' => $this->actorCommonName,
'identity_id' => $this->identityId,
'identity_institution' => (string)$this->identityInstitution,
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
index e5eeb4af9..0fe328319 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php
@@ -241,7 +241,6 @@ public function applyAppointedAsRaaEvent(AppointedAsRaaEvent $event): void
$listing->role = AuthorityRole::raa();
$this->raListingRepository->save($listing);
}
-
}
/**
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
index 5aaa351d7..a9921fd6f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php
@@ -308,8 +308,7 @@ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFacto
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
@@ -320,8 +319,7 @@ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRev
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
@@ -332,8 +330,7 @@ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevoked
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->updateStatus($event->secondFactorId, SecondFactorStatus::revoked());
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
index b78b993a5..355573cb4 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
@@ -239,8 +239,7 @@ protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFacto
protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
CompliedWithUnverifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->unverifiedRepository->remove(
$this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId()),
);
@@ -253,8 +252,7 @@ protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRev
protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
CompliedWithVerifiedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->verifiedRepository->remove($this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()));
}
@@ -265,8 +263,7 @@ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevoked
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$this->vettedRepository->remove($this->vettedRepository->find($event->secondFactorId->getSecondFactorId()));
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
index 87bd40b68..e5e3047d2 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php
@@ -37,8 +37,7 @@ public function __construct(private readonly SecondFactorRevocationRepository $r
protected function applyVettedSecondFactorRevokedEvent(
VettedSecondFactorRevokedEvent $event,
DomainMessage $domainMessage,
- ): void
- {
+ ): void {
$revocation = new SecondFactorRevocation();
$revocation->id = (string)Uuid::uuid4();
$revocation->institution = $event->identityInstitution;
@@ -52,8 +51,7 @@ protected function applyVettedSecondFactorRevokedEvent(
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
DomainMessage $domainMessage,
- ): void
- {
+ ): void {
$revocation = new SecondFactorRevocation();
$revocation->id = (string)Uuid::uuid4();
$revocation->institution = $event->identityInstitution;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
index 4b8d03466..0642c7947 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php
@@ -122,7 +122,14 @@ public function createSecondFactorSearchQuery(SecondFactorAuditLogQuery $query):
->setParameter('secondFactorEvents', self::$secondFactorEvents);
match ($query->orderBy) {
- 'secondFactorType', 'secondFactorIdentifier', 'recoveryTokenType', 'recoveryTokenIdentifier', 'recordedOn', 'actorCommonName', 'actorInstitution' => $queryBuilder->orderBy(
+ 'secondFactorType',
+ 'secondFactorIdentifier',
+ 'recoveryTokenType',
+ 'recoveryTokenIdentifier',
+ 'recordedOn',
+ 'actorCommonName',
+ 'actorInstitution'
+ => $queryBuilder->orderBy(
sprintf('al.%s', $query->orderBy),
$query->orderDirection === 'desc' ? 'DESC' : 'ASC',
),
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
index 6f4b1ea9a..e1b7331d7 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RecoveryTokenRepository.php
@@ -24,6 +24,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Filter\InstitutionAuthorizationRepositoryFilter;
+use Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContextInterface;
use Surfnet\StepupMiddleware\ApiBundle\Doctrine\Type\RecoveryTokenStatusType;
use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RecoveryToken;
@@ -63,7 +64,7 @@ public function createSearchQuery(RecoveryTokenQuery $query): Query
{
$queryBuilder = $this->createQueryBuilder('rt');
- if ($query->authorizationContext instanceof \Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContextInterface) {
+ if ($query->authorizationContext instanceof InstitutionAuthorizationContextInterface) {
// Modify query to filter on authorization context
// We want to list all recovery tokens of the institution we are RA for.
$this->authorizationRepositoryFilter->filter(
@@ -73,7 +74,7 @@ public function createSearchQuery(RecoveryTokenQuery $query): Query
'iac',
);
}
- if ($query->identityId instanceof \Surfnet\Stepup\Identity\Value\IdentityId) {
+ if ($query->identityId instanceof IdentityId) {
$queryBuilder
->andWhere('rt.identityId = :identityId')
->setParameter('identityId', $query->identityId);
@@ -139,7 +140,7 @@ public function createOptionsQuery(RecoveryTokenQuery $query): Query
->select('sf.institution')
->groupBy('sf.institution');
- if ($query->authorizationContext instanceof \Surfnet\StepupMiddleware\ApiBundle\Authorization\Value\InstitutionAuthorizationContextInterface) {
+ if ($query->authorizationContext instanceof InstitutionAuthorizationContextInterface) {
// Modify query to filter on authorization context
// We want to list all second factors of the institution we are RA for.
$this->authorizationRepositoryFilter->filter(
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
index 705828d56..22f0f58a5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php
@@ -33,15 +33,11 @@ public function __construct(private readonly RaListingRepository $raListingRepos
{
}
- /**
- * @return null|RaListing
- */
public function findByIdentityIdAndRaInstitutionWithContext(
IdentityId $identityId,
Institution $raInstitution,
InstitutionAuthorizationContextInterface $authorizationContext,
- ): ?RaListing
- {
+ ): ?RaListing {
return $this->raListingRepository->findByIdentityIdAndRaInstitutionWithContext(
$identityId,
$raInstitution,
@@ -75,7 +71,7 @@ public function listRegistrationAuthoritiesFor(Institution $institution): array
$raListings = $this->raListingRepository->listRasFor($institution);
return $raListings
- ->map(fn(RaListing $raListing): \Surfnet\StepupMiddleware\ApiBundle\Identity\Value\RegistrationAuthorityCredentials => RegistrationAuthorityCredentials::fromRaListing($raListing))
+ ->map(fn(RaListing $raListing): RegistrationAuthorityCredentials => RegistrationAuthorityCredentials::fromRaListing($raListing))
->toArray();
}
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
index 5385f9bdd..2afca69db 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
@@ -36,7 +36,6 @@ public function __construct(
*/
#[ORM\Column(type: 'boolean')]
public bool $ssoOn2faEnabled
- )
- {
+ ) {
}
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
index 738e2bad8..fd217359c 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php
@@ -126,8 +126,7 @@ protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevoked
protected function applyCompliedWithVettedSecondFactorRevocationEvent(
CompliedWithVettedSecondFactorRevocationEvent $event,
- ): void
- {
+ ): void {
$secondFactor = $this->repository->findOneBySecondFactorId($event->secondFactorId);
if ($secondFactor === null) {
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
index bc3fb07f8..c757b4608 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapGsspSecondFactorCommand.php
@@ -63,7 +63,8 @@ protected function configure(): void
}
/**
- * @SuppressWarnings(PHPMD.ExcessiveMethodLength) Method length could be reduced by deconstructing the bootstrapping of the required data and the vetting of the GSSP
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength) Method length could be reduced by deconstructing the bootstrapping
+ * of the required data and the vetting of the GSSP
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
index 8e81795a9..8226fc65d 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php
@@ -23,7 +23,8 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\Stepup\Identity\Value\NameId;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository;
-use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\BootstrapIdentityWithYubikeySecondFactorCommand as BootstrapIdentityWithYubikeySecondFactorIdentityCommand;
+use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\BootstrapIdentityWithYubikeySecondFactorCommand
+ as BootstrapIdentityWithYubikeySecondFactorIdentityCommand;
use Surfnet\StepupMiddleware\MiddlewareBundle\Service\TransactionHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
index 66ade8006..9ffd9648d 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php
@@ -46,12 +46,12 @@ protected function configure(): void
{
$this
->addOption(
- 'increments',
- 'i',
- InputOption::VALUE_REQUIRED,
- 'The amount of events that are replayed at once (repeated until all events are replayed)',
- 1000,
- );
+ 'increments',
+ 'i',
+ InputOption::VALUE_REQUIRED,
+ 'The amount of events that are replayed at once (repeated until all events are replayed)',
+ 1000,
+ );
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
index d3a3355ad..d276232b9 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/ReplayingEventDispatcher.php
@@ -33,7 +33,8 @@ public function registerProjector(EventListener $projector): void
$this->projectors[] = $projector;
}
- public function dispatch(DomainEventStream $events): void {
+ public function dispatch(DomainEventStream $events): void
+ {
foreach ($events as $event) {
foreach ($this->projectors as $projector) {
$projector->handle($event);
From 357a694e7d07af5f7e3e04d01801cb073d0c0e81 Mon Sep 17 00:00:00 2001
From: Michiel Kodde
Date: Tue, 2 Apr 2024 09:51:38 +0200
Subject: [PATCH 47/89] Install and repair document headers
---
.docheader | 15 +++++
composer.json | 1 +
composer.lock | 60 ++++++++++++++++++-
src/Surfnet/DataFixtures/AppFixtures.php | 16 +++++
.../Migrations/Version20141031133057.php | 16 +++++
.../SelfAssertedTokensOptionChangedEvent.php | 2 +-
.../Event/SelfVetOptionChangedEvent.php | 2 +-
.../Event/SsoOn2faOptionChangedEvent.php | 2 +-
.../Configuration/Value/InstitutionRole.php | 3 +-
.../Value/SelfAssertedTokensOption.php | 2 +-
.../Configuration/Value/SelfVetOption.php | 2 +-
.../Configuration/Value/SsoOn2faOption.php | 2 +-
.../InstitutionAuthorizationOptionTest.php | 2 +-
.../Value/InstitutionRoleTest.php | 4 +-
.../MigrateVettedSecondFactorCommand.php | 2 +-
...egisterSelfAssertedSecondFactorCommand.php | 2 +-
.../Command/SelfVetSecondFactorCommand.php | 2 +-
.../RightToObtainDataInterface.php | 16 +++++
src/Surfnet/StepupMiddleware/Kernel.php | 16 +++++
...SecondFactorDisplayNameResolverService.php | 2 +-
...ndFactorDisplayNameResolverServiceTest.php | 2 +-
tests/bootstrap.php | 16 +++++
22 files changed, 171 insertions(+), 16 deletions(-)
create mode 100644 .docheader
diff --git a/.docheader b/.docheader
new file mode 100644
index 000000000..a12ddf880
--- /dev/null
+++ b/.docheader
@@ -0,0 +1,15 @@
+/**
+ * Copyright %regexp:\d{4}% SURFnet %regexp:(B.V.|bv)%
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
diff --git a/composer.json b/composer.json
index 458927657..81a356cd0 100644
--- a/composer.json
+++ b/composer.json
@@ -62,6 +62,7 @@
"doctrine/data-fixtures": "~1.7",
"doctrine/doctrine-fixtures-bundle": "^3.5.1",
"liip/test-fixtures-bundle": "^2.7",
+ "malukenho/docheader": "^1.1",
"mockery/mockery": "1.7.x-dev",
"moontoast/math": "^1.2",
"overtrue/phplint": "*",
diff --git a/composer.lock b/composer.lock
index e94f081b9..a303ac3fc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4681103c3b1b653100a98769264006bb",
+ "content-hash": "f96114a69480199bd5aa4734329b9506",
"packages": [
{
"name": "beberlei/assert",
@@ -9052,6 +9052,64 @@
},
"time": "2020-07-09T08:09:16+00:00"
},
+ {
+ "name": "malukenho/docheader",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/malukenho/docheader.git",
+ "reference": "263320d434c727a014650239c90240bbe808bd17"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/malukenho/docheader/zipball/263320d434c727a014650239c90240bbe808bd17",
+ "reference": "263320d434c727a014650239c90240bbe808bd17",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0",
+ "symfony/console": "^4.4 || ^5.4 || ^6.0 || ^7.0",
+ "symfony/finder": "^4.4 || ^5.4 || ^6.0 || ^7.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0",
+ "mikey179/vfsstream": "^1.6.10",
+ "phpunit/phpunit": "^9.5",
+ "vimeo/psalm": "^4.23 || ^5.0"
+ },
+ "bin": [
+ "bin/docheader"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "DocHeader\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jefersson Nathan",
+ "email": "malukenho.dev@gmail.com"
+ }
+ ],
+ "description": "A small library to check header docs",
+ "homepage": "https://github.com/malukenho/docheader",
+ "keywords": [
+ "Code style",
+ "code standard",
+ "license",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/malukenho/docheader/issues",
+ "source": "https://github.com/malukenho/docheader/tree/1.1.0"
+ },
+ "time": "2024-02-05T12:05:53+00:00"
+ },
{
"name": "masterminds/html5",
"version": "2.8.1",
diff --git a/src/Surfnet/DataFixtures/AppFixtures.php b/src/Surfnet/DataFixtures/AppFixtures.php
index 4207c8246..80479f788 100644
--- a/src/Surfnet/DataFixtures/AppFixtures.php
+++ b/src/Surfnet/DataFixtures/AppFixtures.php
@@ -1,5 +1,21 @@
Date: Tue, 2 Apr 2024 10:53:49 +0200
Subject: [PATCH 48/89] Track ci/qa/phpstan.neon
---
ci/qa/phpstan.neon | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 ci/qa/phpstan.neon
diff --git a/ci/qa/phpstan.neon b/ci/qa/phpstan.neon
new file mode 100644
index 000000000..baa9bb720
--- /dev/null
+++ b/ci/qa/phpstan.neon
@@ -0,0 +1,10 @@
+includes:
+ - ./phpstan-baseline.neon
+ - ../../vendor/phpstan/phpstan-doctrine/extension.neon
+ - ../../vendor/phpstan/phpstan-mockery/extension.neon
+ - ../../vendor/phpstan/phpstan-symfony/extension.neon
+
+parameters:
+ level: 9
+ paths:
+ - ../../src
From 86517767ad9fa2f5ec98fd91299f69785dafee96 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst
Date: Wed, 17 Apr 2024 14:51:28 +0200
Subject: [PATCH 49/89] Also the /internal/{info,health} paths must be
publically available
---
config/packages/security.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/packages/security.yaml b/config/packages/security.yaml
index b0d7eda47..462653faf 100644
--- a/config/packages/security.yaml
+++ b/config/packages/security.yaml
@@ -4,7 +4,7 @@ security:
pattern: ^/_trans(/|$)
security: false
monitor:
- pattern: ^/(info|health)$
+ pattern: ^/(internal/)?(info|health)$
security: false
api:
http_basic: ~
From 8c2125984ab893e2d5763772e40adaa1d81d5c5b Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst
Date: Mon, 4 Mar 2024 13:08:24 +0100
Subject: [PATCH 50/89] Make expiration date in mail match the one displayed in
selfservice.
Selfservice renders the date without ->endOfDay(). Adding the endOfDay
makes the date wrap to the next day when the timezone modifier is applied.
More intricate timezone aware handling of this date is thinkable,
but this change at least brings both interfaces to use the same algorithm
so the output will be the same.
---
.../Identity/Service/RegistrationMailService.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
index 9a839df00..5fac5c732 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php
@@ -227,6 +227,6 @@ private function getExpirationDateOfRegistration(DateTime $date): DateTime
{
return $date->add(
new DateInterval('P14D'),
- )->endOfDay();
+ );
}
}
From 7a61750cfc31677c81a9f95cfa9f84cbfa314b4c Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 12:46:35 +0100
Subject: [PATCH 51/89] Sync new monolog docker logging setup
---
config/packages/dev/monolog.yaml | 19 ------------
config/packages/dev_event_replay/monolog.yaml | 19 ------------
config/packages/monolog.yaml | 30 +++++++++++++++++++
config/packages/prod/monolog.yaml | 13 --------
config/packages/prod/monolog.yaml.docker | 12 --------
.../packages/prod_event_replay/monolog.yaml | 13 --------
config/packages/smoketest/monolog.yaml | 12 --------
.../smoketest_event_replay/monolog.yaml | 19 ------------
config/packages/test/monolog.yaml | 16 ----------
9 files changed, 30 insertions(+), 123 deletions(-)
delete mode 100644 config/packages/dev/monolog.yaml
delete mode 100644 config/packages/dev_event_replay/monolog.yaml
create mode 100644 config/packages/monolog.yaml
delete mode 100644 config/packages/prod/monolog.yaml
delete mode 100644 config/packages/prod/monolog.yaml.docker
delete mode 100644 config/packages/prod_event_replay/monolog.yaml
delete mode 100644 config/packages/smoketest/monolog.yaml
delete mode 100644 config/packages/smoketest_event_replay/monolog.yaml
delete mode 100644 config/packages/test/monolog.yaml
diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml
deleted file mode 100644
index 918208b8d..000000000
--- a/config/packages/dev/monolog.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: DEBUG # DEV setting: this means that all message of level DEBUG or higher are always logged
- #passthru_level: NOTICE # PROD setting this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: true
- main_syslog:
- type: syslog
- ident: stepup-middleware
- facility: user
- formatter: surfnet_stepup.monolog.json_formatter
- main_logfile:
- type: stream
- handler: logfile
- level: NOTICE
- path: "%kernel.logs_dir%/%kernel.environment%.log"
\ No newline at end of file
diff --git a/config/packages/dev_event_replay/monolog.yaml b/config/packages/dev_event_replay/monolog.yaml
deleted file mode 100644
index 918208b8d..000000000
--- a/config/packages/dev_event_replay/monolog.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: DEBUG # DEV setting: this means that all message of level DEBUG or higher are always logged
- #passthru_level: NOTICE # PROD setting this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: true
- main_syslog:
- type: syslog
- ident: stepup-middleware
- facility: user
- formatter: surfnet_stepup.monolog.json_formatter
- main_logfile:
- type: stream
- handler: logfile
- level: NOTICE
- path: "%kernel.logs_dir%/%kernel.environment%.log"
\ No newline at end of file
diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml
new file mode 100644
index 000000000..10bca89bc
--- /dev/null
+++ b/config/packages/monolog.yaml
@@ -0,0 +1,30 @@
+monolog:
+ handlers:
+ prod-signaler:
+ type: fingers_crossed
+ action_level: ERROR
+ passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
+ handler: main_syslog
+ bubble: false # if we handle it, nothing else should
+ channels: [ "!deprecation" ]
+ main_syslog:
+ type: stream
+ path: "php://stderr"
+ formatter: surfnet_stepup.monolog.json_formatter
+ channels: [ "!deprecation" ]
+
+when@dev: &override
+ monolog:
+ handlers:
+ main_syslog:
+ type: stream
+ path: php://stderr
+ level: error
+ channels: ["!event", "!doctrine", "!deprecation", "!console"]
+ console:
+ type: console
+ process_psr_3_messages: false
+ channels: ["!event", "!doctrine", "!deprecation", "!console"]
+when@test: *override
+when@smoketest: *override
+when@smoketest_event_replay: *override
diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml
deleted file mode 100644
index 7fcd08ebc..000000000
--- a/config/packages/prod/monolog.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: false # if we handle it, nothing else should
- main_syslog:
- type: syslog
- ident: stepup-middleware
- facility: user
- formatter: surfnet_stepup.monolog.json_formatter
diff --git a/config/packages/prod/monolog.yaml.docker b/config/packages/prod/monolog.yaml.docker
deleted file mode 100644
index f1a1e7e91..000000000
--- a/config/packages/prod/monolog.yaml.docker
+++ /dev/null
@@ -1,12 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: false # if we handle it, nothing else should
- main_syslog:
- type: stream
- path: "php://stderr"
- formatter: surfnet_stepup.monolog.json_formatter
diff --git a/config/packages/prod_event_replay/monolog.yaml b/config/packages/prod_event_replay/monolog.yaml
deleted file mode 100644
index 7fcd08ebc..000000000
--- a/config/packages/prod_event_replay/monolog.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: false # if we handle it, nothing else should
- main_syslog:
- type: syslog
- ident: stepup-middleware
- facility: user
- formatter: surfnet_stepup.monolog.json_formatter
diff --git a/config/packages/smoketest/monolog.yaml b/config/packages/smoketest/monolog.yaml
deleted file mode 100644
index f1a1e7e91..000000000
--- a/config/packages/smoketest/monolog.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: false # if we handle it, nothing else should
- main_syslog:
- type: stream
- path: "php://stderr"
- formatter: surfnet_stepup.monolog.json_formatter
diff --git a/config/packages/smoketest_event_replay/monolog.yaml b/config/packages/smoketest_event_replay/monolog.yaml
deleted file mode 100644
index 918208b8d..000000000
--- a/config/packages/smoketest_event_replay/monolog.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: DEBUG # DEV setting: this means that all message of level DEBUG or higher are always logged
- #passthru_level: NOTICE # PROD setting this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: true
- main_syslog:
- type: syslog
- ident: stepup-middleware
- facility: user
- formatter: surfnet_stepup.monolog.json_formatter
- main_logfile:
- type: stream
- handler: logfile
- level: NOTICE
- path: "%kernel.logs_dir%/%kernel.environment%.log"
\ No newline at end of file
diff --git a/config/packages/test/monolog.yaml b/config/packages/test/monolog.yaml
deleted file mode 100644
index 636b38c01..000000000
--- a/config/packages/test/monolog.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-monolog:
- handlers:
- prod-signaler:
- type: fingers_crossed
- action_level: ERROR
- passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
- handler: main_syslog
- bubble: false # if we handle it, nothing else should
- main_syslog:
- type: stream
- path: "php://stderr"
- formatter: surfnet_stepup.monolog.json_formatter
- console:
- type: "null"
- main_logfile:
- type: "null"
From 62f30421c7c60d541bbc72c8d933353d43d9e6af Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 13:03:25 +0100
Subject: [PATCH 52/89] Sync framework config setup
---
config/packages/framework.yaml | 17 +++++++++++++++++
config/packages/smoketest/framework.yaml | 6 ------
.../smoketest_event_replay/framework.yaml | 4 ----
config/packages/test/framework.yaml | 4 ----
4 files changed, 17 insertions(+), 14 deletions(-)
delete mode 100644 config/packages/smoketest/framework.yaml
delete mode 100644 config/packages/smoketest_event_replay/framework.yaml
delete mode 100644 config/packages/test/framework.yaml
diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml
index 0623aea2a..3d0071892 100644
--- a/config/packages/framework.yaml
+++ b/config/packages/framework.yaml
@@ -14,3 +14,20 @@ framework:
fragments: false
php_errors:
log: true
+
+when@dev:
+ framework:
+ router:
+ strict_requirements: true
+ profiler: { only_exceptions: false }
+
+when@smoketest: &testOverride
+ framework:
+ test: true
+ profiler:
+ collect: false
+ php_errors:
+ log: false # prevents user deprecated warnings
+
+when@test: *testOverride
+when@sometest_event_replay: *testOverride
\ No newline at end of file
diff --git a/config/packages/smoketest/framework.yaml b/config/packages/smoketest/framework.yaml
deleted file mode 100644
index 00dcd315f..000000000
--- a/config/packages/smoketest/framework.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-framework:
- test: true
- profiler:
- collect: false
- php_errors:
- log: false # prevents user deprecated warnings
diff --git a/config/packages/smoketest_event_replay/framework.yaml b/config/packages/smoketest_event_replay/framework.yaml
deleted file mode 100644
index 337675326..000000000
--- a/config/packages/smoketest_event_replay/framework.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-framework:
- test: ~
- profiler:
- collect: false
diff --git a/config/packages/test/framework.yaml b/config/packages/test/framework.yaml
deleted file mode 100644
index 3b4de93dd..000000000
--- a/config/packages/test/framework.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-framework:
- test: true
- profiler:
- collect: false
From 02989b045bc031974a0b1597192327d7668e49fd Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 13:04:07 +0100
Subject: [PATCH 53/89] Force phpunit in test mode by setting env
---
ci/qa/phpunit.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/ci/qa/phpunit.xml b/ci/qa/phpunit.xml
index 47db5e90b..2815bba19 100644
--- a/ci/qa/phpunit.xml
+++ b/ci/qa/phpunit.xml
@@ -12,6 +12,7 @@
+
From 7a9725f93793b5bb99ed6ea54a0418d5197ffa9a Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 13:13:52 +0100
Subject: [PATCH 54/89] Fix update configuration command
Don't use DI but public param instead in order
to run the tests which expect a constructor without
parameters.
---
.../Configuration/Command/UpdateConfigurationCommand.php | 9 ++-------
.../CommandHandler/ConfigurationCommandHandlerTest.php | 4 +++-
.../Controller/ConfigurationController.php | 3 ++-
.../Constraints/HasValidConfigurationStructure.php | 6 +++---
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
index b123e20e3..3551868fe 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
@@ -25,11 +25,6 @@
class UpdateConfigurationCommand extends AbstractCommand implements ManagementExecutable
{
- public function __construct(
- /**
- * @ManagementAssert\HasValidConfigurationStructure
- */
- public string $configuration
- ) {
- }
+ #[ManagementAssert\HasValidConfigurationStructure]
+ public string $configuration;
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
index 7e83cc716..4b38f694f 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
@@ -155,7 +155,9 @@ private function createUpdateCommand(array $configuration): UpdateConfigurationC
if (!is_string($encodedConfiguration)) {
throw new RuntimeException('The configuration could not be json_encoded');
}
- return new UpdateConfigurationCommand($encodedConfiguration);
+ $configuration = new UpdateConfigurationCommand();
+ $configuration->configuration = $encodedConfiguration;
+ return $configuration;
}
/**
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index 5b23a4abb..76ad545ea 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -36,7 +36,8 @@ public function __construct(
public function update(Request $request): JsonResponse
{
- $command = new UpdateConfigurationCommand($request->getContent());
+ $command = new UpdateConfigurationCommand();
+ $command->configuration = $request->getContent();
$command->UUID = (string)Uuid::uuid4();
return $this->handleCommand($request, $command);
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
index e045881f7..1dc578658 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Validator/Constraints/HasValidConfigurationStructure.php
@@ -1,5 +1,6 @@
Date: Thu, 7 Nov 2024 13:15:02 +0100
Subject: [PATCH 55/89] Fix NameId VO
So empty NameId's trigger an exception.
---
src/Surfnet/Stepup/Identity/Value/NameId.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Surfnet/Stepup/Identity/Value/NameId.php b/src/Surfnet/Stepup/Identity/Value/NameId.php
index c2953c70a..71ad0eafc 100644
--- a/src/Surfnet/Stepup/Identity/Value/NameId.php
+++ b/src/Surfnet/Stepup/Identity/Value/NameId.php
@@ -39,7 +39,7 @@ final class NameId implements JsonSerializable, Stringable
public function __construct(string $value)
{
- if (strlen($value) > self::MAX_LENGTH) {
+ if (strlen($value) > self::MAX_LENGTH || strlen($value) === 0) {
throw new InvalidArgumentException(
'Invalid argument type: maximum length for nameId exceeds configured length of ' . self::MAX_LENGTH,
);
From 358394ab7260adb0115d1706408d1e5964aee1e5 Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 13:15:32 +0100
Subject: [PATCH 56/89] Fix routes extension
Use .yaml instead of .yml so they are loaded.
---
config/routes/dev/{routes.yml => routes.yaml} | 0
config/routes/{routes.yml => routes.yaml} | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename config/routes/dev/{routes.yml => routes.yaml} (100%)
rename config/routes/{routes.yml => routes.yaml} (100%)
diff --git a/config/routes/dev/routes.yml b/config/routes/dev/routes.yaml
similarity index 100%
rename from config/routes/dev/routes.yml
rename to config/routes/dev/routes.yaml
diff --git a/config/routes/routes.yml b/config/routes/routes.yaml
similarity index 100%
rename from config/routes/routes.yml
rename to config/routes/routes.yaml
From 082b0bd33f034171ba0c012b9ce57dcb1bc87eb9 Mon Sep 17 00:00:00 2001
From: Bas
Date: Thu, 7 Nov 2024 14:30:53 +0100
Subject: [PATCH 57/89] Remove duplicate composer dependencies
---
composer.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/composer.json b/composer.json
index 81a356cd0..68a6dfbad 100644
--- a/composer.json
+++ b/composer.json
@@ -25,12 +25,10 @@
"broadway/event-store-dbal": "^0.6",
"doctrine/annotations": "^2.0",
"doctrine/doctrine-bundle": "^2.11",
- "doctrine/doctrine-fixtures-bundle": "^3.5",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^3.0",
"incenteev/composer-parameter-handler": "~2.0",
"jms/translation-bundle": "^2.2",
- "liip/test-fixtures-bundle": "^2.7",
"nelmio/security-bundle": "^3.1",
"openconext/monitor-bundle": "^4.1",
"pagerfanta/doctrine-orm-adapter": "*",
From c840078241747091b497ebc9919395a3349d7c53 Mon Sep 17 00:00:00 2001
From: Bas
Date: Mon, 11 Nov 2024 10:41:42 +0100
Subject: [PATCH 58/89] Add missing migration doc headers
---
.../Migrations/Version20141031144721.php | 16 ++++++++++++++++
.../Migrations/Version20141031163549.php | 16 ++++++++++++++++
.../Migrations/Version20141031164140.php | 16 ++++++++++++++++
.../Migrations/Version20141112093720.php | 16 ++++++++++++++++
.../Migrations/Version20141112094457.php | 16 ++++++++++++++++
.../Migrations/Version20141114095245.php | 16 ++++++++++++++++
.../Migrations/Version20141117230116.php | 16 ++++++++++++++++
.../Migrations/Version20141118114026.php | 16 ++++++++++++++++
.../Migrations/Version20141119093423.php | 16 ++++++++++++++++
.../Migrations/Version20141119113444.php | 16 ++++++++++++++++
.../Migrations/Version20141119113553.php | 16 ++++++++++++++++
.../Migrations/Version20141120150430.php | 16 ++++++++++++++++
.../Migrations/Version20141120152310.php | 16 ++++++++++++++++
.../Migrations/Version20141125154133.php | 16 ++++++++++++++++
.../Migrations/Version20141125154214.php | 15 +++++++++++++++
.../Migrations/Version20141125155001.php | 16 ++++++++++++++++
.../Migrations/Version20141128143908.php | 16 ++++++++++++++++
.../Migrations/Version20141128143946.php | 15 +++++++++++++++
.../Migrations/Version20141202121811.php | 16 ++++++++++++++++
.../Migrations/Version20141204140639.php | 16 ++++++++++++++++
.../Migrations/Version20141205112641.php | 16 ++++++++++++++++
.../Migrations/Version20141208121040.php | 16 ++++++++++++++++
.../Migrations/Version20141208162045.php | 16 ++++++++++++++++
.../Migrations/Version20141208172438.php | 16 ++++++++++++++++
.../Migrations/Version20141209150426.php | 15 +++++++++++++++
.../Migrations/Version20141210174213.php | 16 ++++++++++++++++
.../Migrations/Version20141215150518.php | 16 ++++++++++++++++
.../Migrations/Version20150217122017.php | 16 ++++++++++++++++
.../Migrations/Version20150225155343.php | 16 ++++++++++++++++
.../Migrations/Version20150305114932.php | 16 ++++++++++++++++
.../Migrations/Version20150305115030.php | 16 ++++++++++++++++
.../Migrations/Version20150305134846.php | 16 ++++++++++++++++
.../Migrations/Version20150312134629.php | 16 ++++++++++++++++
.../Migrations/Version20150312162849.php | 16 ++++++++++++++++
.../Migrations/Version20150330160809.php | 16 ++++++++++++++++
.../Migrations/Version20150407103950.php | 16 ++++++++++++++++
.../Migrations/Version20150408122247.php | 16 ++++++++++++++++
.../Migrations/Version20150409142404.php | 16 ++++++++++++++++
.../Migrations/Version20150422162952.php | 16 ++++++++++++++++
.../Migrations/Version20150428153351.php | 16 ++++++++++++++++
.../Migrations/Version20150428174400.php | 16 ++++++++++++++++
.../Migrations/Version20150501123735.php | 16 ++++++++++++++++
.../Migrations/Version20150504102420.php | 16 ++++++++++++++++
.../Migrations/Version20150507124421.php | 16 ++++++++++++++++
.../Migrations/Version20150508085838.php | 16 ++++++++++++++++
.../Migrations/Version20150518152006.php | 16 ++++++++++++++++
.../Migrations/Version20150522163053.php | 15 +++++++++++++++
.../Migrations/Version20150522164907.php | 16 ++++++++++++++++
.../Migrations/Version20150526152956.php | 16 ++++++++++++++++
.../Migrations/Version20150528154959.php | 16 ++++++++++++++++
.../Migrations/Version20150601154557.php | 16 ++++++++++++++++
.../Migrations/Version20150601154942.php | 16 ++++++++++++++++
.../Migrations/Version20150604143755.php | 16 ++++++++++++++++
.../Migrations/Version20150604143756.php | 16 ++++++++++++++++
.../Migrations/Version20150604143757.php | 16 ++++++++++++++++
.../Migrations/Version20150604143758.php | 16 ++++++++++++++++
.../Migrations/Version20150611105956.php | 16 ++++++++++++++++
.../Migrations/Version20150611163038.php | 16 ++++++++++++++++
.../Migrations/Version20150615114646.php | 16 ++++++++++++++++
.../Migrations/Version20150617141129.php | 16 ++++++++++++++++
.../Migrations/Version20150618121907.php | 16 ++++++++++++++++
.../Migrations/Version20160219133522.php | 16 ++++++++++++++++
.../Migrations/Version20160607142244.php | 16 ++++++++++++++++
.../Migrations/Version20160617163830.php | 16 ++++++++++++++++
.../Migrations/Version20160620090507.php | 16 ++++++++++++++++
.../Migrations/Version20160620153812.php | 16 ++++++++++++++++
.../Migrations/Version20160621112027.php | 16 ++++++++++++++++
.../Migrations/Version20160622100140.php | 16 ++++++++++++++++
.../Migrations/Version20160622160146.php | 16 ++++++++++++++++
.../Migrations/Version20160719090050.php | 16 ++++++++++++++++
.../Migrations/Version20160719090051.php | 16 ++++++++++++++++
.../Migrations/Version20160719090052.php | 16 ++++++++++++++++
.../Migrations/Version20170210140051.php | 16 ++++++++++++++++
.../Migrations/Version20170216085513.php | 16 ++++++++++++++++
.../Migrations/Version20171113123232.php | 16 ++++++++++++++++
.../Migrations/Version20180116091349.php | 16 ++++++++++++++++
.../Migrations/Version20180131150800.php | 16 ++++++++++++++++
.../Migrations/Version20180330094402.php | 16 ++++++++++++++++
.../Migrations/Version20180409100948.php | 16 ++++++++++++++++
.../Migrations/Version20180926144517.php | 16 ++++++++++++++++
.../Migrations/Version20181001082254.php | 16 ++++++++++++++++
.../Migrations/Version20181023151546.php | 16 ++++++++++++++++
.../Migrations/Version20181101103348.php | 16 ++++++++++++++++
.../Migrations/Version20190211163604.php | 16 ++++++++++++++++
.../Migrations/Version20200114161618.php | 16 ++++++++++++++++
.../Migrations/Version20200416135127.php | 16 ++++++++++++++++
.../Migrations/Version20210308092347.php | 17 +++++++++++++++++
.../Migrations/Version20210610131957.php | 17 +++++++++++++++++
.../Migrations/Version20220519134637.php | 17 +++++++++++++++++
.../Migrations/Version20221102143350.php | 17 +++++++++++++++++
90 files changed, 1440 insertions(+)
diff --git a/src/Surfnet/Migrations/Version20141031144721.php b/src/Surfnet/Migrations/Version20141031144721.php
index 1e490ff0d..3e3dd53d9 100644
--- a/src/Surfnet/Migrations/Version20141031144721.php
+++ b/src/Surfnet/Migrations/Version20141031144721.php
@@ -1,5 +1,21 @@
Date: Mon, 11 Nov 2024 14:48:58 +0100
Subject: [PATCH 59/89] Fix broken tests
---
.../Stepup/Configuration/Configuration.php | 2 +-
.../Value/AuthorizedInstitutionCollection.php | 10 ++--
.../ConfiguredInstitutionControllerTest.php | 12 +++--
.../Tests/Endpoint/SraaControllerTest.php | 16 +++---
.../Request/InstitutionParamConverterTest.php | 2 +-
.../Command/AbstractCommand.php | 2 +-
.../Command/UpdateConfigurationCommand.php | 2 +-
.../ConfigurationCommandHandlerTest.php | 1 -
...itutionConfigurationCommandHandlerTest.php | 1 -
.../EventHandling/BufferedEventBusTest.php | 15 +++---
.../IdentityCommandHandlerTest.php | 42 +++-------------
.../RightToBeForgottenCommandHandlerTest.php | 44 +++++-----------
.../Entity/SamlEntityRepository.php | 2 +-
src/Surfnet/StepupMiddleware/Kernel.php | 5 --
.../ConfigurationControllerTest.php | 13 +++--
...InstitutionConfigurationControllerTest.php | 15 +++---
.../invalid_configuration/invalid_idps.php | 50 -------------------
.../Fixtures/invalid_configuration/null.php | 22 --------
.../Resources/config/console_commands.yml | 2 +-
19 files changed, 65 insertions(+), 193 deletions(-)
delete mode 100644 src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_idps.php
delete mode 100644 src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/null.php
diff --git a/src/Surfnet/Stepup/Configuration/Configuration.php b/src/Surfnet/Stepup/Configuration/Configuration.php
index aa1490cdc..5981eb8bc 100644
--- a/src/Surfnet/Stepup/Configuration/Configuration.php
+++ b/src/Surfnet/Stepup/Configuration/Configuration.php
@@ -38,7 +38,7 @@ class Configuration extends EventSourcedAggregateRoot implements ConfigurationIn
/**
* @var array
*/
- private array $configuration;
+ private array|null $configuration = null;
public static function create(): self
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
index ea252bff8..eef708ae3 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php
@@ -44,18 +44,18 @@ public static function from(
/** @var string $institution */
foreach ($raInstitutions as $institution) {
- $collection->authorizations[$institution][] = AuthorityRole::ROLE_RA;
+ $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RA;
}
if ($raaInstitutions instanceof InstitutionCollection) {
/** @var string $institution */
foreach ($raaInstitutions as $institution) {
// Override existing lower role
- if (isset($collection->authorizations[$institution])
- && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[$institution])
+ if (isset($collection->authorizations[(string)$institution])
+ && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string)$institution])
) {
- $collection->authorizations[$institution] = [];
+ $collection->authorizations[(string)$institution] = [];
}
- $collection->authorizations[$institution][] = AuthorityRole::ROLE_RAA;
+ $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RAA;
}
}
return $collection;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
index ca9b22330..c55d85d92 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/ConfiguredInstitutionControllerTest.php
@@ -21,6 +21,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Generator;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool;
use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
@@ -44,19 +45,20 @@ class ConfiguredInstitutionControllerTest extends WebTestCase
*/
private string $endpoint;
- private ORMSqliteDatabaseTool $databaseTool;
+ private AbstractDatabaseTool $databaseTool;
public function setUp(): void
{
self::ensureKernelShutdown();
- $this->client = static::createClient();
- $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
- if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->client = static::createClient();
+ $databaseTool = $this->client->getContainer()->get(DatabaseToolCollection::class);
+ if (!$databaseTool instanceof DatabaseToolCollection) {
$this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
}
- $this->databaseTool = $tool;
+ $this->databaseTool = $databaseTool->get();
+
$registry = static::getContainer()->get(ManagerRegistry::class);
assert($registry instanceof ManagerRegistry, 'ManagerRegistry could not be fetched from the container');
$this->databaseTool->setRegistry($registry);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
index 45e2ad78b..0bef81039 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Endpoint/SraaControllerTest.php
@@ -20,10 +20,9 @@
use Generator;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool;
use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
-use Liip\TestFixturesBundle\Test\FixturesTrait;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
-use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
@@ -42,19 +41,20 @@ class SraaControllerTest extends WebTestCase
private string $endpoint;
- private ORMSqliteDatabaseTool $databaseTool;
+ private AbstractDatabaseTool $databaseTool;
public function setUp(): void
{
- $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
- if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->client = static::createClient();
+ $databaseTool = $this->client->getContainer()->get(DatabaseToolCollection::class);
+ if (!$databaseTool instanceof DatabaseToolCollection) {
$this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
}
- $this->databaseTool = $tool;
+ $this->databaseTool = $databaseTool->get();
+
// Initialises schema.
$this->databaseTool->loadFixtures([]);
- // Initialises schema.
- $this->client = static::createClient();
+
$passwordSs = $this->client->getKernel()->getContainer()->getParameter('selfservice_api_password');
$passwordRa = $this->client->getKernel()->getContainer()->getParameter('registration_authority_api_password');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
index 5649a960e..1edd322f8 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/InstitutionParamConverterTest.php
@@ -86,7 +86,7 @@ private function mockQuery(bool|string $returnValue): ParameterBag&MockInterface
$query
->shouldReceive('get')
->once()
- ->with('institution', false)
+ ->with('institution')
->andReturn($returnValue);
return $query;
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
index 214817674..71cb57a87 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Command/AbstractCommand.php
@@ -33,7 +33,7 @@ abstract class AbstractCommand implements Command
#[Assert\NotBlank]
#[Assert\Type(type: 'string')]
#[Assert\Regex(pattern: '~^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$~i')]
- public string $UUID;
+ public string $UUID = "";
public function __toString(): string
{
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
index 3551868fe..19694ca35 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Configuration/Command/UpdateConfigurationCommand.php
@@ -26,5 +26,5 @@ class UpdateConfigurationCommand extends AbstractCommand implements ManagementEx
{
#[ManagementAssert\HasValidConfigurationStructure]
- public string $configuration;
+ public string $configuration = "";
}
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
index 4b38f694f..3c900aeb1 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/ConfigurationCommandHandlerTest.php
@@ -39,7 +39,6 @@
final class ConfigurationCommandHandlerTest extends CommandHandlerTest
{
- use MockeryPHPUnitIntegration;
/**
* Shorthand for fixed Configuration ID.
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
index aa4915d56..24d519d96 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Configuration/CommandHandler/InstitutionConfigurationCommandHandlerTest.php
@@ -68,7 +68,6 @@
class InstitutionConfigurationCommandHandlerTest extends CommandHandlerTest
{
- use MockeryPHPUnitIntegration;
/**
* @test
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
index 2ea525393..b6ef9e995 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/EventHandling/BufferedEventBusTest.php
@@ -42,9 +42,8 @@ public function it_buffers_events(): void
{
$event = $this->createDummyDomainMessage(null);
/** @var EventListener&MockInterface $listener */
- $listener = m::mock(EventListener::class)
- ->shouldNotHaveReceived('handle')
- ->getMock();
+ $listener = m::mock(EventListener::class);
+ $listener->shouldNotHaveReceived('handle');
$bus = new BufferedEventBus($this->getDummyEntityManager());
$bus->subscribe($listener);
@@ -63,9 +62,8 @@ public function it_flushes_events(): void
{
$event = $this->createDummyDomainMessage(null);
/** @var EventListener&MockInterface $listener */
- $listener = m::mock(EventListener::class)
- ->shouldReceive('handle')->once()->with($event)
- ->getMock();
+ $listener = m::mock(EventListener::class);
+ $listener->shouldReceive('handle')->once()->with($event);
$bus = new BufferedEventBus($this->getDummyEntityManager());
$bus->subscribe($listener);
@@ -86,9 +84,8 @@ public function flushing_succesfully_empties_the_buffer_to_prevent_flushing_the_
{
$event = $this->createDummyDomainMessage(null);
/** @var EventListener&MockInterface $listener */
- $listener = m::mock(EventListener::class)
- ->shouldReceive('handle')->once()->with($event)
- ->getMock();
+ $listener = m::mock(EventListener::class);
+ $listener->shouldReceive('handle')->once()->with($event);
$bus = new BufferedEventBus($this->getDummyEntityManager());
$bus->subscribe($listener);
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
index ff7cf5bc5..3ed084f64 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php
@@ -64,6 +64,8 @@
use Surfnet\Stepup\Identity\Value\TimeFrame;
use Surfnet\Stepup\Identity\Value\U2fKeyHandle;
use Surfnet\Stepup\Identity\Value\YubikeyPublicId;
+use Surfnet\Stepup\Token\TokenGenerator;
+use Surfnet\StepupBundle\Security\OtpGenerator;
use Surfnet\StepupBundle\Service\LoaResolutionService;
use Surfnet\StepupBundle\Service\SecondFactorTypeService;
use Surfnet\StepupBundle\Value\Loa;
@@ -243,9 +245,7 @@ public function a_yubikey_possession_can_be_proven(): void
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
+ m::mock('alias:'.TokenGenerator::class)
->shouldReceive('generateNonce')->once()->andReturn('nonce');
$id = new IdentityId(self::uuid());
@@ -309,11 +309,6 @@ public function a_yubikey_possession_cannot_be_proven_if_the_second_factor_is_no
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
- ->shouldReceive('generateNonce')->once()->andReturn('nonce');
-
$id = new IdentityId(self::uuid());
$institution = new Institution('A Corp.');
$nameId = new NameId(md5(__METHOD__));
@@ -420,9 +415,7 @@ public function a_phone_possession_can_be_proven(): void
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
+ m::mock('alias:'.TokenGenerator::class)
->shouldReceive('generateNonce')->once()->andReturn('nonce');
$id = new IdentityId(self::uuid());
@@ -486,11 +479,6 @@ public function a_phone_possession_cannot_be_proven_if_the_second_factor_is_not_
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
- ->shouldReceive('generateNonce')->once()->andReturn('nonce');
-
$id = new IdentityId(self::uuid());
$institution = new Institution('A Corp.');
$nameId = new NameId(md5(__METHOD__));
@@ -537,11 +525,8 @@ public function a_gssf_possession_can_be_proven(): void
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
-
$nonce = 'nonce';
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
+ m::mock('alias:'.TokenGenerator::class)
->shouldReceive('generateNonce')->once()->andReturn($nonce);
$identityId = new IdentityId(self::uuid());
@@ -617,13 +602,6 @@ public function a_gssf_possession_can_not_be_proven_if_the_second_factor_is_not_
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
-
- $nonce = 'nonce';
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
- ->shouldReceive('generateNonce')->once()->andReturn($nonce);
-
$identityId = new IdentityId(self::uuid());
$institution = new Institution('Surfnet');
$nameId = new NameId(md5(__METHOD__));
@@ -672,9 +650,7 @@ public function a_u2f_device_possession_can_be_proven(): void
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
+ m::mock('alias:'.TokenGenerator::class)
->shouldReceive('generateNonce')->once()->andReturn('nonce');
$id = new IdentityId(self::uuid());
@@ -738,11 +714,6 @@ public function a_u2f_device_possession_cannot_be_proven_if_the_second_factor_is
{
DateTimeHelper::setCurrentTime(new DateTime(new CoreDateTime('@12345')));
- m::mock('alias:Surfnet\StepupBundle\Security\OtpGenerator')
- ->shouldReceive('generate')->once()->andReturn('regcode');
- m::mock('alias:Surfnet\Stepup\Token\TokenGenerator')
- ->shouldReceive('generateNonce')->once()->andReturn('nonce');
-
$id = new IdentityId(self::uuid());
$institution = new Institution('A Corp.');
$nameId = new NameId(md5(__METHOD__));
@@ -1329,6 +1300,7 @@ public function a_second_factor_cannot_be_vetted_without_a_secure_enough_vetted_
$command->secondFactorIdentifier = '00028278';
$command->documentNumber = 'NH9392';
$command->identityVerified = true;
+ $command->provePossessionSkipped = false;
$authorityId = new IdentityId($command->authorityId);
$authorityInstitution = new Institution('Wazoo');
diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
index 5594f4902..a24314892 100644
--- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
+++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/RightToBeForgottenCommandHandlerTest.php
@@ -45,6 +45,7 @@
use Surfnet\Stepup\Identity\Value\RegistrationAuthorityRole;
use Surfnet\Stepup\Identity\Value\SecondFactorId;
use Surfnet\Stepup\Identity\Value\YubikeyPublicId;
+use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\SraaRepository;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Exception\RuntimeException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\ForgetIdentityCommand;
@@ -113,7 +114,7 @@ public function an_identity_can_be_forgotten(): void
->shouldReceive('findOneByNameIdAndInstitution')
->once()
->with(Matchers::equalTo($nameId), Matchers::equalTo($institution))
- ->andReturn((object)['id' => $identityId->getIdentityId()]);
+ ->andReturn($this->createIdentity($identityId->getIdentityId()));
$this->sensitiveDataService
->shouldReceive('forgetSensitiveData')
@@ -175,12 +176,7 @@ public function an_identity_may_not_be_forgotten_twice(): void
->shouldReceive('findOneByNameIdAndInstitution')
->once()
->with(Matchers::equalTo($nameId), Matchers::equalTo($institution))
- ->andReturn((object)['id' => $identityId->getIdentityId()]);
-
- $this->sensitiveDataService
- ->shouldReceive('forgetSensitiveData')
- ->once()
- ->with(Matchers::equalTo($identityId));
+ ->andReturn($this->createIdentity($identityId->getIdentityId()));
$this->sraaRepository->shouldReceive('contains')->once()->with(Matchers::equalTo($nameId))->andReturn(false);
@@ -235,12 +231,7 @@ public function an_ra_cannot_be_forgotten(): void
->shouldReceive('findOneByNameIdAndInstitution')
->once()
->with(Matchers::equalTo($nameId), Matchers::equalTo($institution))
- ->andReturn((object)['id' => $identityId->getIdentityId()]);
-
- $this->sensitiveDataService
- ->shouldReceive('forgetSensitiveData')
- ->once()
- ->with(Matchers::equalTo($identityId));
+ ->andReturn($this->createIdentity($identityId->getIdentityId()));
$this->sraaRepository->shouldReceive('contains')->once()->with(Matchers::equalTo($nameId))->andReturn(false);
@@ -302,12 +293,7 @@ public function an_raa_cannot_be_forgotten(): void
->shouldReceive('findOneByNameIdAndInstitution')
->once()
->with(Matchers::equalTo($nameId), Matchers::equalTo($institution))
- ->andReturn((object)['id' => $identityId->getIdentityId()]);
-
- $this->sensitiveDataService
- ->shouldReceive('forgetSensitiveData')
- ->once()
- ->with(Matchers::equalTo($identityId));
+ ->andReturn($this->createIdentity($identityId->getIdentityId()));
$this->sraaRepository->shouldReceive('contains')->once()->with(Matchers::equalTo($nameId))->andReturn(false);
@@ -354,7 +340,7 @@ public function an_raa_cannot_be_forgotten(): void
* @group command-handler
* @group sensitive-data
*/
- public function an_sraa_cannae_be_forgotten(): void
+ public function an_sraa_cannot_be_forgotten(): void
{
$this->expectExceptionMessage("Cannot forget an identity that is currently accredited as an SRAA");
$this->expectException(RuntimeException::class);
@@ -366,17 +352,6 @@ public function an_sraa_cannae_be_forgotten(): void
$email = new Email('e.kuopio@hy.fi');
$locale = new Locale('fi_FI');
- $this->apiIdentityRepository
- ->shouldReceive('findOneByNameIdAndInstitution')
- ->once()
- ->with(Matchers::equalTo($nameId), Matchers::equalTo($institution))
- ->andReturn((object)['id' => $identityId->getIdentityId()]);
-
- $this->sensitiveDataService
- ->shouldReceive('forgetSensitiveData')
- ->once()
- ->with(Matchers::equalTo($identityId));
-
$this->sraaRepository->shouldReceive('contains')->once()->with(Matchers::equalTo($nameId))->andReturn(true);
$command = new ForgetIdentityCommand();
@@ -407,4 +382,11 @@ public function an_sraa_cannae_be_forgotten(): void
])
->when($command);
}
+
+ private function createIdentity(string $identityId): Identity
+ {
+ $identity = new Identity();
+ $identity->id = $identityId;
+ return $identity;
+ }
}
diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
index f1d5938f7..5f9a83492 100644
--- a/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
+++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Entity/SamlEntityRepository.php
@@ -73,7 +73,7 @@ private function removeAllOfType(string $type): void
$this
->getEntityManager()
->createQuery(
- 'DELETE FROM SurfnetStepupMiddlewareGatewayBundle:SamlEntity se WHERE se.type = :type',
+ 'DELETE FROM Surfnet\StepupMiddleware\GatewayBundle\Entity\SamlEntity se WHERE se.type = :type',
)
->execute(['type' => $type]);
}
diff --git a/src/Surfnet/StepupMiddleware/Kernel.php b/src/Surfnet/StepupMiddleware/Kernel.php
index 3446340f3..388440656 100644
--- a/src/Surfnet/StepupMiddleware/Kernel.php
+++ b/src/Surfnet/StepupMiddleware/Kernel.php
@@ -19,12 +19,7 @@
namespace Surfnet\StepupMiddleware;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
-use Symfony\Component\Config\Loader\LoaderInterface;
-use Symfony\Component\Config\Resource\FileResource;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
-use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
-use const PHP_VERSION_ID;
class Kernel extends BaseKernel
{
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
index 27e344c65..3ca1fd63c 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/ConfigurationControllerTest.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Tests\Controller;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool;
use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
@@ -35,20 +36,18 @@ class ConfigurationControllerTest extends WebTestCase
private string $passwordRo;
- private ORMSqliteDatabaseTool $databaseTool;
+ private AbstractDatabaseTool $databaseTool;
public function setUp(): void
{
- $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
- if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->client = static::createClient();
+ $databaseTool = $this->client->getContainer()->get(DatabaseToolCollection::class);
+ if (!$databaseTool instanceof DatabaseToolCollection) {
$this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
}
- $this->databaseTool = $tool;
-
+ $this->databaseTool = $databaseTool->get();
// Initialises schema.
$this->databaseTool->loadFixtures([]);
- // Initialises schema.
- $this->client = static::createClient();
$managementPassword = $this->client->getKernel()->getContainer()->getParameter('management_password');
if (!is_string($managementPassword)) {
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
index f1c0e831b..427124229 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Controller/InstitutionConfigurationControllerTest.php
@@ -19,6 +19,7 @@
namespace Surfnet\StepupMiddleware\ManagementBundle\Tests\Controller;
use Liip\TestFixturesBundle\Services\DatabaseToolCollection;
+use Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool;
use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
@@ -36,20 +37,18 @@ class InstitutionConfigurationControllerTest extends WebTestCase
private string $passwordRo;
- private ORMSqliteDatabaseTool $databaseTool;
+ private AbstractDatabaseTool $databaseTool;
public function setUp(): void
{
- $tool = static::getContainer()->get(ORMSqliteDatabaseTool::class);
- if (!$tool instanceof ORMSqliteDatabaseTool) {
+ $this->client = static::createClient();
+ $databaseTool = $this->client->getContainer()->get(DatabaseToolCollection::class);
+ if (!$databaseTool instanceof DatabaseToolCollection) {
$this->fail('Unable to grab the ORMSqliteDatabaseTool from the container');
}
- $this->databaseTool = $tool;
-
+ $this->databaseTool = $databaseTool->get();
// Initialises schema.
- $this->databaseTool->loadFixtures();
- // Initialises schema.
- $this->client = static::createClient();
+ $this->databaseTool->loadFixtures([]);
$managementPassword = $this->client->getKernel()->getContainer()->getParameter('management_password');
if (!is_string($managementPassword)) {
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_idps.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_idps.php
deleted file mode 100644
index 4d54571d7..000000000
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_idps.php
+++ /dev/null
@@ -1,50 +0,0 @@
- 'gateway.identity_providers',
- 'configuration' => [
- 'gateway' => [
- 'identity_providers' => 9,
- 'service_providers' => [
- [
- "entity_id" => "https://entity.tld/id",
- "public_key" => "MIIE...",
- "acs" => ["https://entity.tld/consume-assertion"],
- "loa" => [
- "__default__" => "https://entity.tld/authentication/loa2",
- ],
- "second_factor_only" => false,
- "second_factor_only_nameid_patterns" => [],
- "assertion_encryption_enabled" => false,
- "blacklisted_encryption_algorithms" => [],
- ],
- ],
- ],
- 'sraa' => ['20394-4320423-439248324'],
- 'email_templates' => [
- 'confirm_email' => ['en_GB' => 'Verify {{ commonName }}'],
- 'registration_code_with_ras' => ['en_GB' => 'Code {{ commonName }}'],
- 'registration_code_with_ra_locations' => ['en_GB' => 'Code {{ commonName }}'],
- 'vetted' => ['en_GB' => 'Vetted {{ commonName }}'],
- 'second_factor_revoked' => ['en_GB' => 'Revoked token for {{ commonName }}'],
- 'second_factor_verification_reminder_with_ras' => ['en_GB' => 'Code {{ commonName }}'],
- 'second_factor_verification_reminder_with_ra_locations' => ['en_GB' => 'Code {{ commonName }}'],
- ],
- ],
-];
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/null.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/null.php
deleted file mode 100644
index 4acd4e5ab..000000000
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/null.php
+++ /dev/null
@@ -1,22 +0,0 @@
- '(root)',
- 'configuration' => null,
-];
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
index 64629028d..a3cf334cf 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Resources/config/console_commands.yml
@@ -30,7 +30,7 @@ services:
- { name: 'console.command', command: 'middleware:event:replay' }
arguments:
- "@middleware.event_replay.event_stream_replayer"
- - "%app_env%"
+ - '%env(APP_ENV)%'
Surfnet\StepupMiddleware\MiddlewareBundle\Console\Command\BootstrapIdentityWithYubikeySecondFactorCommand:
tags:
From cacf2a882e8541c7f13f067e87c03c77902efea5 Mon Sep 17 00:00:00 2001
From: Bas
Date: Mon, 11 Nov 2024 14:49:36 +0100
Subject: [PATCH 60/89] Fix deprecations while fixing broken tests
---
config/openconext/parameters.yaml.dist | 2 +-
.../MiddlewareBundle/Service/DBALConnectionHelper.php | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/config/openconext/parameters.yaml.dist b/config/openconext/parameters.yaml.dist
index a54d3723a..5d5a233a6 100644
--- a/config/openconext/parameters.yaml.dist
+++ b/config/openconext/parameters.yaml.dist
@@ -18,7 +18,7 @@ parameters:
# The database server version is used in the dbal configuration and is required to prevent issues when the database
# connection is booted. See https://github.com/doctrine/DoctrineBundle/issues/351 for more details on this.
# Also see: https://symfony.com/doc/current/reference/configuration/doctrine.html#doctrine-dbal-configuration
- database_server_version: mariadb-10.0.38
+ database_server_version: 10.0.38-MariaDB
database_middleware_name: middleware
database_middleware_user: middleware_user
database_middleware_password: middleware_secret
diff --git a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
index 05e60e10f..a2abed8a6 100644
--- a/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
+++ b/src/Surfnet/StepupMiddleware/MiddlewareBundle/Service/DBALConnectionHelper.php
@@ -38,6 +38,13 @@ public function __construct(array $connections)
if (!$connection instanceof Connection) {
throw InvalidArgumentException::invalidType(Connection::class, 'connection', $connection);
}
+ if (!$connection->getDatabasePlatform()->supportsSavepoints()) {
+ throw new InvalidArgumentException(sprintf(
+ "Connection for database '%s' does not support nested savepoints",
+ $connection->getDatabase()
+ ));
+ }
+ $connection->setNestTransactionsWithSavepoints(true);
}
$this->connections = $connections;
From 42abdeff463e64bcf5b704bb319337c0a1d50261 Mon Sep 17 00:00:00 2001
From: Bas
Date: Mon, 11 Nov 2024 16:03:55 +0100
Subject: [PATCH 61/89] Fix role authentication deprecated or logic
---
config/packages/framework.yaml | 2 +
.../Controller/AbstractController.php | 41 +++++++++++++++++++
.../Controller/AuditLogController.php | 4 +-
.../Controller/AuthorizationController.php | 2 +-
.../Controller/CommandController.php | 4 +-
.../ConfiguredInstitutionController.php | 4 +-
.../Controller/DeprovisionController.php | 6 +--
.../Controller/IdentityController.php | 8 ++--
...titutionConfigurationOptionsController.php | 4 +-
.../Controller/ProfileController.php | 4 +-
.../Controller/RaCandidateController.php | 6 +--
.../ApiBundle/Controller/RaController.php | 4 +-
.../Controller/RaListingController.php | 6 +--
.../Controller/RaLocationController.php | 6 +--
.../Controller/RaSecondFactorController.php | 6 +--
.../Controller/RecoveryTokenController.php | 6 +--
.../ApiBundle/Controller/SraaController.php | 6 +--
.../UnverifiedSecondFactorController.php | 6 +--
.../VerifiedSecondFactorController.php | 10 ++---
.../VettedSecondFactorController.php | 6 +--
.../Controller/VettingTypeHintController.php | 4 +-
.../Controller/ConfigurationController.php | 2 +
.../InstitutionConfigurationController.php | 4 +-
.../RightToBeForgottenController.php | 2 +-
.../Controller/WhitelistController.php | 6 +--
25 files changed, 102 insertions(+), 57 deletions(-)
create mode 100644 src/Surfnet/StepupMiddleware/ApiBundle/Controller/AbstractController.php
diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml
index 3d0071892..2627cc5e7 100644
--- a/config/packages/framework.yaml
+++ b/config/packages/framework.yaml
@@ -28,6 +28,8 @@ when@smoketest: &testOverride
collect: false
php_errors:
log: false # prevents user deprecated warnings
+ session:
+ storage_factory_id: session.storage.factory.mock_file
when@test: *testOverride
when@sometest_event_replay: *testOverride
\ No newline at end of file
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AbstractController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AbstractController.php
new file mode 100644
index 000000000..05a29358a
--- /dev/null
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AbstractController.php
@@ -0,0 +1,41 @@
+isGranted($role, $subject)) {
+ return;
+ }
+ }
+
+ throw $this->createAccessDeniedException($message);
+ }
+ parent::denyAccessUnlessGranted($attribute, $subject, $message);
+ }
+}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
index 7b13b7a9d..05c3875eb 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuditLogController.php
@@ -24,7 +24,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\SecondFactorAuditLogQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\AuditLogService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
final class AuditLogController extends AbstractController
@@ -36,7 +36,7 @@ public function __construct(
public function secondFactorAuditLog(Request $request, Institution $institution): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$identityId = $request->get('identityId');
if (empty($identityId)) {
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
index 003b4a559..dd824d7c6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/AuthorizationController.php
@@ -21,7 +21,7 @@
use Surfnet\Stepup\Identity\Value\IdentityId;
use Surfnet\StepupMiddleware\ApiBundle\Authorization\Service\AuthorizationService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonAuthorizationResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
class AuthorizationController extends AbstractController
{
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
index 26fc80e3f..82616a76f 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/CommandController.php
@@ -31,7 +31,7 @@
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\CreateIdentityCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command\UpdateIdentityCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\TransactionAwarePipeline;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -54,7 +54,7 @@ public function __construct(
public function handle(AbstractCommand $command, Metadata $metadata, Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS']);
$this->logger->notice(sprintf('Received request to process Command "%s"', $command));
$this->metadataEnricher->setMetadata($metadata);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ConfiguredInstitutionController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ConfiguredInstitutionController.php
index f1243c34e..ad5cd715a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ConfiguredInstitutionController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ConfiguredInstitutionController.php
@@ -19,7 +19,7 @@
namespace Surfnet\StepupMiddleware\ApiBundle\Controller;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\ConfiguredInstitutionService;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
class ConfiguredInstitutionController extends AbstractController
@@ -31,7 +31,7 @@ public function __construct(
public function collection(): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$allListings = $this->configuredInstitutionService->getAllAsInstitution();
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
index fd827869d..08db563fe 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/DeprovisionController.php
@@ -22,7 +22,7 @@
use Surfnet\Stepup\Exception\DomainException;
use Surfnet\Stepup\Helper\UserDataFormatterInterface;
use Surfnet\StepupMiddleware\ApiBundle\Service\DeprovisionServiceInterface;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
class DeprovisionController extends AbstractController
@@ -35,7 +35,7 @@ public function __construct(
public function deprovision(string $collabPersonId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_DEPROVISION']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_DEPROVISION']);
$errors = [];
try {
$userData = $this->deprovisionService->readUserData($collabPersonId);
@@ -56,7 +56,7 @@ public function deprovision(string $collabPersonId): JsonResponse
public function dryRun(string $collabPersonId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_DEPROVISION']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_DEPROVISION']);
$errors = [];
try {
$userData = $this->deprovisionService->readUserData($collabPersonId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
index b84e47489..d4691875c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php
@@ -24,7 +24,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\IdentityService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonNotFoundResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -38,7 +38,7 @@ public function __construct(
public function get(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$identity = $this->identityService->find($id);
@@ -51,7 +51,7 @@ public function get(string $id): JsonResponse
public function collection(Request $request, Institution $institution): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$query = new IdentityQuery();
$query->institution = $institution;
@@ -67,7 +67,7 @@ public function collection(Request $request, Institution $institution): JsonColl
public function getRegistrationAuthorityCredentials(string $identityId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$identityService = $this->identityService;
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
index bcdc90f6f..c4976bff0 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/InstitutionConfigurationOptionsController.php
@@ -23,7 +23,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\AllowedSecondFactorListService;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\InstitutionAuthorizationService;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\InstitutionConfigurationOptionsService;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -38,7 +38,7 @@ public function __construct(
public function getForInstitution(string $institutionName): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_SS', 'ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_SS', 'ROLE_RA', 'ROLE_READ']);
$institution = new Institution($institutionName);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
index 0a2c6e401..9ec1a7629 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php
@@ -20,7 +20,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\ProfileService;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Value\Profile;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -35,7 +35,7 @@ public function __construct(
public function get(Request $request, string $identityId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
// Is the actor allowed to view the profile page?
$actorId = $request->get('actorId');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
index 06adaead9..4d34013e6 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php
@@ -24,7 +24,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaCandidateQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RaCandidateService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -43,7 +43,7 @@ public function __construct(
*/
public function search(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$actorId = new IdentityId($request->get('actorId'));
@@ -71,7 +71,7 @@ public function search(Request $request): JsonCollectionResponse
*/
public function get(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$actorId = new IdentityId($request->get('actorId'));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaController.php
index 3509aa0d1..08afa1f4a 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaController.php
@@ -21,7 +21,7 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RaListingService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
class RaController extends AbstractController
{
@@ -32,7 +32,7 @@ public function __construct(
public function list(Institution $institution): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_SS', 'ROLE_READ']);
$registrationAuthorityCredentials = $this->raListingService->listRegistrationAuthoritiesFor($institution);
$count = count($registrationAuthorityCredentials);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
index fccbd478e..8e7760081 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaListingController.php
@@ -25,7 +25,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaListingQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RaListingService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -40,7 +40,7 @@ public function __construct(
public function get(Request $request, string $identityId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$actorId = new IdentityId($request->get('actorId'));
$institution = new Institution($request->get('institution'));
@@ -68,7 +68,7 @@ public function get(Request $request, string $identityId): JsonResponse
*/
public function search(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$actorId = new IdentityId($request->get('actorId'));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
index ade76efdd..b27ee7750 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaLocationController.php
@@ -23,7 +23,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Query\RaLocationQuery;
use Surfnet\StepupMiddleware\ApiBundle\Configuration\Service\RaLocationService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -36,7 +36,7 @@ public function __construct(
public function search(Request $request, Institution $institution): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$query = new RaLocationQuery();
$query->institution = $institution;
@@ -51,7 +51,7 @@ public function search(Request $request, Institution $institution): JsonCollecti
public function get(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$raLocationId = new RaLocationId($request->get('raLocationId'));
$raLocation = $this->raLocationService->findByRaLocationId($raLocationId);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
index 3cba5462d..c8e84d4f5 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php
@@ -24,7 +24,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RaSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RaSecondFactorService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -38,7 +38,7 @@ public function __construct(
public function collection(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$query = $this->buildRaSecondFactorQuery($request);
@@ -51,7 +51,7 @@ public function collection(Request $request): JsonCollectionResponse
public function export(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$query = $this->buildRaSecondFactorQuery($request);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
index de32a08c2..db83e35fa 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
@@ -27,7 +27,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\RecoveryTokenQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\RecoveryTokenService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -47,7 +47,7 @@ public function __construct(
public function get(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(sprintf('Received request to get recovery token: %s', $id));
try {
@@ -60,7 +60,7 @@ public function get(string $id): JsonResponse
public function collection(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(
sprintf('Received search request for recovery tokens with params: %s', $request->getQueryString()),
);
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
index 8bebfb399..a410fde6c 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/SraaController.php
@@ -21,7 +21,7 @@
use Surfnet\Stepup\Identity\Value\NameId;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\SraaService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonNotFoundResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
class SraaController extends AbstractController
@@ -36,7 +36,7 @@ public function __construct(private readonly SraaService $sraaService)
*/
public function get(string $nameId): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$sraa = $this->sraaService->findByNameId(new NameId($nameId));
@@ -49,7 +49,7 @@ public function get(string $nameId): JsonResponse
public function list(): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
return new JsonResponse($this->sraaService->findAll());
}
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
index 23247b188..8091a7855 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/UnverifiedSecondFactorController.php
@@ -23,7 +23,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\UnverifiedSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\SecondFactorService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -37,7 +37,7 @@ public function __construct(
public function get(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$secondFactor = $this->secondFactorService->findUnverified(new SecondFactorId($id));
@@ -50,7 +50,7 @@ public function get(string $id): JsonResponse
public function collection(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$query = new UnverifiedSecondFactorQuery();
$query->identityId = $request->get('identityId');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
index 66c32cf3b..6fe3b9b2e 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VerifiedSecondFactorController.php
@@ -29,7 +29,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\VerifiedSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\SecondFactorService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -48,7 +48,7 @@ public function __construct(
public function get(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$secondFactor = $this->secondFactorService->findVerified(new SecondFactorId($id));
@@ -61,7 +61,7 @@ public function get(string $id): JsonResponse
public function collection(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$actorId = new IdentityId($request->get('actorId'));
@@ -89,7 +89,7 @@ public function collection(Request $request): JsonCollectionResponse
public function collectionOfIdentity(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_SS', 'ROLE_READ']);
$query = new VerifiedSecondFactorOfIdentityQuery();
$query->identityId = new IdentityId($request->get('identityId'));
@@ -102,7 +102,7 @@ public function collectionOfIdentity(Request $request): JsonCollectionResponse
public function getCanSkipProvePossession(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_READ']);
$secondFactor = $this->secondFactorService->findVerified(new SecondFactorId($id));
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
index 1f31f9aa3..d348e8d57 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php
@@ -23,7 +23,7 @@
use Surfnet\StepupMiddleware\ApiBundle\Identity\Query\VettedSecondFactorQuery;
use Surfnet\StepupMiddleware\ApiBundle\Identity\Service\SecondFactorService;
use Surfnet\StepupMiddleware\ApiBundle\Response\JsonCollectionResponse;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -37,7 +37,7 @@ public function __construct(
public function get(string $id): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$secondFactor = $this->secondFactorService->findVetted(new SecondFactorId($id));
@@ -50,7 +50,7 @@ public function get(string $id): JsonResponse
public function collection(Request $request): JsonCollectionResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$query = new VettedSecondFactorQuery();
$query->identityId = $request->get('identityId');
diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
index e01f3ebb1..7a316c5cf 100644
--- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
+++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php
@@ -22,7 +22,7 @@
use Surfnet\Stepup\Identity\Value\Institution;
use Surfnet\StepupMiddleware\ApiBundle\Exception\NotFoundException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Service\VettingTypeHintService;
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Surfnet\StepupMiddleware\ApiBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -36,7 +36,7 @@ public function __construct(
public function get(string $institution): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
+ $this->denyAccessUnlessGrantedOneOff(['ROLE_RA', 'ROLE_SS', 'ROLE_READ']);
$this->logger->info(sprintf('Received request to get a vetting type hint for institution: %s', $institution));
try {
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index 76ad545ea..1b65368b7 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -36,6 +36,8 @@ public function __construct(
public function update(Request $request): JsonResponse
{
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
+
$command = new UpdateConfigurationCommand();
$command->configuration = $request->getContent();
$command->UUID = (string)Uuid::uuid4();
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
index 7418963fd..7f7609425 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/InstitutionConfigurationController.php
@@ -59,7 +59,7 @@ public function __construct(
public function show(): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$institutionConfigurationOptions = $this->institutionConfigurationOptionsService
->findAllInstitutionConfigurationOptions();
@@ -104,7 +104,7 @@ public function show(): JsonResponse
public function reconfigure(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$configuration = JsonHelper::decode($request->getContent());
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
index 2e0e78ca5..c74ded47c 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php
@@ -49,7 +49,7 @@ public function __construct(
public function forgetIdentity(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$payload = JsonHelper::decode($request->getContent());
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
index abf2f8e19..2ae69c0b5 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/WhitelistController.php
@@ -50,7 +50,7 @@ public function __construct(
public function replaceWhitelist(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$command = new ReplaceWhitelistCommand();
$command->UUID = (string)Uuid::uuid4();
@@ -61,7 +61,7 @@ public function replaceWhitelist(Request $request): JsonResponse
public function addToWhitelist(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$command = new AddToWhitelistCommand();
$command->UUID = (string)Uuid::uuid4();
@@ -72,7 +72,7 @@ public function addToWhitelist(Request $request): JsonResponse
public function removeFromWhitelist(Request $request): JsonResponse
{
- $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']);
+ $this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
$command = new RemoveFromWhitelistCommand();
$command->UUID = (string)Uuid::uuid4();
From b9ff9de432756b3635be37c8c1ce70468a0c1bd5 Mon Sep 17 00:00:00 2001
From: Bas
Date: Mon, 11 Nov 2024 17:11:48 +0100
Subject: [PATCH 62/89] Fix remaining configuration tests
---
.../Controller/ConfigurationController.php | 10 +++++
.../invalid_configuration/invalid_sps.php | 37 -------------------
.../not_whitelisted_institution_use_raa.php | 2 +-
3 files changed, 11 insertions(+), 38 deletions(-)
delete mode 100644 src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_sps.php
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
index 1b65368b7..21f34bc25 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php
@@ -20,17 +20,22 @@
use DateTime;
use Ramsey\Uuid\Uuid;
+use Surfnet\Stepup\Helper\JsonHelper;
+use Surfnet\StepupMiddleware\ApiBundle\Exception\BadCommandRequestException;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Configuration\Command\UpdateConfigurationCommand;
use Surfnet\StepupMiddleware\CommandHandlingBundle\Pipeline\TransactionAwarePipeline;
+use Surfnet\StepupMiddleware\ManagementBundle\Validator\Constraints\HasValidConfigurationStructure;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Validator\Validator\ValidatorInterface;
class ConfigurationController extends AbstractController
{
public function __construct(
private readonly TransactionAwarePipeline $pipeline,
+ private readonly ValidatorInterface $validator,
) {
}
@@ -38,6 +43,11 @@ public function update(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted('ROLE_MANAGEMENT');
+ $violations = $this->validator->validate($request->getContent(), new HasValidConfigurationStructure());
+ if ($violations->count() > 0) {
+ throw BadCommandRequestException::withViolations('Invalid configure institutions request', $violations);
+ }
+
$command = new UpdateConfigurationCommand();
$command->configuration = $request->getContent();
$command->UUID = (string)Uuid::uuid4();
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_sps.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_sps.php
deleted file mode 100644
index ac2423f78..000000000
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_configuration/invalid_sps.php
+++ /dev/null
@@ -1,37 +0,0 @@
- 'gateway.service_providers',
- 'configuration' => [
- 'gateway' => [
- 'identity_providers' => [],
- 'service_providers' => 9,
- ],
- 'sraa' => ['20394-4320423-439248324'],
- 'email_templates' => [
- 'confirm_email' => ['en_GB' => 'Verify {{ commonName }}'],
- 'registration_code_with_ras' => ['en_GB' => 'Code {{ commonName }}'],
- 'registration_code_with_ra_locations' => ['en_GB' => 'Code {{ commonName }}'],
- 'vetted' => ['en_GB' => 'Vetted {{ commonName }}'],
- 'second_factor_revoked' => ['en_GB' => 'Revoked token for {{ commonName }}'],
- 'second_factor_verification_reminder_with_ras' => ['en_GB' => 'Code {{ commonName }}'],
- 'second_factor_verification_reminder_with_ra_locations' => ['en_GB' => 'Code {{ commonName }}'],
- ],
- ],
-];
diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_reconfigure_institution_request/not_whitelisted_institution_use_raa.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_reconfigure_institution_request/not_whitelisted_institution_use_raa.php
index 4b13a20a9..641843703 100644
--- a/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_reconfigure_institution_request/not_whitelisted_institution_use_raa.php
+++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Tests/Validator/Fixtures/invalid_reconfigure_institution_request/not_whitelisted_institution_use_raa.php
@@ -18,7 +18,7 @@
return [
'expectedPropertyPath' => 'Institution(surfnet.nl)',
- 'expectErrorMessageToContain' => 'All values of option "use_raa" should be known institutions.',
+ 'expectErrorMessageToContain' => 'All values of option "use_raa" for "surfnet.nl" should be known institutions.',
'reconfigureInstitutionRequest' => [
'surfnet.nl' => [
"use_ra_locations" => true,
From 01e784272db80fca8ba3577fd00ae46fb747050e Mon Sep 17 00:00:00 2001
From: Bas
Date: Tue, 12 Nov 2024 15:22:09 +0100
Subject: [PATCH 63/89] Refactor all ParamConverters to ValueResolvers
Refactor all ParamConverters to ValueResolvers and removed the
deprecated SymfonyExtraBundle because that's now not used anymore.
---
ci/qa/phpstan-baseline.neon | 46 +-
ci/qa/phpunit.xml | 1 +
composer.json | 1 -
composer.lock | 904 ++++++++----------
.../Controller/CommandController.php | 2 +-
.../Controller/IdentityController.php | 1 -
...Converter.php => CommandValueResolver.php} | 31 +-
...ConfigurationInstitutionValueResolver.php} | 25 +-
...erter.php => InstitutionValueResolver.php} | 31 +-
...onverter.php => MetadataValueResolver.php} | 29 +-
...rTest.php => CommandValueResolverTest.php} | 93 +-
...t.php => InstitutionValueResolverTest.php} | 31 +-
symfony.lock | 12 -
13 files changed, 557 insertions(+), 650 deletions(-)
rename src/Surfnet/StepupMiddleware/ApiBundle/Request/{CommandParamConverter.php => CommandValueResolver.php} (79%)
rename src/Surfnet/StepupMiddleware/ApiBundle/Request/{ConfigurationInstitutionParamConverter.php => ConfigurationInstitutionValueResolver.php} (71%)
rename src/Surfnet/StepupMiddleware/ApiBundle/Request/{InstitutionParamConverter.php => InstitutionValueResolver.php} (61%)
rename src/Surfnet/StepupMiddleware/ApiBundle/Request/{MetadataParamConverter.php => MetadataValueResolver.php} (79%)
rename src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/{CommandParamConverterTest.php => CommandValueResolverTest.php} (70%)
rename src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/{InstitutionParamConverterTest.php => InstitutionValueResolverTest.php} (68%)
diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon
index 563d4f2d9..f91d42e57 100644
--- a/ci/qa/phpstan-baseline.neon
+++ b/ci/qa/phpstan-baseline.neon
@@ -3115,45 +3115,35 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php
- -
- message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
-
-
message: "#^Cannot access offset 'command' on mixed\\.$#"
count: 3
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php
-
message: "#^Cannot access offset 'name' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php
-
message: "#^Cannot access offset 'payload' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php
-
message: "#^Cannot access offset 'uuid' on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php
-
message: "#^Cannot cast mixed to string\\.$#"
count: 2
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
-
- -
- message: "#^Property Surfnet\\\\StepupMiddleware\\\\CommandHandlingBundle\\\\Command\\\\AbstractCommand\\:\\:\\$UUID \\(string\\) does not accept mixed\\.$#"
- count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php
-
message: "#^Cannot access property \\$meta on mixed\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataParamConverter.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataValueResolver.php
-
message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Response\\\\JsonAuthorizationResponse\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
@@ -3281,24 +3271,34 @@ parameters:
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Identity/Projector/AuditLogProjectorTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:convertibleCommandNames\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Cannot access offset 0 on iterable\\\\.$#"
+ count: 4
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandValueResolverTest.php
+
+ -
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandValueResolverTest\\:\\:convertibleCommandNames\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandValueResolverTest.php
-
- message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandParamConverterTest\\:\\:invalidCommandJsonStructures\\(\\) return type has no value type specified in iterable type array\\.$#"
+ message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Tests\\\\Request\\\\CommandValueResolverTest\\:\\:invalidCommandJsonStructures\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
- path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandParamConverterTest.php
+ path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/CommandValueResolverTest.php
-
- message: "#^Cannot call method equals\\(\\) on mixed\\.$#"
+ message: "#^Parameter \\#1 \\$expected of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) expects class\\-string\\