Completed
Push — master ( 4cb8c1...d37ad3 )
by
unknown
13s queued 12s
created

Finder::depth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Jellyfish\FinderSymfony;
4
5
use Iterator;
6
use Jellyfish\Finder\FinderInterface;
7
use Symfony\Component\Finder\Finder as SymfonyFinder;
8
9
class Finder implements FinderInterface
10
{
11
    /**
12
     * @var \Symfony\Component\Finder\Finder
13
     */
14
    protected $symfonyFinder;
15
16
    /**
17
     * @param \Symfony\Component\Finder\Finder $symfonyFinder
18
     */
19
    public function __construct(SymfonyFinder $symfonyFinder)
20
    {
21
        $this->symfonyFinder = $symfonyFinder;
22
    }
23
24
    /**
25
     * @param string $directory
26
     *
27
     * @return \Jellyfish\Finder\FinderInterface
28
     */
29
    public function in(string $directory): FinderInterface
30
    {
31
        $this->symfonyFinder->in($directory);
32
33
        return $this;
34
    }
35
36
    /**
37
     * @param string $pattern
38
     *
39
     * @return \Jellyfish\Finder\FinderInterface
40
     */
41
    public function name(string $pattern): FinderInterface
42
    {
43
        $this->symfonyFinder->name($pattern);
44
45
        return $this;
46
    }
47
48
    /**
49
     * @param int $level
50
     *
51
     * @return \Jellyfish\Finder\FinderInterface
52
     */
53
    public function depth(int $level): FinderInterface
54
    {
55
        $this->symfonyFinder->depth($level);
56
57
        return $this;
58
    }
59
60
    /**
61
     * @return \Iterator
62
     */
63
    public function getIterator(): Iterator
64
    {
65
        return $this->symfonyFinder->getIterator();
66
    }
67
}
68