Code Duplication    Length = 10-14 lines in 5 locations

eZ/Publish/Core/Persistence/Cache/ObjectStateHandler.php 4 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}
@@ 94-103 (lines=10) @@
91
    /**
92
     * {@inheritdoc}
93
     */
94
    public function updateGroup($groupId, InputStruct $input)
95
    {
96
        $this->logger->logCall(__METHOD__, array('groupId' => $groupId, 'struct' => $input));
97
        $return = $this->persistenceHandler->objectStateHandler()->updateGroup($groupId, $input);
98
99
        $this->cache->clear('objectstategroup', 'all');
100
        $this->cache->clear('objectstategroup', $groupId);
101
102
        return $return;
103
    }
104
105
    /**
106
     * {@inheritdoc}
@@ 108-118 (lines=11) @@
105
    /**
106
     * {@inheritdoc}
107
     */
108
    public function deleteGroup($groupId)
109
    {
110
        $this->logger->logCall(__METHOD__, array('groupId' => $groupId));
111
        $return = $this->persistenceHandler->objectStateHandler()->deleteGroup($groupId);
112
113
        $this->cache->clear('objectstategroup', 'all');
114
        $this->cache->clear('objectstategroup', $groupId);
115
        $this->cache->clear('objectstate', 'byGroup', $groupId);
116
117
        return $return;
118
    }
119
120
    /**
121
     * {@inheritdoc}
@@ 161-170 (lines=10) @@
158
    /**
159
     * {@inheritdoc}
160
     */
161
    public function update($stateId, InputStruct $input)
162
    {
163
        $this->logger->logCall(__METHOD__, array('stateId' => $stateId, 'struct' => $input));
164
        $return = $this->persistenceHandler->objectStateHandler()->update($stateId, $input);
165
166
        $this->cache->clear('objectstate', $stateId);
167
        $this->cache->clear('objectstate', 'byGroup');
168
169
        return $return;
170
    }
171
172
    /**
173
     * {@inheritdoc}

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

@@ 56-69 (lines=14) @@
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function updateUrl($id, URLUpdateStruct $struct)
57
    {
58
        $this->logger->logCall(__METHOD__, [
59
            'url' => $id,
60
            'struct' => $struct,
61
        ]);
62
63
        $url = $this->persistenceHandler->urlHandler()->updateUrl($id, $struct);
64
65
        $this->cache->clear('url', $id);
66
        $this->cache->clear('content');
67
68
        return $url;
69
    }
70
71
    /**
72
     * {@inheritdoc}