forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make array access on possible false tolerant with isset
- Loading branch information
1 parent
8462fbd
commit 20f044e
Showing
4 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Bug8097; | ||
|
||
use Closure; | ||
|
||
class HelloWorld | ||
{ | ||
public function test(string $url): bool | ||
{ | ||
$urlParsed = parse_url($url); | ||
|
||
return isset($urlParsed['path']); | ||
} | ||
|
||
public function test2(Closure $closure): bool | ||
{ | ||
return isset($closure['path']); | ||
} | ||
|
||
/** | ||
* @param iterable<int|string, object> $iterable | ||
*/ | ||
public function test3($iterable): bool | ||
{ | ||
unset($iterable['path']); | ||
} | ||
} |