diff --git a/.gitignore b/.gitignore index 7173c995..b83fe4bd 100755 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ coverage .scannerwork .DS_Store +.php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index c814b4a8..f684c0c8 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.1.29","version":"3.59.3:v3.59.3#30ba9ecc2b0e5205e578fe29973c15653d9bfd29","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"no_unused_imports":true,"ordered_imports":{"imports_order":["const","class","function"]},"php_unit_fqcn_annotation":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true},"hashes":{"\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder32718\/tests\/Util\/JsonTest.php":"229e164156257a33bc40ec45910f1561","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder30753\/tests\/Util\/JsonTest.php":"229e164156257a33bc40ec45910f1561","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder24222\/tests\/Util\/JsonTest.php":"229e164156257a33bc40ec45910f1561","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder25907\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder35317\/src\/DigitalIdentityClient.php":"9fba09c315d5bba5bd7b90ae9a717003","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3167\/src\/Identity\/DigitalIdentityService.php":"d1ca6e501e690798ca13ec028cbf505e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder667\/src\/Identity\/DigitalIdentityService.php":"d1ca6e501e690798ca13ec028cbf505e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder32289\/src\/Identity\/DigitalIdentityService.php":"d1ca6e501e690798ca13ec028cbf505e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder821\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder8036\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3553\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9961\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder34449\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder32249\/src\/Profile\/Util\/Attribute\/AnchorConverter.php":"c348f7a24bc5c13dc8b7362319cbfc9a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder37291\/src\/Profile\/Util\/Attribute\/AnchorConverter.php":"c348f7a24bc5c13dc8b7362319cbfc9a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3093\/src\/Profile\/Util\/Attribute\/AnchorConverter.php":"c348f7a24bc5c13dc8b7362319cbfc9a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder28127\/src\/Profile\/Util\/Attribute\/AnchorConverter.php":"c348f7a24bc5c13dc8b7362319cbfc9a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder33456\/src\/Profile\/Util\/Attribute\/AnchorConverter.php":"c348f7a24bc5c13dc8b7362319cbfc9a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder37936\/tests\/DigitalIdentityClientTest.php":"7afddf255900f83a72e0a37a93a6f6fe","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder20323\/tests\/Identity\/DigitalIdentityServiceTest.php":"a2830bae77f9853790b730ab1c52a9c0","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder135\/src\/DocScan\/Session\/Retrieve\/IdDocumentResourceResponse.php":"7bf4d09cc0a58470af431046cfc7687e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder452\/src\/DocScan\/Session\/Retrieve\/IdDocumentResourceResponse.php":"7bf4d09cc0a58470af431046cfc7687e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder1835\/src\/DocScan\/Session\/Retrieve\/IdDocumentResourceResponse.php":"f39668a92c3059e9d8298359ad6eedc9","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder11703\/src\/DocScan\/Session\/Create\/SdkConfig.php":"e570742d72b41967f9cc7e20495b7100","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder6945\/src\/DocScan\/Session\/Create\/SdkConfig.php":"defa00a16760c0f07cb4f16484770ddc","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10761\/src\/DocScan\/Session\/Create\/SdkConfig.php":"61b63d7cb686a25b1e664868fb8a5460","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder25491\/src\/DocScan\/Session\/Create\/SdkConfig.php":"52a187cef6aa401b2c24a6af50f6d1b3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder25245\/src\/DocScan\/Session\/Create\/SdkConfig.php":"e97a84e32a50146e14db930c88f07dec","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder6169\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"994c482f94c986253a3da93140575f26","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder14820\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"994c482f94c986253a3da93140575f26","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder8237\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"07bb664508b1053fde7518c3e5c9e0d2","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder30396\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"994c482f94c986253a3da93140575f26","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder26547\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"575c5c8750d0429c00d78f86f8b15d71","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder26103\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"756a15f92fed8a36b7645e3400543738","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder32665\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"bbcf30388bf6ab6423a58d6c8cf20b2a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder12231\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"d4c1e5cd33fc66ed0e9016ef83067f13","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder15671\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"1baf3d3d5e54d0120769f58a50b2d6a4","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder16639\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"790f204c58bb5c755878db5467155929","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder29864\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"1baf3d3d5e54d0120769f58a50b2d6a4","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder32797\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"9d3a05bc0553ae4fb61fad16444794f1","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder17371\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"1ab0b067273a82103be9978f9090d751","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2626\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"b262cf859858d0bfc7d493b82cfaf386","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder36694\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"b217af9f0e6d73ee26e5037494076717","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder24413\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"3a913bedb33741c25993d6f54631aab5","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder27718\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"639289121ce1709eeb7da41ad648d3f7","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder21698\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"c7d6178d1b7e1734a2315145e477d61a","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder22514\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"e991f862707f4967f66f52cf6e1ff4fc","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder37049\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"427142582bbc86bf6c5e80aa8c7b2945","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder24008\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"17c7713fa71fecefc01fc83ae0120850","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder19212\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"d45835ea3ec3e7889e1262ff766f22a8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder6528\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskConfig.php":"a8b7d00af84b1ecf11a3755ef4270a21","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder29603\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"b262cf859858d0bfc7d493b82cfaf386","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder37059\/src\/DocScan\/Session\/Create\/Task\/RequestedTextExtractionTaskBuilder.php":"5ebeced1a30fcb9579e2c023fb6683f9","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder18315\/examples\/doc-scan\/routes\/web.php":"cb44e031de8731bfa516c2057adb3705","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder33073\/examples\/profile\/app\/Http\/Controllers\/IdentityController.php":"2f614a4174a0403ac48ef6dcd4796ebc","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder1171\/examples\/doc-scan\/routes\/web.php":"cb44e031de8731bfa516c2057adb3705","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder24221\/examples\/profile\/app\/Providers\/YotiDigitalIdentityServiceProvider.php":"ca9bdcd9f57192ded3421ec399c655d3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder28861\/examples\/profile\/app\/Providers\/YotiDigitalIdentityServiceProvider.php":"ca9bdcd9f57192ded3421ec399c655d3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder28556\/examples\/digitalidentity\/config\/app.php":"fd9dd9b2aa7f77bd4898eff4039a5399","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder14596\/examples\/profile\/config\/app.php":"fd9dd9b2aa7f77bd4898eff4039a5399","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder29786\/examples\/profile\/config\/app.php":"fd9dd9b2aa7f77bd4898eff4039a5399","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder18285\/examples\/profile\/config\/app.php":"dc2cea437306a860734271b629691f1b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder6012\/examples\/profile\/config\/app.php":"dc2cea437306a860734271b629691f1b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9177\/examples\/digitalidentity\/storage\/framework\/views\/95c786522cd6c5bb1d0a69b2f33616f23bfd97c6.php":"fec431b44c0882fb0ff10121625ab7df","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder5081\/examples\/profile\/routes\/web.php":"4d6d95a1a884c50539b3ba82cb1cae6e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder28691\/examples\/profile\/routes\/web.php":"b21cb257df9016e8e827652aecc620d6","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder16838\/examples\/digitalidentity\/storage\/framework\/views\/95c786522cd6c5bb1d0a69b2f33616f23bfd97c6.php":"fec431b44c0882fb0ff10121625ab7df","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder35858\/examples\/profile\/routes\/web.php":"b21cb257df9016e8e827652aecc620d6","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder18443\/examples\/digitalidentity\/storage\/framework\/views\/95c786522cd6c5bb1d0a69b2f33616f23bfd97c6.php":"fec431b44c0882fb0ff10121625ab7df","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder1673\/examples\/profile\/routes\/web.php":"b21cb257df9016e8e827652aecc620d6","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder4880\/examples\/digitalidentity\/storage\/framework\/views\/95c786522cd6c5bb1d0a69b2f33616f23bfd97c6.php":"fec431b44c0882fb0ff10121625ab7df"}} \ No newline at end of file +{"php":"8.1.29","version":"3.59.3:v3.59.3#30ba9ecc2b0e5205e578fe29973c15653d9bfd29","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"no_unused_imports":true,"ordered_imports":{"imports_order":["const","class","function"]},"php_unit_fqcn_annotation":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true},"hashes":{"\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder861\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3196\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10280\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2372\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder12059\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"01fd3c6b4102578a5cbe7b9ca5a9620b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder4216\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"2b29b8fd1369f029fdd2626aff9574a1","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7923\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"a92ce4d8cf8cba9fc31b0b862a238e7d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9888\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"99cf5679ad3fbe693f1318efc4c7562e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7837\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder5368\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9615\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"fa7416c72cb9a21e375a580d0711b4a3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2220\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"3f1b675e645966f11d6fe283ff3d1a5c","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10144\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7956\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0"}} diff --git a/examples/doc-scan/app/Http/Controllers/HomeController.php b/examples/doc-scan/app/Http/Controllers/HomeController.php index c00c723e..9bd67d01 100644 --- a/examples/doc-scan/app/Http/Controllers/HomeController.php +++ b/examples/doc-scan/app/Http/Controllers/HomeController.php @@ -63,7 +63,7 @@ public function show(Request $request, DocScanClient $client) ->withSources($searchProfileSources) ->withShareUrl(false) ->withRemoveDeceased(true) - ->withApiKey('qiKTHG7Mgqj31mK2d21F7QPpaVBp9zKc') + ->withApiKey('api-key') ->withClientRef("string") ->withMonitoring(true) ->withTags(['tag1']) diff --git a/src/DocScan/Session/Retrieve/IdentityProfile/FailureReasonResponse.php b/src/DocScan/Session/Retrieve/IdentityProfile/FailureReasonResponse.php index f674263d..59026c57 100644 --- a/src/DocScan/Session/Retrieve/IdentityProfile/FailureReasonResponse.php +++ b/src/DocScan/Session/Retrieve/IdentityProfile/FailureReasonResponse.php @@ -7,21 +7,32 @@ class FailureReasonResponse /** * @var string */ - private $stringCode; - + private $reasonCode; + /** + * @var RequirementNotMetDetails + */ + private $requirementsNotMetDetails; /** - * @param string $stringCode + * @param array $data */ - public function __construct(string $stringCode) + public function __construct(array $data) { - $this->stringCode = $stringCode; + $this->reasonCode = $data["reason_code"]; + $this->requirementsNotMetDetails = new RequirementNotMetDetails($data["requirements_not_met_details"]); } /** * @return string */ - public function getStringCode(): string + public function getReasonCode(): string + { + return $this->reasonCode; + } + /** + * @return RequirementNotMetDetails + */ + public function getRequirementNotMetDetails(): RequirementNotMetDetails { - return $this->stringCode; + return $this->requirementsNotMetDetails; } } diff --git a/src/DocScan/Session/Retrieve/IdentityProfile/RequirementNotMetDetails.php b/src/DocScan/Session/Retrieve/IdentityProfile/RequirementNotMetDetails.php new file mode 100644 index 00000000..2f9f4113 --- /dev/null +++ b/src/DocScan/Session/Retrieve/IdentityProfile/RequirementNotMetDetails.php @@ -0,0 +1,75 @@ +> $data + */ + public function __construct(array $data) + { + $this->failureType = $data[0]["failure_type"] ?? ''; + $this->details = $data[0]["details"] ?? ''; + $this->auditId = $data[0]["audit_id"] ?? ''; + $this->documentCountryIsoCode = $data[0]["document_country_iso_code"] ?? ''; + $this->documentType = $data[0]["document_type"] ?? ''; + } + + /** + * @return string + */ + public function getFailureType(): string + { + return $this->failureType; + } + /** + * @return string + */ + public function getDetails(): string + { + return $this->details; + } + /** + * @return string + */ + public function getAuditId(): string + { + return $this->auditId; + } + /** + * @return string + */ + public function getDocumentCountryIsoCode(): string + { + return $this->documentCountryIsoCode; + } + /** + * @return string + */ + public function getDocumentType(): string + { + return $this->documentType; + } +} diff --git a/src/DocScan/Session/Retrieve/IdentityProfileResponse.php b/src/DocScan/Session/Retrieve/IdentityProfileResponse.php index b7eb2fd0..17643e89 100644 --- a/src/DocScan/Session/Retrieve/IdentityProfileResponse.php +++ b/src/DocScan/Session/Retrieve/IdentityProfileResponse.php @@ -35,7 +35,7 @@ public function __construct(array $sessionData) $this->result = $sessionData['result']; if (isset($sessionData['failure_reason'])) { - $this->failureReason = new FailureReasonResponse($sessionData['failure_reason']['reason_code']); + $this->failureReason = new FailureReasonResponse($sessionData['failure_reason']); } if (isset($sessionData['identity_profile_report'])) { diff --git a/src/Identity/ErrorReason.php b/src/Identity/ErrorReason.php new file mode 100644 index 00000000..787fbf1e --- /dev/null +++ b/src/Identity/ErrorReason.php @@ -0,0 +1,37 @@ +> $data + */ + public function __construct(array $data) + { + if (isset($data[0])) { + $this->requirementNotMetDetails = new RequirementNotMetDetails($data); + } else { + $this->requirementNotMetDetails = new RequirementNotMetDetails([[ + "failure_type" => '', + "details" => '', + "audit_id" => '', + "document_country_iso_code" => '', + "document_type" => '' + ]]); + } + } + + /** + * @return RequirementNotMetDetails + */ + public function getRequirementNotMetDetails(): RequirementNotMetDetails + { + return $this->requirementNotMetDetails; + } +} diff --git a/src/Identity/Receipt.php b/src/Identity/Receipt.php index 57458bc7..162761f2 100644 --- a/src/Identity/Receipt.php +++ b/src/Identity/Receipt.php @@ -10,20 +10,14 @@ class Receipt { private string $id; - private string $sessionId; - private \DateTime $timestamp; - private ApplicationContent $applicationContent; - private UserContent $userContent; - private ?string $rememberMeId; - private ?string $parentRememberMeId; - private ?string $error; + private ?ErrorReason $errorReason; public function __construct( string $id, @@ -33,7 +27,8 @@ public function __construct( UserContent $userContent, ?string $rememberMeId, ?string $parentRememberMeId, - ?string $error + ?string $error, + ?ErrorReason $errorReason ) { $this->id = $id; $this->sessionId = $sessionId; @@ -43,6 +38,7 @@ public function __construct( $this->rememberMeId = $rememberMeId; $this->parentRememberMeId = $parentRememberMeId; $this->error = $error; + $this->errorReason = $errorReason; } public function getId(): string @@ -94,4 +90,9 @@ public function getError(): ?string { return $this->error; } + + public function getErrorReason(): ?ErrorReason + { + return $this->errorReason; + } } diff --git a/src/Identity/ReceiptBuilder.php b/src/Identity/ReceiptBuilder.php index 9bed933f..7a091388 100644 --- a/src/Identity/ReceiptBuilder.php +++ b/src/Identity/ReceiptBuilder.php @@ -25,6 +25,8 @@ class ReceiptBuilder private ?string $parentRememberMeId = null; private ?string $error = null; + private ?ErrorReason $errorReason = null; + public function withId(string $id): self { @@ -82,6 +84,13 @@ public function withError(string $error = null): self return $this; } + public function withErrorReason(ErrorReason $errorReason = null): self + { + $this->errorReason = $errorReason; + + return $this; + } + public function build(): Receipt { return new Receipt( @@ -93,6 +102,7 @@ public function build(): Receipt $this->rememberMeId, $this->parentRememberMeId, $this->error, + $this->errorReason ); } } diff --git a/src/Identity/ReceiptParser.php b/src/Identity/ReceiptParser.php index 5847a438..375249da 100644 --- a/src/Identity/ReceiptParser.php +++ b/src/Identity/ReceiptParser.php @@ -89,6 +89,7 @@ public function createFailure(WrappedReceipt $wrappedReceipt): Receipt ->withSessionId($wrappedReceipt->getSessionId()) ->withTimestamp($wrappedReceipt->getTimestamp()) ->withError($wrappedReceipt->getError()) + ->withErrorReason($wrappedReceipt->getErrorReason()) ->build(); } diff --git a/src/Identity/RequirementNotMetDetails.php b/src/Identity/RequirementNotMetDetails.php new file mode 100644 index 00000000..bcd3e40e --- /dev/null +++ b/src/Identity/RequirementNotMetDetails.php @@ -0,0 +1,75 @@ +> $data + */ + public function __construct(array $data) + { + $this->failureType = $data[0]["failure_type"] ?? ''; + $this->details = $data[0]["details"] ?? ''; + $this->auditId = $data[0]["audit_id"] ?? ''; + $this->documentCountryIsoCode = $data[0]["document_country_iso_code"] ?? ''; + $this->documentType = $data[0]["document_type"] ?? ''; + } + + /** + * @return string + */ + public function getFailureType(): string + { + return $this->failureType; + } + /** + * @return string + */ + public function getDetails(): string + { + return $this->details; + } + /** + * @return string + */ + public function getAuditId(): string + { + return $this->auditId; + } + /** + * @return string + */ + public function getDocumentCountryIsoCode(): string + { + return $this->documentCountryIsoCode; + } + /** + * @return string + */ + public function getDocumentType(): string + { + return $this->documentType; + } +} diff --git a/src/Identity/WrappedReceipt.php b/src/Identity/WrappedReceipt.php index 8d7c04c4..7d1f4b74 100644 --- a/src/Identity/WrappedReceipt.php +++ b/src/Identity/WrappedReceipt.php @@ -28,6 +28,7 @@ class WrappedReceipt private ?string $parentRememberMeId = null; private ?string $error = null; + private ?ErrorReason $errorReason = null; /** * @param array $sessionData @@ -62,6 +63,13 @@ public function __construct(array $sessionData) if (isset($sessionData['error'])) { $this->error = $sessionData['error']; } + if (isset($sessionData['errorDetails'])) { + if (isset($sessionData["error_details"]["error_reason"]["requirements_not_met_details"])) { + $this->errorReason = new ErrorReason( + $sessionData['errorDetails']['error_reason']['requirements_not_met_details'] + ); + } + } } public function getId(): string @@ -132,6 +140,11 @@ public function getError(): ?string return $this->error; } + public function getErrorReason(): ?ErrorReason + { + return $this->errorReason; + } + private function base64decode(string $encoded): string { $decoded = base64_decode($encoded, true); diff --git a/tests/DocScan/DocScanClientTest.php b/tests/DocScan/DocScanClientTest.php index 5a58deca..306e1d17 100644 --- a/tests/DocScan/DocScanClientTest.php +++ b/tests/DocScan/DocScanClientTest.php @@ -513,7 +513,7 @@ public function testParseIdentityProfileResponse() $this->assertEquals('someStringHere', $sessionResult->getIdentityProfile()->getSubjectId()); $this->assertEquals( 'MANDATORY_DOCUMENT_COULD_NOT_BE_PROVIDED', - $sessionResult->getIdentityProfile()->getFailureReason()->getStringCode() + $sessionResult->getIdentityProfile()->getFailureReason()->getReasonCode() ); $this->assertEquals( diff --git a/tests/DocScan/Session/Retrieve/GetSessionResultTest.php b/tests/DocScan/Session/Retrieve/GetSessionResultTest.php index 705e82fb..0d879a12 100644 --- a/tests/DocScan/Session/Retrieve/GetSessionResultTest.php +++ b/tests/DocScan/Session/Retrieve/GetSessionResultTest.php @@ -43,6 +43,16 @@ class GetSessionResultTest extends TestCase 'result' => 'SOME_ANOTHER_STRING', 'failure_reason' => [ 'reason_code' => 'ANOTHER_STRING', + 'requirements_not_met_details' => [ + 0 => [ + 'failure_type' => 'ANOTHER_STRING', + 'document_type' => 'ANOTHER_STRING', + 'document_country_iso_code' => 'ANOTHER_STRING', + 'audit_id' => 'ANOTHER_STRING', + 'details' => 'ANOTHER_STRING' + ] + + ] ], 'identity_profile_report' => [], ]; diff --git a/tests/DocScan/Session/Retrieve/IdentityProfileResponseTest.php b/tests/DocScan/Session/Retrieve/IdentityProfileResponseTest.php index e68e22f9..35476731 100644 --- a/tests/DocScan/Session/Retrieve/IdentityProfileResponseTest.php +++ b/tests/DocScan/Session/Retrieve/IdentityProfileResponseTest.php @@ -13,6 +13,11 @@ class IdentityProfileResponseTest extends TestCase { private const RESULT = 'DONE'; private const SUBJECT_ID = 'someStringHere'; + private const FAILURE_TYPE = 'someStringHere'; + private const DOCUMENT_TYPE = 'someStringHere'; + private const DOCUMENT_COUNTRY_ISO_CODE = 'someStringHere'; + private const AUDIT_ID = 'someStringHere'; + private const DETAILS = 'someStringHere'; private const REASON_CODE = 'MANDATORY_DOCUMENT_COULD_NOT_BE_PROVIDED'; private const IDENTITY_PROFILE_REPORT = [ 'trust_framework' => 'UK_TFIDA', @@ -47,17 +52,29 @@ public function shouldCreatedCorrectly(): void 'result' => self::RESULT, 'failure_reason' => [ 'reason_code' => self::REASON_CODE, + 'requirements_not_met_details' => [ + 0 => [ + 'failure_type' => self::FAILURE_TYPE, + 'document_type' => self::DOCUMENT_TYPE, + 'document_country_iso_code' => self::DOCUMENT_COUNTRY_ISO_CODE, + 'audit_id' => self::AUDIT_ID, + 'details' => self::DETAILS + ] + ] ], 'identity_profile_report' => self::IDENTITY_PROFILE_REPORT, ]; $result = new IdentityProfileResponse($testData); - $this->assertEquals(self::RESULT, $result->getResult()); $this->assertEquals(self::SUBJECT_ID, $result->getSubjectId()); $this->assertEquals((object)self::IDENTITY_PROFILE_REPORT, $result->getIdentityProfileReport()); - $this->assertInstanceOf(FailureReasonResponse::class, $result->getFailureReason()); - $this->assertEquals(self::REASON_CODE, $result->getFailureReason()->getStringCode()); + $this->assertEquals(self::REASON_CODE, $result->getFailureReason()->getReasonCode()); + $requriementNotMetDetailsResponse = $result->getFailureReason()->getRequirementNotMetDetails(); + $this->assertEquals(self::FAILURE_TYPE, $requriementNotMetDetailsResponse->getFailureType()); + $this->assertEquals(self::DOCUMENT_TYPE, $requriementNotMetDetailsResponse->getDocumentType()); + $this->assertEquals(self::AUDIT_ID, $requriementNotMetDetailsResponse->getAuditId()); + $this->assertEquals(self::DETAILS, $requriementNotMetDetailsResponse->getDetails()); } } diff --git a/tests/Identity/ReceiptTest.php b/tests/Identity/ReceiptTest.php index adbc392e..73c3b29e 100644 --- a/tests/Identity/ReceiptTest.php +++ b/tests/Identity/ReceiptTest.php @@ -4,6 +4,7 @@ use Yoti\Identity\Content\ApplicationContent; use Yoti\Identity\Content\UserContent; +use Yoti\Identity\ErrorReason; use Yoti\Identity\Receipt; use Yoti\Identity\ReceiptBuilder; use Yoti\Profile\ApplicationProfile; @@ -20,6 +21,7 @@ class ReceiptTest extends TestCase * @covers ::getProfile * @covers ::getId * @covers ::getError + * @covers ::getErrorReason * @covers ::getApplicationContent * @covers ::getTimestamp * @covers ::getParentRememberMeId @@ -38,6 +40,7 @@ public function testShouldBuildCorrectly() $rememberId = 'SOME_REMEMBER_ID'; $parentRememberId = 'SOME_PARENT_REMEMBER_ID'; $someError = 'SOME_ERROR'; + $someErrorReason = $this->createMock(ErrorReason::class); $receipt = new Receipt( $someId, @@ -47,7 +50,8 @@ public function testShouldBuildCorrectly() $userContent, $rememberId, $parentRememberId, - $someError + $someError, + $someErrorReason ); $this->assertEquals($someId, $receipt->getId()); @@ -58,10 +62,12 @@ public function testShouldBuildCorrectly() $this->assertEquals($rememberId, $receipt->getRememberMeId()); $this->assertEquals($parentRememberId, $receipt->getParentRememberMeId()); $this->assertEquals($someError, $receipt->getError()); + $this->assertEquals($someErrorReason, $receipt->getErrorReason()); } /** * @covers \Yoti\Identity\ReceiptBuilder::withError + * @covers \Yoti\Identity\ReceiptBuilder::withErrorReason * @covers \Yoti\Identity\ReceiptBuilder::withApplicationContent * @covers \Yoti\Identity\ReceiptBuilder::withId * @covers \Yoti\Identity\ReceiptBuilder::withTimestamp @@ -81,6 +87,7 @@ public function testShouldBuildCorrectlyThroughBuilder() $rememberId = 'SOME_REMEMBER_ID'; $parentRememberId = 'SOME_PARENT_REMEMBER_ID'; $someError = 'SOME_ERROR'; + $someErrorReason = $this->createMock(ErrorReason::class); $receipt = (new ReceiptBuilder()) ->withId($someId) @@ -91,9 +98,9 @@ public function testShouldBuildCorrectlyThroughBuilder() ->withRememberMeId($rememberId) ->withParentRememberMeId($parentRememberId) ->withError($someError) + ->withErrorReason($someErrorReason) ->build(); - $this->assertEquals($someId, $receipt->getId()); $this->assertEquals($sessionId, $receipt->getSessionId()); $this->assertEquals($someTime, $receipt->getTimestamp()); @@ -102,5 +109,6 @@ public function testShouldBuildCorrectlyThroughBuilder() $this->assertEquals($rememberId, $receipt->getRememberMeId()); $this->assertEquals($parentRememberId, $receipt->getParentRememberMeId()); $this->assertEquals($someError, $receipt->getError()); + $this->assertEquals($someErrorReason, $receipt->getErrorReason()); } } diff --git a/tests/sample-data/sessionResultIdentityProfileResult.json b/tests/sample-data/sessionResultIdentityProfileResult.json index b6850f06..8464b432 100644 --- a/tests/sample-data/sessionResultIdentityProfileResult.json +++ b/tests/sample-data/sessionResultIdentityProfileResult.json @@ -9,7 +9,16 @@ "subject_id": "someStringHere", "result": "DONE", "failure_reason": { - "reason_code": "MANDATORY_DOCUMENT_COULD_NOT_BE_PROVIDED" + "reason_code": "MANDATORY_DOCUMENT_COULD_NOT_BE_PROVIDED", + "requirements_not_met_details": [ + { + "failure_type": "someStringHere", + "document_type": "someStringHere", + "document_country_iso_code": "someStringHere", + "audit_id": "someStringHere", + "details": "someStringHere" + } + ] }, "identity_profile_report": { "trust_framework": "UK_TFIDA", @@ -31,4 +40,4 @@ } } } -} \ No newline at end of file +}