Skip to content

Commit

Permalink
Fix PHPStan 1.12.2
Browse files Browse the repository at this point in the history
```
------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/IRI.php
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  :304   Offset 3 on array{0: string, 1: '', scheme: null, 2: string, 3: string, authority: string, 4: string, path: string, ...}|array{0: string, 1: non-empty-string, scheme: string, 2: string, 3: string, authority: string, 4: string, path: string, ...} in isset()
         always exists and is not nullable.
  :307   Offset 5 on array{0: string, 1: '', scheme: null, 2: string, 3: string, authority: string|null, 4: string, path: string, ...}|array{0: string, 1: non-empty-string, scheme: string, 2: string, 3: string, authority: string|null, 4: string, path: string, ...}
         in isset() always exists and is not nullable.
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
  • Loading branch information
Alkarex committed Sep 8, 2024
1 parent 9385c54 commit c12db8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/IRI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c12db8e

Please sign in to comment.