<?php
interface iFoo {
public function print(): iFoo;
}
class Foo implements iFoo {
public function print(): iFoo {
return $this;
}
public function chain(): iFoo {
return $this;
}
}
$foo = new Foo();
$foo->print()
->chain() // Method 'chain' not found in iFoo
->print();
How can I make PhpStorm recognize the chain method, even though it's not in the contract?