@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | ->method('hasParameterOption') |
134 | 134 | ->willReturnMap([ |
135 | 135 | ['--output', false, true], |
136 | - ['--default-value', false,$hasDefault], |
|
136 | + ['--default-value', false, $hasDefault], |
|
137 | 137 | ]); |
138 | 138 | |
139 | 139 | if ($expectedMessage !== null) { |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | $output = ''; |
143 | 143 | $this->consoleOutput->expects($this->any()) |
144 | 144 | ->method('writeln') |
145 | - ->willReturnCallback(function ($value) { |
|
145 | + ->willReturnCallback(function($value) { |
|
146 | 146 | global $output; |
147 | - $output .= $value . "\n"; |
|
147 | + $output .= $value."\n"; |
|
148 | 148 | return $output; |
149 | 149 | }); |
150 | 150 | } |
@@ -91,7 +91,7 @@ |
||
91 | 91 | ]; |
92 | 92 | $this->consoleOutput->expects($this->exactly(3)) |
93 | 93 | ->method('writeln') |
94 | - ->willReturnCallback(function (string $message, int $level) use (&$calls): void { |
|
94 | + ->willReturnCallback(function(string $message, int $level) use (&$calls): void { |
|
95 | 95 | $call = array_shift($calls); |
96 | 96 | $this->assertStringContainsString($call[0], $message); |
97 | 97 | $this->assertSame($call[1], $level); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | ->willReturnMap($options); |
194 | 194 | $this->consoleInput->expects($this->any()) |
195 | 195 | ->method('hasParameterOption') |
196 | - ->willReturnCallback(function (string|array $config, bool $default = false) use ($parameterOptions): bool { |
|
196 | + ->willReturnCallback(function(string | array $config, bool $default = false) use ($parameterOptions): bool { |
|
197 | 197 | foreach ($parameterOptions as $parameterOption) { |
198 | 198 | if ($config === $parameterOption[0] |
199 | 199 | // Check the default value if the maps has 3 entries |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } else { |
415 | 415 | $this->consoleInput->expects($this->atLeastOnce()) |
416 | 416 | ->method('hasParameterOption') |
417 | - ->willReturnCallback(function (string|array $config, bool $default = false): bool { |
|
417 | + ->willReturnCallback(function(string | array $config, bool $default = false): bool { |
|
418 | 418 | if ($config === '--default-value' && $default === false) { |
419 | 419 | return true; |
420 | 420 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | $this->commandTester->execute($input); |
55 | 55 | |
56 | - $this->assertMatchesRegularExpression('/' . $pattern . '/', $this->commandTester->getDisplay()); |
|
56 | + $this->assertMatchesRegularExpression('/'.$pattern.'/', $this->commandTester->getDisplay()); |
|
57 | 57 | $this->assertSame($statusCode, $this->commandTester->getStatusCode()); |
58 | 58 | } |
59 | 59 |
@@ -157,7 +157,7 @@ |
||
157 | 157 | ]; |
158 | 158 | $this->consoleOutput->expects($this->exactly(3)) |
159 | 159 | ->method('writeln') |
160 | - ->willReturnCallback(function (string $message) use (&$calls): void { |
|
160 | + ->willReturnCallback(function(string $message) use (&$calls): void { |
|
161 | 161 | $call = array_shift($calls); |
162 | 162 | $this->assertStringContainsString($call[0], $message); |
163 | 163 | }); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | $this->input = $this->createMock(InputInterface::class); |
42 | 42 | $this->input->method('getArgument') |
43 | - ->willReturnCallback(function ($arg) { |
|
43 | + ->willReturnCallback(function($arg) { |
|
44 | 44 | if ($arg === 'group') { |
45 | 45 | return 'myGroup'; |
46 | 46 | } elseif ($arg === 'user') { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function testDoesNotExists(): void { |
43 | 43 | $gid = 'myGroup'; |
44 | 44 | $this->input->method('getArgument') |
45 | - ->willReturnCallback(function ($arg) use ($gid) { |
|
45 | + ->willReturnCallback(function($arg) use ($gid) { |
|
46 | 46 | if ($arg === 'groupid') { |
47 | 47 | return $gid; |
48 | 48 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $this->output->expects($this->once()) |
56 | 56 | ->method('writeln') |
57 | - ->with($this->equalTo('<error>Group "' . $gid . '" does not exist.</error>')); |
|
57 | + ->with($this->equalTo('<error>Group "'.$gid.'" does not exist.</error>')); |
|
58 | 58 | |
59 | 59 | $this->invokePrivate($this->command, 'execute', [$this->input, $this->output]); |
60 | 60 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testInfo(): void { |
63 | 63 | $gid = 'myGroup'; |
64 | 64 | $this->input->method('getArgument') |
65 | - ->willReturnCallback(function ($arg) use ($gid) { |
|
65 | + ->willReturnCallback(function($arg) use ($gid) { |
|
66 | 66 | if ($arg === 'groupid') { |
67 | 67 | return $gid; |
68 | 68 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ]); |
75 | 75 | |
76 | 76 | $this->input->method('getOption') |
77 | - ->willReturnCallback(function ($arg) { |
|
77 | + ->willReturnCallback(function($arg) { |
|
78 | 78 | if ($arg === 'limit') { |
79 | 79 | return '100'; |
80 | 80 | } elseif ($arg === 'offset') { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | ->willReturn(['LDAP']); |
156 | 156 | |
157 | 157 | $this->input->method('getOption') |
158 | - ->willReturnCallback(function ($arg) { |
|
158 | + ->willReturnCallback(function($arg) { |
|
159 | 159 | if ($arg === 'limit') { |
160 | 160 | return '100'; |
161 | 161 | } elseif ($arg === 'offset') { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $this->input = $this->createMock(InputInterface::class); |
36 | 36 | $this->input->method('getArgument') |
37 | - ->willReturnCallback(function ($arg) { |
|
37 | + ->willReturnCallback(function($arg) { |
|
38 | 38 | if ($arg === 'groupid') { |
39 | 39 | return 'myGroup'; |
40 | 40 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ->method('createGroup'); |
55 | 55 | $this->output->expects($this->once()) |
56 | 56 | ->method('writeln') |
57 | - ->with($this->equalTo('<error>Group "' . $gid . '" already exists.</error>')); |
|
57 | + ->with($this->equalTo('<error>Group "'.$gid.'" already exists.</error>')); |
|
58 | 58 | |
59 | 59 | $this->invokePrivate($this->command, 'execute', [$this->input, $this->output]); |
60 | 60 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | ->with($this->equalTo($gid)); |
73 | 73 | $this->output->expects($this->once()) |
74 | 74 | ->method('writeln') |
75 | - ->with($this->equalTo('Created group "' . $group->getGID() . '"')); |
|
75 | + ->with($this->equalTo('Created group "'.$group->getGID().'"')); |
|
76 | 76 | |
77 | 77 | $this->invokePrivate($this->command, 'execute', [$this->input, $this->output]); |
78 | 78 | } |