XervicePathFinder::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
4
namespace Xervice\Twig\Business\Model\Path;
5
6
7
use Symfony\Component\Finder\Finder;
8
9
class XervicePathFinder extends Finder implements XervicePathFinderInterface
10
{
11
    /**
12
     * @var array
13
     */
14
    private $paths;
15
16
    /**
17
     * XervicePathFinder constructor.
18
     *
19
     * @param array $paths
20
     */
21 2
    public function __construct(array $paths)
22
    {
23 2
        $this->paths = $paths;
24 2
    }
25
26
    /**
27
     * @return $this
28
     */
29 2
    public function getPaths()
30
    {
31 2
        return $this->in($this->paths)->directories()->depth(0);
32
    }
33
34
}