Code Duplication    Length = 18-20 lines in 2 locations

eZ/Publish/Core/Repository/ContentService.php 1 location

@@ 101-120 (lines=20) @@
98
     * @param \eZ\Publish\Core\Repository\Helper\FieldTypeRegistry $fieldTypeRegistry,
99
     * @param array $settings
100
     */
101
    public function __construct(
102
        RepositoryInterface $repository,
103
        Handler $handler,
104
        Helper\DomainMapper $domainMapper,
105
        Helper\RelationProcessor $relationProcessor,
106
        Helper\NameSchemaService $nameSchemaService,
107
        Helper\FieldTypeRegistry $fieldTypeRegistry,
108
        array $settings = array()
109
    ) {
110
        $this->repository = $repository;
111
        $this->persistenceHandler = $handler;
112
        $this->domainMapper = $domainMapper;
113
        $this->relationProcessor = $relationProcessor;
114
        $this->nameSchemaService = $nameSchemaService;
115
        $this->fieldTypeRegistry = $fieldTypeRegistry;
116
        // Union makes sure default settings are ignored if provided in argument
117
        $this->settings = $settings + array(
118
            //'defaultSetting' => array(),
119
        );
120
    }
121
122
    /**
123
     * Loads a content info object.

eZ/Publish/Core/Repository/LocationService.php 1 location

@@ 83-100 (lines=18) @@
80
     * @param \eZ\Publish\Core\Repository\PermissionsCriterionHandler $permissionsCriterionHandler
81
     * @param array $settings
82
     */
83
    public function __construct(
84
        RepositoryInterface $repository,
85
        Handler $handler,
86
        Helper\DomainMapper $domainMapper,
87
        Helper\NameSchemaService $nameSchemaService,
88
        PermissionsCriterionHandler $permissionsCriterionHandler,
89
        array $settings = array()
90
    ) {
91
        $this->repository = $repository;
92
        $this->persistenceHandler = $handler;
93
        $this->domainMapper = $domainMapper;
94
        $this->nameSchemaService = $nameSchemaService;
95
        // Union makes sure default settings are ignored if provided in argument
96
        $this->settings = $settings + array(
97
            //'defaultSetting' => array(),
98
        );
99
        $this->permissionsCriterionHandler = $permissionsCriterionHandler;
100
    }
101
102
    /**
103
     * Copies the subtree starting from $subtree as a new subtree of $targetLocation.