Code Duplication    Length = 16-16 lines in 3 locations

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

@@ 264-279 (lines=16) @@
261
     *
262
     * @return \eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value
263
     */
264
    public function hideLocation(Location $location)
265
    {
266
        $returnValue = $this->service->hideLocation($location);
267
        $this->signalDispatcher->emit(
268
            new HideLocationSignal(
269
                array(
270
                    'locationId' => $location->id,
271
                    'contentId' => $location->contentId,
272
                    'currentVersionNo' => $returnValue->getContentInfo()->currentVersionNo,
273
                    'parentLocationId' => $returnValue->parentLocationId,
274
                )
275
            )
276
        );
277
278
        return $returnValue;
279
    }
280
281
    /**
282
     * Unhides the $location.
@@ 293-308 (lines=16) @@
290
     *
291
     * @return \eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value
292
     */
293
    public function unhideLocation(Location $location)
294
    {
295
        $returnValue = $this->service->unhideLocation($location);
296
        $this->signalDispatcher->emit(
297
            new UnhideLocationSignal(
298
                array(
299
                    'locationId' => $location->id,
300
                    'contentId' => $location->contentId,
301
                    'currentVersionNo' => $returnValue->getContentInfo()->currentVersionNo,
302
                    'parentLocationId' => $returnValue->parentLocationId,
303
                )
304
            )
305
        );
306
307
        return $returnValue;
308
    }
309
310
    /**
311
     * Moves the subtree to $newParentLocation.

eZ/Publish/Core/SignalSlot/TrashService.php 1 location

@@ 83-98 (lines=16) @@
80
     *
81
     * @return null|\eZ\Publish\API\Repository\Values\Content\TrashItem null if location was deleted, otherwise TrashItem
82
     */
83
    public function trash(Location $location)
84
    {
85
        $returnValue = $this->service->trash($location);
86
        $this->signalDispatcher->emit(
87
            new TrashSignal(
88
                array(
89
                    'locationId' => $location->id,
90
                    'parentLocationId' => $location->parentLocationId,
91
                    'contentId' => $location->contentId,
92
                    'contentTrashed' => $returnValue instanceof TrashItem,
93
                )
94
            )
95
        );
96
97
        return $returnValue;
98
    }
99
100
    /**
101
     * Recovers the $trashedLocation at its original place if possible.