Code Duplication    Length = 5-5 lines in 2 locations

src/Util/MigrantUtil.php 2 locations

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