【发布时间】:2015-09-24 01:28:22
【问题描述】:
这不会影响代码,但有点烦人。
我的控制器中有这 3 个方法:
public function chainOne()
{
return $this;
}
public function chainTwo()
{
return $this;
}
public function chainThree()
{
return $this;
}
到达特定路线后被调用的方法是这样的:
public function indexAction()
{
$this->chainOne()
->chainTwo()
->chainThree();
}
PHPStorm 说method chainThree() not found in class $this。但是chainThree() 中的代码可以毫无问题地执行。
我该如何解决?是bug吗?
【问题讨论】:
-
这应该是 PhpStorm 中的一个错误(至少我是这样看的)。这听起来相关:youtrack.jetbrains.com/issue/WI-27986