Code Duplication    Length = 10-15 lines in 3 locations

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

@@ 22-31 (lines=10) @@
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function createGroup(InputStruct $input)
23
    {
24
        $this->logger->logCall(__METHOD__, array('struct' => $input));
25
        $group = $this->persistenceHandler->objectStateHandler()->createGroup($input);
26
27
        $this->cache->clear('objectstategroup', 'all');
28
        $this->cache->getItem('objectstategroup', $group->id)->set($group)->save();
29
30
        return $group;
31
    }
32
33
    /**
34
     * {@inheritdoc}
@@ 107-117 (lines=11) @@
104
    /**
105
     * {@inheritdoc}
106
     */
107
    public function deleteGroup($groupId)
108
    {
109
        $this->logger->logCall(__METHOD__, array('groupId' => $groupId));
110
        $return = $this->persistenceHandler->objectStateHandler()->deleteGroup($groupId);
111
112
        $this->cache->clear('objectstategroup', 'all');
113
        $this->cache->clear('objectstategroup', $groupId);
114
        $this->cache->clear('objectstate', 'byGroup', $groupId);
115
116
        return $return;
117
    }
118
119
    /**
120
     * {@inheritdoc}

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

@@ 307-321 (lines=15) @@
304
    /**
305
     * {@inheritdoc}
306
     */
307
    public function removeTranslationFromContent($contentId, $languageCode)
308
    {
309
        $this->logger->logCall(
310
            __METHOD__,
311
            [
312
                'contentId' => $contentId,
313
                'languageCode' => $languageCode,
314
            ]
315
        );
316
317
        $this->persistenceHandler->contentHandler()->removeTranslationFromContent($contentId, $languageCode);
318
319
        $this->cache->clear('content', $contentId);
320
        $this->cache->clear('content', 'info', $contentId);
321
    }
322
323
    /**
324
     * {@inheritdoc}