phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: @phpstan-assert on standalone function narrows variable type
// feature: completion
// Adapted from phpactor narrowing/function-narrow.test
// expect: fooMethod(
---
<?php

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

/**
 * @phpstan-assert Foobar $class
 */
function assertFoobar($class): void {}

function test(object $obj): void {
    assertFoobar($obj);
    $obj-><>
}