From 1da118e11d5054674cf5b4cc3b983eb04523b03a Mon Sep 17 00:00:00 2001 From: azjezz Date: Fri, 4 Dec 2020 12:57:48 +0100 Subject: [PATCH] use psalm dev branch --- composer.json | 2 +- src/Psl/Password/algorithms.php | 6 +++--- src/Psl/Password/get_information.php | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 650778d..e08783f 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "friendsofphp/php-cs-fixer": "^2.16", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.3" + "vimeo/psalm": "dev-master" }, "autoload": { "psr-4": { diff --git a/src/Psl/Password/algorithms.php b/src/Psl/Password/algorithms.php index 6f02e2a..1b8d613 100644 --- a/src/Psl/Password/algorithms.php +++ b/src/Psl/Password/algorithms.php @@ -14,8 +14,8 @@ namespace Psl\Password; function algorithms(): array { return [ - (string) BCRYPT_ALGORITHM, - (string) ARGON2I_ALGORITHM, - (string) ARGON2ID_ALGORITHM, + BCRYPT_ALGORITHM, + ARGON2I_ALGORITHM, + ARGON2ID_ALGORITHM, ]; } diff --git a/src/Psl/Password/get_information.php b/src/Psl/Password/get_information.php index f013834..c2f50a1 100644 --- a/src/Psl/Password/get_information.php +++ b/src/Psl/Password/get_information.php @@ -23,8 +23,9 @@ use function password_get_info; */ function get_information(string $hash): array { + /** @var array{algoName: string, options: array} $information */ $information = password_get_info($hash); - $algorithm = (string)$information['algoName']; + $algorithm = $information['algoName']; if (BCRYPT_ALGORITHM === $algorithm) { return [ 'algorithm' => $algorithm,