|
|
@@ -18,7 +18,6 @@ use Cake\Datasource\EntityInterface;
|
|
|
use Cake\Event\Event;
|
|
|
use Cake\ORM\Association;
|
|
|
use Cake\ORM\Behavior;
|
|
|
-use Cake\ORM\Entity;
|
|
|
|
|
|
/**
|
|
|
* CounterCache behavior
|
|
|
@@ -199,12 +198,12 @@ class CounterCacheBehavior extends Behavior
|
|
|
* Updates counter cache for a single association
|
|
|
*
|
|
|
* @param \Cake\Event\Event $event Event instance.
|
|
|
- * @param \Cake\ORM\Entity $entity Entity
|
|
|
+ * @param \Cake\Datasource\EntityInterface $entity Entity
|
|
|
* @param \Cake\ORM\Association $assoc The association object
|
|
|
* @param array $settings The settings for for counter cache for this association
|
|
|
* @return void
|
|
|
*/
|
|
|
- protected function _processAssociation(Event $event, Entity $entity, Association $assoc, array $settings)
|
|
|
+ protected function _processAssociation(Event $event, EntityInterface $entity, Association $assoc, array $settings)
|
|
|
{
|
|
|
$foreignKeys = (array)$assoc->getForeignKey();
|
|
|
$primaryKeys = (array)$assoc->getBindingKey();
|