Code Duplication    Length = 14-15 lines in 3 locations

eZ/Publish/Core/SignalSlot/ContentService.php 3 locations

@@ 449-462 (lines=14) @@
446
     *
447
     * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo
448
     */
449
    public function deleteVersion(VersionInfo $versionInfo)
450
    {
451
        $returnValue = $this->service->deleteVersion($versionInfo);
452
        $this->signalDispatcher->emit(
453
            new DeleteVersionSignal(
454
                array(
455
                    'contentId' => $versionInfo->contentInfo->id,
456
                    'versionNo' => $versionInfo->versionNo,
457
                )
458
            )
459
        );
460
461
        return $returnValue;
462
    }
463
464
    /**
465
     * Loads all versions for the given content.
@@ 552-566 (lines=15) @@
549
     *
550
     * @return \eZ\Publish\API\Repository\Values\Content\Relation the newly created relation
551
     */
552
    public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)
553
    {
554
        $returnValue = $this->service->addRelation($sourceVersion, $destinationContent);
555
        $this->signalDispatcher->emit(
556
            new AddRelationSignal(
557
                array(
558
                    'srcContentId' => $sourceVersion->contentInfo->id,
559
                    'srcVersionNo' => $sourceVersion->versionNo,
560
                    'dstContentId' => $destinationContent->id,
561
                )
562
            )
563
        );
564
565
        return $returnValue;
566
    }
567
568
    /**
569
     * Removes a relation of type COMMON from a draft.
@@ 578-592 (lines=15) @@
575
     * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion
576
     * @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent
577
     */
578
    public function deleteRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)
579
    {
580
        $returnValue = $this->service->deleteRelation($sourceVersion, $destinationContent);
581
        $this->signalDispatcher->emit(
582
            new DeleteRelationSignal(
583
                array(
584
                    'srcContentId' => $sourceVersion->contentInfo->id,
585
                    'srcVersionNo' => $sourceVersion->versionNo,
586
                    'dstContentId' => $destinationContent->id,
587
                )
588
            )
589
        );
590
591
        return $returnValue;
592
    }
593
594
    /**
595
     * Adds translation information to the content object.