Code Duplication    Length = 8-9 lines in 2 locations

DependencyInjection/StfalconStudioDoctrineRedisCacheExtension.php 1 location

@@ 55-63 (lines=9) @@
52
     *
53
     * @return string
54
     */
55
    public function getLastMigrationVersion(string $dir): string
56
    {
57
        $migrations = $this->migrationFinder->findMigrations($dir);
58
59
        $versions = \array_keys($migrations);
60
        $latest = \end($versions);
61
62
        return false !== $latest ? (string) $latest : '0';
63
    }
64
}
65

Service/Migration/MigrationVersionService.php 1 location

@@ 43-50 (lines=8) @@
40
    /**
41
     * @return string
42
     */
43
    public function getLastMigrationVersion(): string
44
    {
45
        $migrations = $this->migrationFinder->findMigrations($this->migrationDirectory);
46
        $versions = \array_keys($migrations);
47
        $latest = \end($versions);
48
49
        return false !== $latest ? (string) $latest : '0';
50
    }
51
}
52