phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: multiple @implements annotations resolve separate template parameters
// feature: completion
// Adapted from phpactor generics/class_implements_multiple1.test
// expect: barResult(
---
<?php

/** @template T */
interface First {
    /** @return T */
    public function bar();
}

/** @template Y */
interface Second {
    /** @return Y */
    public function boo();
}

class BarResult {
    public function barResult(): void {}
}

class BooResult {
    public function booResult(): void {}
}

/**
 * @implements First<BarResult>
 * @implements Second<BooResult>
 */
class Foo implements First, Second {
    public function bar() {}
    public function boo() {}
}

$foo = new Foo();
$foo->bar()-><>