When run PHPStan for CakePHP3 app, Call to an undefined method
errors always occurs
in the lines using CakePHP3 Dynamic Finders
How do I remove errors like dynamic methods?
/**
* @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().
...