1 | <?php |
||
22 | class Compare extends Base |
||
23 | { |
||
24 | /** |
||
25 | * Compare A/B command snippet. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $compare = ''; |
||
30 | |||
31 | /** |
||
32 | * Ignore line endings. |
||
33 | * |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $ignoreEOL = ''; |
||
37 | |||
38 | /** |
||
39 | * Show statistics only. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $stats = ''; |
||
44 | |||
45 | /** |
||
46 | * Compare two given revisions. |
||
47 | * |
||
48 | * @param string $from |
||
49 | * @param string $to |
||
50 | * @return \SebastianFeldmann\Git\Command\Diff\Compare |
||
51 | */ |
||
52 | 4 | public function revisions(string $from, string $to) : Compare |
|
57 | |||
58 | /** |
||
59 | * Set diff statistics option. |
||
60 | * |
||
61 | * @param bool $bool |
||
62 | * @return \SebastianFeldmann\Git\Command\Diff\Compare |
||
63 | */ |
||
64 | 1 | public function statsOnly(bool $bool = true) : Compare |
|
69 | |||
70 | /** |
||
71 | * Set ignore spaces at end of line. |
||
72 | * |
||
73 | * @param bool $bool |
||
74 | * @return \SebastianFeldmann\Git\Command\Diff\Compare |
||
75 | */ |
||
76 | 1 | public function ignoreWhitespacesAtEndOfLine(bool $bool = true) : Compare |
|
81 | |||
82 | /** |
||
83 | * Set ignore all whitespaces. |
||
84 | * |
||
85 | * @param bool $bool |
||
86 | * @return \SebastianFeldmann\Git\Command\Diff\Compare |
||
87 | */ |
||
88 | 1 | public function ignoreWhitespaces(bool $bool = true) : Compare |
|
93 | |||
94 | /** |
||
95 | * Return the command to execute. |
||
96 | * |
||
97 | * @return string |
||
98 | * @throws \RuntimeException |
||
99 | */ |
||
100 | 4 | protected function getGitCommand(): string |
|
104 | } |
||
105 |
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.