Code Duplication    Length = 14-15 lines in 2 locations

eZ/Publish/Core/SignalSlot/LocationService.php 2 locations

@@ 74-88 (lines=15) @@
71
     *
72
     * @return \eZ\Publish\API\Repository\Values\Content\Location The newly created location of the copied subtree
73
     */
74
    public function copySubtree(Location $subtree, Location $targetParentLocation)
75
    {
76
        $returnValue = $this->service->copySubtree($subtree, $targetParentLocation);
77
        $this->signalDispatcher->emit(
78
            new CopySubtreeSignal(
79
                array(
80
                    'subtreeId' => $subtree->id,
81
                    'targetParentLocationId' => $targetParentLocation->id,
82
                    'targetNewSubtreeId' => $returnValue->id,
83
                )
84
            )
85
        );
86
87
        return $returnValue;
88
    }
89
90
    /**
91
     * Loads a location object from its $locationId.
@@ 315-328 (lines=14) @@
312
     * @param \eZ\Publish\API\Repository\Values\Content\Location $location
313
     * @param \eZ\Publish\API\Repository\Values\Content\Location $newParentLocation
314
     */
315
    public function moveSubtree(Location $location, Location $newParentLocation)
316
    {
317
        $returnValue = $this->service->moveSubtree($location, $newParentLocation);
318
        $this->signalDispatcher->emit(
319
            new MoveSubtreeSignal(
320
                array(
321
                    'locationId' => $location->id,
322
                    'newParentLocationId' => $newParentLocation->id,
323
                )
324
            )
325
        );
326
327
        return $returnValue;
328
    }
329
330
    /**
331
     * Deletes $location and all its descendants.