phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: assert with OR instanceof narrows to union of both types
// feature: completion
// Adapted from phpactor general/narrowing.test (t5)
// expect: barMethod(
// expect: bazMethod(
---
<?php

class Bar {
    public function barMethod(): void {}
}

class Baz {
    public function bazMethod(): void {}
}

function test($f): void {
    assert($f instanceof Bar || $f instanceof Baz);
    $f-><>
}