Completed
Pull Request — master (#129)
by
unknown
08:06
created

PhpCsTool::isEnableFaces()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace PhpGitHooks\Module\PhpCs\Contract\Command;
4
5
use Bruli\EventBusBundle\CommandBus\CommandInterface;
6
7
class PhpCsTool implements CommandInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $files;
13
    /**
14
     * @var string
15
     */
16
    private $standard;
17
    /**
18
     * @var string
19
     */
20
    private $errorMessage;
21
    /**
22
     * @var string
23
     */
24
    private $enableFaces;
25
    /**
26
     * @var string
27
     */
28
    private $ignore;
29
30
    /**
31
     * PhpCsToolCommand constructor.
32
     *
33
     * @param array $files
34
     * @param string $standard
35
     * @param string $errorMessage
36
     * @param bool $enableFaces
37
     * @param string $ignore
38
     */
39 3
    public function __construct(array $files, $standard, $errorMessage, $enableFaces, $ignore)
40
    {
41 3
        $this->files = $files;
42 3
        $this->standard = $standard;
43 3
        $this->errorMessage = $errorMessage;
44 3
        $this->enableFaces = $enableFaces;
0 ignored issues
show
Documentation Bug introduced by
The property $enableFaces was declared of type string, but $enableFaces is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
45 3
        $this->ignore = $ignore;
46 3
    }
47
48
    /**
49
     * @return string
50
     */
51 2
    public function getErrorMessage()
52
    {
53 2
        return $this->errorMessage;
54
    }
55
56
    /**
57
     * @return string
58
     */
59 2
    public function isEnableFaces()
60
    {
61 2
        return $this->enableFaces;
62
    }
63
64
    /**
65
     * @return array
66
     */
67 2
    public function getFiles()
68
    {
69 2
        return $this->files;
70
    }
71
72
    /**
73
     * @return string
74
     */
75 2
    public function getStandard()
76
    {
77 2
        return $this->standard;
78
    }
79
80
    /**
81
     * @return string
82
     */
83 2
    public function getIgnore()
84
    {
85 2
        return $this->ignore;
86
    }
87
}
88