Code Duplication    Length = 8-8 lines in 2 locations

app/modules/Image/Storage.php 2 locations

@@ 373-380 (lines=8) @@
370
     */
371
    private function checkOriginalExists($originalAbsPath)
372
    {
373
        if (!file_exists($originalAbsPath)) {
374
            if (IMG_DEBUG_MODE) {
375
                throw new \Exception("Файл {$originalAbsPath} не существует");
376
            } else {
377
                $this->exists = false;
378
            }
379
            return;
380
        }
381
    }
382
383
    /**
@@ 394-401 (lines=8) @@
391
            $image->save($this->getCachedAbsPath());
392
            // Снимаем блокировку
393
            $this->unlockOriginal($originalAbsPath);
394
        } else {
395
            if (IMG_DEBUG_MODE) {
396
                throw new \Exception("Файл {$originalAbsPath} заблокирован механизмом проверки _LOCK или не существует");
397
            } else {
398
                $this->exists = false;
399
            }
400
            return;
401
        }
402
    }
403
404
    /**