Skip to content

Commit

Permalink
Merge pull request #124 from phil-davis/phpstan-2
Browse files Browse the repository at this point in the history
chore(deps): phpstan major version 2
  • Loading branch information
phil-davis authored Dec 2, 2024
2 parents 38eeab6 + 3e615df commit 2eee503
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 3 additions & 3 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down

0 comments on commit 2eee503

Please sign in to comment.