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

Browser   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 4
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 9
lcom 4
cbo 1

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A src() 0 3 1
A public() 0 3 1
A template() 0 3 1
A cache() 0 3 1
A getSrcDir() 0 3 1
A getPublicDir() 0 3 1
A getTemplateDir() 0 3 1
A getCacheDir() 0 3 1
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