diff --git a/composer.json b/composer.json index 9c594d34..cc24b51a 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.19 || ^3.8", "mf2/mf2": "^0.5.0", - "phpstan/phpstan": "~1.11.11", + "phpstan/phpstan": "~1.12.2", "phpunit/phpunit": "^8 || ^9 || ^10", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", diff --git a/src/IRI.php b/src/IRI.php index fd906c1a..4b35b6e9 100644 --- a/src/IRI.php +++ b/src/IRI.php @@ -301,12 +301,10 @@ protected function parse_iri(string $iri) if ($match[1] === '') { $match['scheme'] = null; } - if (!isset($match[3]) || $match[3] === '') { + if ($match[3] === '') { $match['authority'] = null; } - if (!isset($match[5])) { - $match['path'] = ''; - } + $match['path'] = ''; if (!isset($match[6]) || $match[6] === '') { $match['query'] = null; }