Code Duplication    Length = 17-19 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Handler.php 1 location

@@ 97-115 (lines=19) @@
94
     * @param \eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler
95
     * @param \eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler $treeHandler
96
     */
97
    public function __construct(
98
        Gateway $contentGateway,
99
        LocationGateway $locationGateway,
100
        Mapper $mapper,
101
        FieldHandler $fieldHandler,
102
        SlugConverter $slugConverter,
103
        UrlAliasGateway $urlAliasGateway,
104
        ContentTypeHandler $contentTypeHandler,
105
        TreeHandler $treeHandler
106
    ) {
107
        $this->contentGateway = $contentGateway;
108
        $this->locationGateway = $locationGateway;
109
        $this->mapper = $mapper;
110
        $this->fieldHandler = $fieldHandler;
111
        $this->slugConverter = $slugConverter;
112
        $this->urlAliasGateway = $urlAliasGateway;
113
        $this->contentTypeHandler = $contentTypeHandler;
114
        $this->treeHandler = $treeHandler;
115
    }
116
117
    /**
118
     * Creates a new Content entity in the storage engine.

eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php 1 location

@@ 109-125 (lines=17) @@
106
     * @param \eZ\Publish\Core\Persistence\Legacy\Content\Gateway $contentGateway
107
     * @param \eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator $maskGenerator
108
     */
109
    public function __construct(
110
        Gateway $gateway,
111
        Mapper $mapper,
112
        LocationGateway $locationGateway,
113
        LanguageHandler $languageHandler,
114
        SlugConverter $slugConverter,
115
        ContentGateway $contentGateway,
116
        MaskGenerator $maskGenerator
117
    ) {
118
        $this->gateway = $gateway;
119
        $this->mapper = $mapper;
120
        $this->locationGateway = $locationGateway;
121
        $this->languageHandler = $languageHandler;
122
        $this->slugConverter = $slugConverter;
123
        $this->contentGateway = $contentGateway;
124
        $this->maskGenerator = $maskGenerator;
125
    }
126
127
    public function publishUrlAliasForLocation(
128
        $locationId,