Code Duplication    Length = 10-10 lines in 2 locations

src/Subjects/BunchSubject.php 2 locations

@@ 204-213 (lines=10) @@
201
        }
202
203
        // initialize media directory => can be absolute or relative
204
        if ($this->getConfiguration()->hasParam(FileUploadConfigurationKeys::MEDIA_DIRECTORY)) {
205
            try {
206
                $this->setMediaDir($this->resolvePath($this->getConfiguration()->getParam(FileUploadConfigurationKeys::MEDIA_DIRECTORY)));
207
            } catch (\InvalidArgumentException $iae) {
208
                // only if we wanna copy images we need directories
209
                if ($this->hasCopyImages()) {
210
                    $this->getSystemLogger()->warning($iae->getMessage());
211
                }
212
            }
213
        }
214
215
        // initialize images directory => can be absolute or relative
216
        if ($this->getConfiguration()->hasParam(FileUploadConfigurationKeys::IMAGES_FILE_DIRECTORY)) {
@@ 216-225 (lines=10) @@
213
        }
214
215
        // initialize images directory => can be absolute or relative
216
        if ($this->getConfiguration()->hasParam(FileUploadConfigurationKeys::IMAGES_FILE_DIRECTORY)) {
217
            try {
218
                $this->setImagesFileDir($this->resolvePath($this->getConfiguration()->getParam(FileUploadConfigurationKeys::IMAGES_FILE_DIRECTORY)));
219
            } catch (\InvalidArgumentException $iae) {
220
                // only if we wanna copy images we need directories
221
                if ($this->hasCopyImages()) {
222
                    $this->getSystemLogger()->warning($iae->getMessage());
223
                }
224
            }
225
        }
226
227
        // invoke the parent method
228
        parent::setUp($serial);