@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | if ($checkOnlyBeginning) { |
47 | 47 | // overwrite the detection logic to only check the beginning og the string |
48 | - $this->stringDetection = function (string $content, string $term): bool { |
|
48 | + $this->stringDetection = function(string $content, string $term): bool { |
|
49 | 49 | return strpos($content, $term) === 0; |
50 | 50 | }; |
51 | 51 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $this->isCaseSensitive = $caseSensitive; |
56 | 56 | $this->hint = 'Commit message should not contain blacklisted words'; |
57 | - $this->stringDetection = function (string $content, string $term): bool { |
|
57 | + $this->stringDetection = function(string $content, string $term): bool { |
|
58 | 58 | return strpos($content, $term) !== false; |
59 | 59 | }; |
60 | 60 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | ksort($relevantContent); |
114 | 114 | |
115 | - return md5((string)json_encode($relevantContent)); |
|
115 | + return md5((string) json_encode($relevantContent)); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -127,6 +127,6 @@ discard block |
||
127 | 127 | if (!file_exists($file)) { |
128 | 128 | throw new Exception($file . ' not found'); |
129 | 129 | } |
130 | - return (string)file_get_contents($file); |
|
130 | + return (string) file_get_contents($file); |
|
131 | 131 | } |
132 | 132 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | */ |
91 | 91 | public function getArgument(string $name, string $default = ''): string |
92 | 92 | { |
93 | - return (string)($this->getArguments()[$name] ?? $default); |
|
93 | + return (string) ($this->getArguments()[$name] ?? $default); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | ob_start(); |
80 | 80 | $class::$method(); |
81 | - return (string)ob_get_clean(); |
|
81 | + return (string) ob_get_clean(); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -107,6 +107,6 @@ discard block |
||
107 | 107 | */ |
108 | 108 | protected function isStaticMethodCall(string $class): bool |
109 | 109 | { |
110 | - return (bool)preg_match('#^\\\\.+::.+$#i', $class); |
|
110 | + return (bool) preg_match('#^\\\\.+::.+$#i', $class); |
|
111 | 111 | } |
112 | 112 | } |
@@ -67,9 +67,9 @@ |
||
67 | 67 | public function beforeHook(): void |
68 | 68 | { |
69 | 69 | $this->commentChar = $this->repository->getConfigOperator()->getSafely('core.commentchar', '#'); |
70 | - $this->file = (string)$this->io->getArgument('file'); |
|
71 | - $this->mode = (string)$this->io->getArgument('mode'); |
|
72 | - $this->hash = (string)$this->io->getArgument('hash'); |
|
70 | + $this->file = (string) $this->io->getArgument('file'); |
|
71 | + $this->mode = (string) $this->io->getArgument('mode'); |
|
72 | + $this->hash = (string) $this->io->getArgument('hash'); |
|
73 | 73 | |
74 | 74 | if (empty($this->file)) { |
75 | 75 | throw new RuntimeException('commit message file argument is missing'); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | */ |
102 | 102 | public function testSetupNoConfig(): void |
103 | 103 | { |
104 | - $repo = new DummyRepo( |
|
104 | + $repo = new DummyRepo( |
|
105 | 105 | [], |
106 | 106 | [ |
107 | 107 | 'vendor' => [ |
@@ -126,7 +126,7 @@ |
||
126 | 126 | true, |
127 | 127 | $this->io->askAndValidate( |
128 | 128 | 'foo', |
129 | - function () { |
|
129 | + function() { |
|
130 | 130 | return true; |
131 | 131 | }, |
132 | 132 | null, |
@@ -232,7 +232,7 @@ |
||
232 | 232 | $io = new DefaultIO($input, $output, $helper); |
233 | 233 | $answer = $io->askAndValidate( |
234 | 234 | 'foo', |
235 | - function () { |
|
235 | + function() { |
|
236 | 236 | return true; |
237 | 237 | } |
238 | 238 | ); |