Passed
Pull Request — develop (#15)
by Brent
04:06
created

Browser::src()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Brendt\Stitcher\Lib;
4
5
use Symfony\Component\Finder\Finder;
6
7
class Browser
8
{
9
    private $srcDir;
10
    private $publicDir;
11
    private $templateDir;
12
    private $cacheDir;
13
14
    public function __construct(string $srcDir, string $publicDir, string $templateDir, string $cacheDir) {
15
        $this->srcDir = $srcDir;
16
        $this->publicDir = $publicDir;
17
        $this->templateDir = $templateDir;
18
        $this->cacheDir = $cacheDir;
19
    }
20
21
    public function src() : Finder {
22
        return Finder::create()->in($this->srcDir);
23
    }
24
25
    public function public () : Finder {
26
        return Finder::create()->in($this->publicDir);
27
    }
28
29
    public function template() : Finder {
30
        return Finder::create()->in($this->templateDir);
31
    }
32
33
    public function cache() : Finder {
34
        return Finder::create()->in($this->cacheDir);
35
    }
36
37
    public function getSrcDir() : string {
38
        return $this->srcDir;
39
    }
40
41
    public function getPublicDir() : string {
42
        return $this->publicDir;
43
    }
44
45
    public function getTemplateDir() : string {
46
        return $this->templateDir;
47
    }
48
49
    public function getCacheDir() : string {
50
        return $this->cacheDir;
51
    }
52
}
53