Code Duplication    Length = 12-14 lines in 2 locations

Classes/Service/Manager.php 2 locations

@@ 159-170 (lines=12) @@
156
     *
157
     * @return array
158
     */
159
    protected function initializeResources(Strategy $strategy, $filepath)
160
    {
161
        $resources = [];
162
        $resourceConfiguration = $strategy->getResources();
163
        foreach ($resourceConfiguration as $resource => $configuration) {
164
            $object = $this->objectManager->get($resource);
165
            $object->start($strategy, $filepath);
166
            $object->setConfiguration($configuration);
167
            $resources[$resource] = $object;
168
        }
169
        return $resources;
170
    }
171
172
    /**
173
     * @param \HDNET\Importr\Domain\Model\Import $import
@@ 177-190 (lines=14) @@
174
     *
175
     * @return array
176
     */
177
    protected function initializeTargets(Import $import)
178
    {
179
        $targets = [];
180
        $targetConfiguration = $import->getStrategy()
181
            ->getTargets();
182
        foreach ($targetConfiguration as $target => $configuration) {
183
            $object = $this->objectManager->get($target);
184
            $object->setConfiguration($configuration);
185
            $object->getConfiguration();
186
            $object->start($import->getStrategy());
187
            $targets[$target] = $object;
188
        }
189
        return $targets;
190
    }
191
192
    /**
193
     * @param int $interval