Code Duplication    Length = 10-20 lines in 3 locations

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}

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

@@ 410-419 (lines=10) @@
407
    /**
408
     * @see eZ\Publish\SPI\Persistence\User\Handler::assignRole
409
     */
410
    public function assignRole($contentId, $roleId, array $limitation = null)
411
    {
412
        $this->logger->logCall(__METHOD__, array('group' => $contentId, 'role' => $roleId, 'limitation' => $limitation));
413
        $return = $this->persistenceHandler->userHandler()->assignRole($contentId, $roleId, $limitation);
414
415
        $this->cache->deleteItem("ez-role-assignment-by-role-${roleId}");
416
        $this->cache->invalidateTags(['role-assignment-group-list-'.$contentId]);
417
418
        return $return;
419
    }
420
421
    /**
422
     * @see eZ\Publish\SPI\Persistence\User\Handler::unassignRole

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

@@ 262-281 (lines=20) @@
259
    /**
260
     * @see eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler::locationCopied
261
     */
262
    public function locationCopied($locationId, $newLocationId, $newParentId)
263
    {
264
        $this->logger->logCall(
265
            __METHOD__,
266
            array(
267
                'oldLocation' => $locationId,
268
                'newLocation' => $newLocationId,
269
                'newParent' => $newParentId,
270
            )
271
        );
272
273
        $return = $this->persistenceHandler->urlAliasHandler()->locationCopied(
274
            $locationId,
275
            $newLocationId,
276
            $newParentId
277
        );
278
        $this->cache->invalidateTags(['urlAlias-location-'.$locationId, 'urlAlias-location-'.$newLocationId]);
279
280
        return $return;
281
    }
282
283
    /**
284
     * @see eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler::locationDeleted