Code Duplication    Length = 9-13 lines in 4 locations

eZ/Publish/Core/Persistence/Cache/UserHandler.php 2 locations

@@ 189-198 (lines=10) @@
186
    /**
187
     * {@inheritdoc}
188
     */
189
    public function update(User $user)
190
    {
191
        $this->logger->logCall(__METHOD__, array('struct' => $user));
192
        $return = $this->persistenceHandler->userHandler()->update($user);
193
194
        // Clear corresponding content cache as update of the User changes it's external data
195
        $this->invalidateCache(['content-fields-' . $user->id, 'user-' . $user->id]);
196
197
        return $return;
198
    }
199
200
    /**
201
     * {@inheritdoc}
@@ 465-473 (lines=9) @@
462
    /**
463
     * {@inheritdoc}
464
     */
465
    public function updatePolicy(Policy $policy)
466
    {
467
        $this->logger->logCall(__METHOD__, array('struct' => $policy));
468
        $return = $this->persistenceHandler->userHandler()->updatePolicy($policy);
469
470
        $this->invalidateCache(['policy-' . $policy->id, 'role-' . $policy->roleId]);
471
472
        return $return;
473
    }
474
475
    /**
476
     * {@inheritdoc}

eZ/Publish/Core/Persistence/Cache/ContentLanguageHandler.php 1 location

@@ 60-72 (lines=13) @@
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function update(Language $struct)
61
    {
62
        $this->logger->logCall(__METHOD__, array('struct' => $struct));
63
        $return = $this->persistenceHandler->contentLanguageHandler()->update($struct);
64
65
        $this->deleteCache([
66
            'ez-language-list',
67
            'ez-language-' . $struct->id,
68
            'ez-language-code-' . $struct->languageCode,
69
        ]);
70
71
        return $return;
72
    }
73
74
    /**
75
     * {@inheritdoc}

eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php 1 location

@@ 323-331 (lines=9) @@
320
    /**
321
     * {@inheritdoc}
322
     */
323
    public function createDraft($modifierId, $typeId)
324
    {
325
        $this->logger->logCall(__METHOD__, array('modifier' => $modifierId, 'type' => $typeId));
326
        $draft = $this->persistenceHandler->contentTypeHandler()->createDraft($modifierId, $typeId);
327
328
        $this->deleteCache(['ez-content-type-' . $typeId . '-' . Type::STATUS_DRAFT]);
329
330
        return $draft;
331
    }
332
333
    /**
334
     * {@inheritdoc}