Repository navigation
2.1.0 - Detect Behaviors methods on Tables
This only works if the method name is not modified in implementedMethods. Otherwise the analysis may be wrong, or
you'll have to decorate your code with dockblocks
/**
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
public class UsersTable extends Table
{
public function initialize(array $config)
{
parent::initialize($config);
$this->addBehavior('Timestamp');
}
}
// somewhere else - phpstan will know its the Timestamp touch method
$this->Users->touch($user);