【发布时间】:2017-05-25 23:37:31
【问题描述】:
<?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();
如何让 PhpStorm 识别链方法,即使它不在合同中?
【问题讨论】:
标签: php methods interface phpstorm contract