• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valksor / php-doctrine-tools / 21323315897

28 Dec 2025 12:41AM UTC coverage: 6.965% (-16.9%) from 23.881%
21323315897

push

github

k0d3r1s
funding coffee

14 of 201 relevant lines covered (6.97%)

0.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Doctrine/Migrations/VersionComparatorWithoutNamespace.php
1
<?php declare(strict_types = 1);
2

3
/*
4
 * This file is part of the Valksor package.
5
 *
6
 * (c) Davis Zalitis (k0d3r1s)
7
 * (c) SIA Valksor <packages@valksor.com>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12

13
namespace Valksor\Component\DoctrineTools\Doctrine\Migrations;
14

15
use Doctrine\Migrations\Version\Comparator;
16
use Doctrine\Migrations\Version\Version;
17

18
use function array_pop;
19
use function explode;
20
use function strcmp;
21

22
class VersionComparatorWithoutNamespace implements Comparator
23
{
24
    public function compare(
25
        Version $a,
26
        Version $b,
27
    ): int {
28
        return strcmp($this->versionWithoutNamespace($a), $this->versionWithoutNamespace($b));
×
29
    }
30

31
    private function versionWithoutNamespace(
32
        Version $version,
33
    ): string {
34
        $path = explode('\\', (string) $version);
×
35

36
        return array_pop($path);
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc