Торт PHP 3,8: Как написать волшебные c @methods && @properity? - PullRequest
0 голосов
/ 28 января 2020

Мы запускаем phpstan @ cake php 3.8 и у нас есть такие ошибки:

1: __call () https://api.cakephp.org/3.8/source-class-Cake.Database.FunctionsBuilder.html#271 -292

  238    Call to an undefined method Cake\Database\FunctionsBuilder::year().  
  239    Call to an undefined method Cake\Database\FunctionsBuilder::week().

2: волхвы c метод нахождения

  46     Call to an undefined method App\Model\Table\HolidaysTable::findByDateAndState().

Редактировать: Эта работа

@method \Cake\ORM\Table\__call\Cake\ORM\Query findByDateAndState($var, $var)

3:

$locations = $this->Locations->find();

foreach ($locations as $location) {
  //.. some code $location->address;
}

-

Access to an undefined property object::$address
...