Code Duplication    Length = 9-24 lines in 3 locations

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

@@ 226-234 (lines=9) @@
223
    /**
224
     * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::setContentState
225
     */
226
    public function setContentState($contentId, $groupId, $stateId)
227
    {
228
        $this->logger->logCall(__METHOD__, array('contentId' => $contentId, 'groupId' => $groupId, 'stateId' => $stateId));
229
        $return = $this->persistenceHandler->objectStateHandler()->setContentState($contentId, $groupId, $stateId);
230
231
        $this->cache->clear('objectstate', 'byContent', $contentId, $groupId);
232
233
        return $return;
234
    }
235
236
    /**
237
     * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::getContentState

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

@@ 330-353 (lines=24) @@
327
    /**
328
     * @see \eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler::swap
329
     */
330
    public function locationSwapped($location1ParentId, $location1Id, $location2ParentId, $location2Id)
331
    {
332
        $this->logger->logCall(
333
            __METHOD__,
334
            [
335
                'location1ParentId' => $location1ParentId,
336
                'location1Id' => $location1Id,
337
                'location2ParentId' => $location2ParentId,
338
                'location2Id' => $location2Id,
339
            ]
340
        );
341
342
        $return = $this->persistenceHandler->urlAliasHandler()->locationSwapped(
343
            $location1ParentId,
344
            $location1Id,
345
            $location2ParentId,
346
            $location2Id
347
        );
348
349
        $this->clearLocation($location1Id);
350
        $this->clearLocation($location2Id);
351
352
        return $return;
353
    }
354
}
355

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

@@ 190-200 (lines=11) @@
187
    /**
188
     * @inheritdoc
189
     */
190
    public function swap($locationId1, $locationId2)
191
    {
192
        $this->logger->logCall(__METHOD__, array('location1' => $locationId1, 'location2' => $locationId2));
193
        $locationHandler = $this->persistenceHandler->locationHandler();
194
195
        $return = $locationHandler->swap($locationId1, $locationId2);
196
197
        $this->cache->invalidateTags(['location-'.$locationId1, 'location-'.$locationId2]);
198
199
        return $return;
200
    }
201
202
    /**
203
     * @inheritdoc