Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 199-206 (lines=8) @@
196
            $cache = $this->cache->getItem('user', 'role', 'assignments', 'byGroup', $groupId);
197
        }
198
        $assignments = $cache->get();
199
        if ($cache->isMiss()) {
200
            $this->logger->logCall(__METHOD__, array('group' => $groupId, 'inherit' => $inherit));
201
            $assignments = $this->persistenceHandler->userHandler()->loadRoleAssignmentsByGroupId(
202
                $groupId,
203
                $inherit
204
            );
205
            $cache->set($assignments)->save();
206
        }
207
208
        return $assignments;
209
    }

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

@@ 235-242 (lines=8) @@
232
    {
233
        $cache = $this->cache->getItem('objectstate', 'byContent', $contentId, $stateGroupId);
234
        $stateId = $cache->get();
235
        if ($cache->isMiss()) {
236
            $this->logger->logCall(__METHOD__, array('contentId' => $contentId, 'stateGroupId' => $stateGroupId));
237
238
            $contentState = $this->persistenceHandler->objectStateHandler()->getContentState($contentId, $stateGroupId);
239
            $cache->set($contentState->id)->save();
240
241
            return $contentState;
242
        }
243
244
        return $this->load($stateId);
245
    }