fix folder name

This commit is contained in:
2021-03-18 13:37:13 +01:00
parent a2f6773f5a
commit eaa0ad925f
1578 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Chill\MainBundle\Doctrine\Migrations;
use Doctrine\Migrations\Version\Comparator;
use Doctrine\Migrations\Version\Version;
use function strcmp;
use function explode;
/**
* Compare Version classes names from different namespaces and order them.
*
* Version are compared on the date's class.
*/
final class VersionComparator implements Comparator
{
private function getNumber(Version $version): string
{
$names = explode("\\", (string) $version);
return end($names);
}
public function compare(Version $a, Version $b): int
{
$q = strcmp($this->getNumber($a), $this->getNumber($b));
return $q;
}
}