cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,12 +1,19 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Doctrine\Migrations;
use Doctrine\Migrations\Version\Comparator;
use Doctrine\Migrations\Version\Version;
use function strcmp;
use function explode;
use function strcmp;
/**
* Compare Version classes names from different namespaces and order them.
@@ -15,18 +22,15 @@ use function explode;
*/
final class VersionComparator implements Comparator
{
public function compare(Version $a, Version $b): int
{
return strcmp($this->getNumber($a), $this->getNumber($b));
}
private function getNumber(Version $version): string
{
$names = explode("\\", (string) $version);
$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;
}
}