为 CakePHP3 应用程序运行 PHPStan时,使用CakePHP3 动态查找器Call to an undefined method
的行中总是出现错误
如何删除动态方法等错误?
/**
* @property \App\Model\Table\ArticlesTable $Articles
*/
class ArticlesController extends AppController
{
public function view($slug = null)
{
$article = $this->Articles->findBySlug($slug)->firstOrFail();
$this->set(compact('article'));
}
------ ----------------------------------------------------------------------------
Line Controller/ArticlesController.php
------ ----------------------------------------------------------------------------
58 Call to an undefined method App\Model\Table\ArticlesTable::findBySlug().
...