Code Duplication    Length = 14-15 lines in 3 locations

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

@@ 462-475 (lines=14) @@
459
     *
460
     * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo
461
     */
462
    public function deleteVersion(VersionInfo $versionInfo)
463
    {
464
        $returnValue = $this->service->deleteVersion($versionInfo);
465
        $this->signalDispatcher->emit(
466
            new DeleteVersionSignal(
467
                array(
468
                    'contentId' => $versionInfo->contentInfo->id,
469
                    'versionNo' => $versionInfo->versionNo,
470
                )
471
            )
472
        );
473
474
        return $returnValue;
475
    }
476
477
    /**
478
     * Loads all versions for the given content.
@@ 565-579 (lines=15) @@
562
     *
563
     * @return \eZ\Publish\API\Repository\Values\Content\Relation the newly created relation
564
     */
565
    public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)
566
    {
567
        $returnValue = $this->service->addRelation($sourceVersion, $destinationContent);
568
        $this->signalDispatcher->emit(
569
            new AddRelationSignal(
570
                array(
571
                    'srcContentId' => $sourceVersion->contentInfo->id,
572
                    'srcVersionNo' => $sourceVersion->versionNo,
573
                    'dstContentId' => $destinationContent->id,
574
                )
575
            )
576
        );
577
578
        return $returnValue;
579
    }
580
581
    /**
582
     * Removes a relation of type COMMON from a draft.
@@ 591-605 (lines=15) @@
588
     * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion
589
     * @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent
590
     */
591
    public function deleteRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)
592
    {
593
        $returnValue = $this->service->deleteRelation($sourceVersion, $destinationContent);
594
        $this->signalDispatcher->emit(
595
            new DeleteRelationSignal(
596
                array(
597
                    'srcContentId' => $sourceVersion->contentInfo->id,
598
                    'srcVersionNo' => $sourceVersion->versionNo,
599
                    'dstContentId' => $destinationContent->id,
600
                )
601
            )
602
        );
603
604
        return $returnValue;
605
    }
606
607
    /**
608
     * Adds translation information to the content object.