Code Duplication    Length = 5-5 lines in 2 locations

src/Util/MigrantUtil.php 2 locations

@@ 80-84 (lines=5) @@
77
    private function getDependencies(string $package): array
78
    {
79
        $srcFolder = getcwd() . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR;
80
        if (file_exists($srcFolder . '.migrant')) {
81
            $depend = require($srcFolder . '.migrant');
82
83
            return isset($depend['packages']) ? $depend['packages'] : [];
84
        }
85
86
        try {
87
            if (class_exists($package)) {
@@ 94-98 (lines=5) @@
91
                if (false !== strpos($location, 'vendor') && preg_match('#(?<packagePath>.+)/src/.+\.php#', $location, $match)) {
92
                    $path = $match['packagePath'] . DIRECTORY_SEPARATOR . '.migrant';
93
94
                    if (file_exists($path)) {
95
                        $depend = require_once $path;
96
97
                        return isset($depend['packages']) ? $depend['packages'] : [];
98
                    }
99
                }
100
            }
101
        } catch (Exception $e) {