diff --git a/Model/Behavior/HabtmCounterCacheBehavior.php b/Model/Behavior/HabtmCounterCacheBehavior.php index 24e7983..dac9964 100644 --- a/Model/Behavior/HabtmCounterCacheBehavior.php +++ b/Model/Behavior/HabtmCounterCacheBehavior.php @@ -1,4 +1,5 @@ id, inserting, so return if (!$model->id) { @@ -251,7 +252,7 @@ protected function _setOldHabtmIds(&$model) { * @param boolean $created * @return boolean Always true */ - public function afterSave(&$model, $created) { + public function afterSave(Model $model, $created) { $this->_setNewHabtmIds($model); @@ -306,7 +307,7 @@ protected function _setNewHabtmIds($model) { * @param AppModel $model * @return boolean Always true */ - function beforeDelete(&$model) { + function beforeDelete(Model $model, $cascade = true) { $this->_setOldHabtmIds($model); @@ -320,7 +321,7 @@ function beforeDelete(&$model) { * * @param AppModel $model */ - function afterDelete(&$model) { + function afterDelete(Model $model) { $this->_updateCounterCache($model);