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}
@@ 468-476 (lines=9) @@
465
    /**
466
     * {@inheritdoc}
467
     */
468
    public function updatePolicy(Policy $policy)
469
    {
470
        $this->logger->logCall(__METHOD__, array('struct' => $policy));
471
        $return = $this->persistenceHandler->userHandler()->updatePolicy($policy);
472
473
        $this->invalidateCache(['policy-' . $policy->id, 'role-' . $policy->roleId]);
474
475
        return $return;
476
    }
477
478
    /**
479
     * {@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

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