Failed Conditions
Push — master ( d8d7f6...ee5f34 )
by Jonathan
11s
created

GlobFinder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A findMigrations() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Finder;
6
7
use function glob;
8
use function rtrim;
9
10
final class GlobFinder extends Finder
11
{
12
    /**
13
     * @return string[]
14
     */
15 3
    public function findMigrations(string $directory, ?string $namespace = null) : array
16
    {
17 3
        $dir = $this->getRealPath($directory);
18
19 1
        $files = glob(rtrim($dir, '/') . '/Version*.php');
20
21 1
        return $this->loadMigrations($files, $namespace);
22
    }
23
}
24