From 3e615df6a8fff78359b7c9e8c26d6a017d913754 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 2 Dec 2024 07:58:09 +0545 Subject: [PATCH] chore(deps): phpstan major version 2 --- composer.json | 8 ++++---- lib/functions.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 2d26c23..a907116 100644 --- a/composer.json +++ b/composer.json @@ -37,10 +37,10 @@ } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", + "friendsofphp/php-cs-fixer": "^3.65", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpstan/extension-installer": "^1.4", "phpunit/phpunit" : "^9.6" }, diff --git a/lib/functions.php b/lib/functions.php index 7e07816..755043b 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -143,11 +143,11 @@ function normalize(string $uri): string if (null !== $parts['scheme']) { $parts['scheme'] = strtolower($parts['scheme']); $defaultPorts = [ - 'http' => '80', - 'https' => '443', + 'http' => 80, + 'https' => 443, ]; - if (null !== $parts['port'] && isset($defaultPorts[$parts['scheme']]) && $defaultPorts[$parts['scheme']] == $parts['port']) { + if (null !== $parts['port'] && isset($defaultPorts[$parts['scheme']]) && $defaultPorts[$parts['scheme']] === $parts['port']) { // Removing default ports. unset($parts['port']); }