phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: false === instanceof comparison with die narrows type after guard
// feature: completion
// Adapted from phpactor if-statement/false.test
// expect: fooMethod(
---
<?php

class Foobar {
    public function fooMethod(): void {}
}

class Other {
    public function otherMethod(): void {}
}

function test(Foobar|Other $foobar): void {
    if (false === $foobar instanceof Foobar) {
        die();
    }

    $foobar-><>
}