Well... it's an isolated function so not sure what more I should include.
I actually tested older versions of this extension, and it seems like going from 1.63.18152 to 1.63.18172 introduces the bug for me. So I guess it must be related to these minor changes?
- Inline PestPHP test case runner support. @MrPunyapal
- Code completion for suggested argument string values.
- Supports @psalm-assert-if-true, @psalm-assert-if-false.
- Supports @phpstan-assert or psalm-assert with type hint prefixed with =, used by PHPUnit's assertInstanceOf().
- Respects @phpstan-ignore-line.
Further:
What's weird is that it's almost like the extension scans twice, because it's showing two blocks of information (Use of unassigned variable '$path' and (local variable) string $path:

and it seems somewhat related to the Laravel's Str helper, because notice it doesn't complain about the $path in the Storage::disk check, only the Str one.
More information:
- When I delete the vendor folder the error goes away.
- I'm running a Laravel 12 project in WSL.
- The error is new, it wasn't there when I worked with the code a month or so ago.
- The same error shows up for similar if-checks within foreach loops all over my code.
Even the official Illuminate\Support\Str::unwrap() shows a similar error, see:
