CandidatesFinder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0
ccs 6
cts 6
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A find() 0 8 1
1
<?php
2
3
namespace Tworzenieweb\SqlProvisioner\Filesystem;
4
5
use Symfony\Component\Finder\Finder;
6
7
/**
8
 * @author Luke Adamczewski
9
 * @package Tworzenieweb\SqlProvisioner\Filesystem
10
 */
11
class CandidatesFinder
12
{
13
    const FILES_MASK = '/^\d{3,}\_.*\.sql$/';
14
15
16
17
    /**
18
     * @param string $path
19
     * @return Finder
20
     */
21 1
    public function find($path)
22
    {
23 1
        return Finder::create()
24 1
            ->files()
25 1
            ->name(self::FILES_MASK)
26 1
            ->sortByName()
27 1
            ->in($path);
28
    }
29
}
30