RunnerOptions::getFiles()   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 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpNsFixer\Runner;
6
7
use Tightenco\Collect\Support\Collection;
8
9
final class RunnerOptions
10
{
11
    /**
12
     * @var Collection
13
     */
14
    private $files;
15
16
    /**
17
     * @var string
18
     */
19
    private $prefix;
20
21
    /**
22
     * @var bool
23
     */
24
    private $skipEmpty;
25
26
    /**
27
     * @var bool
28
     */
29
    private $dryRun;
30
31 14
    public function __construct(iterable $files, string $prefix = '', bool $skipEmpty = false, bool $dryRun = false)
32
    {
33 14
        $this->files = collect($files);
34 14
        $this->prefix = $prefix;
35 14
        $this->skipEmpty = $skipEmpty;
36 14
        $this->dryRun = $dryRun;
37 14
    }
38
39
    /**
40
     * @return Collection
41
     */
42 11
    public function getFiles(): Collection
43
    {
44 11
        return $this->files;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 11
    public function getPrefix(): string
51
    {
52 11
        return $this->prefix;
53
    }
54
55
    /**
56
     * @return bool
57
     */
58 11
    public function isSkipEmpty(): bool
59
    {
60 11
        return $this->skipEmpty;
61
    }
62
63
    /**
64
     * @return bool
65
     */
66 11
    public function isDryRun(): bool
67
    {
68 11
        return $this->dryRun;
69
    }
70
}
71