@@ -164,7 +164,7 @@ |
||
164 | 164 | private function createClosure(): Closure |
165 | 165 | { |
166 | 166 | $dependencies = $this->getDependencies(); |
167 | - $callback = function (TestifyConfiguratorInterface $configurator) use ($dependencies): void { |
|
167 | + $callback = function(TestifyConfiguratorInterface $configurator) use ($dependencies): void { |
|
168 | 168 | foreach ($dependencies as $key => $value) { |
169 | 169 | $configurator->getContainer()->set($key, $value); |
170 | 170 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function testSetAddsServiceOnConstruction(): void |
55 | 55 | { |
56 | 56 | //Arrange |
57 | - $service = function () { |
|
57 | + $service = function() { |
|
58 | 58 | return static::SERVICE; |
59 | 59 | }; |
60 | 60 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | //Arrange |
76 | 76 | $container = new Container(); |
77 | - $service = function () { |
|
77 | + $service = function() { |
|
78 | 78 | return static::SERVICE; |
79 | 79 | }; |
80 | 80 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $this->expectException(FrozenServiceException::class); |
94 | 94 | |
95 | 95 | $container = new Container(); |
96 | - $service = function () { |
|
96 | + $service = function() { |
|
97 | 97 | return static::SERVICE; |
98 | 98 | }; |
99 | 99 | $container->set(static::SERVICE, $service); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | { |
109 | 109 | //Arrange |
110 | 110 | $container = new Container(); |
111 | - $container->set(static::SERVICE, function () { |
|
111 | + $container->set(static::SERVICE, function() { |
|
112 | 112 | return new class |
113 | 113 | { |
114 | 114 | }; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | //Arrange |
131 | 131 | $container = new Container(); |
132 | - $container->set(static::SERVICE, function () { |
|
132 | + $container->set(static::SERVICE, function() { |
|
133 | 133 | return new class |
134 | 134 | { |
135 | 135 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | //Arrange |
160 | 160 | $container = new Container(); |
161 | - $container->set(static::SERVICE, $container->factory(function () { |
|
161 | + $container->set(static::SERVICE, $container->factory(function() { |
|
162 | 162 | return new class |
163 | 163 | { |
164 | 164 | }; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | public function testHasReturnsTrueWhenServiceWasAdded(): void |
199 | 199 | { |
200 | 200 | $container = new Container(); |
201 | - $container->set(static::SERVICE, function (): void { |
|
201 | + $container->set(static::SERVICE, function(): void { |
|
202 | 202 | }); |
203 | 203 | |
204 | 204 | $this->assertTrue($container->has(static::SERVICE)); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | { |
212 | 212 | //Arrange |
213 | 213 | $container = new Container(); |
214 | - $container->set(static::SERVICE, function (): void { |
|
214 | + $container->set(static::SERVICE, function(): void { |
|
215 | 215 | }); |
216 | 216 | |
217 | 217 | //Act |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | { |
262 | 262 | //Arrange |
263 | 263 | $container = new Container(); |
264 | - $service = function () { |
|
264 | + $service = function() { |
|
265 | 265 | return static::SERVICE; |
266 | 266 | }; |
267 | 267 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | public function testExtendThrowsExceptionWhenPassedServiceIsNotAService(): void |
279 | 279 | { |
280 | 280 | $container = new Container(); |
281 | - $container->set(static::SERVICE, function () { |
|
281 | + $container->set(static::SERVICE, function() { |
|
282 | 282 | return [static::SERVICE_PROPERTY_1 => true]; |
283 | 283 | }); |
284 | 284 | |
@@ -292,14 +292,14 @@ discard block |
||
292 | 292 | public function testExtendThrowsExceptionWhenTheServiceToBeExtendedIsFrozen(): void |
293 | 293 | { |
294 | 294 | $container = new Container(); |
295 | - $container->set(static::SERVICE, function () { |
|
295 | + $container->set(static::SERVICE, function() { |
|
296 | 296 | return [static::SERVICE_PROPERTY_1 => true]; |
297 | 297 | }); |
298 | 298 | |
299 | 299 | $container->get(static::SERVICE); |
300 | 300 | |
301 | 301 | $this->expectException(FrozenServiceException::class); |
302 | - $container->extend(static::SERVICE, function (): void { |
|
302 | + $container->extend(static::SERVICE, function(): void { |
|
303 | 303 | }); |
304 | 304 | } |
305 | 305 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | $container->set(static::SERVICE, 'not an object and not invokable'); |
313 | 313 | |
314 | 314 | $this->expectException(ContainerException::class); |
315 | - $container->extend(static::SERVICE, function (): void { |
|
315 | + $container->extend(static::SERVICE, function(): void { |
|
316 | 316 | }); |
317 | 317 | } |
318 | 318 | |
@@ -322,11 +322,11 @@ discard block |
||
322 | 322 | public function testExtendThrowsExceptionWhenTheServiceToBeExtendedIsProtected(): void |
323 | 323 | { |
324 | 324 | $container = new Container(); |
325 | - $container->set(static::SERVICE, $container->protect(function (): void { |
|
325 | + $container->set(static::SERVICE, $container->protect(function(): void { |
|
326 | 326 | })); |
327 | 327 | |
328 | 328 | $this->expectException(ContainerException::class); |
329 | - $container->extend(static::SERVICE, function (): void { |
|
329 | + $container->extend(static::SERVICE, function(): void { |
|
330 | 330 | }); |
331 | 331 | } |
332 | 332 | |
@@ -336,10 +336,10 @@ discard block |
||
336 | 336 | public function testExtendAFactoryServiceWillReplaceTheServiceInTheFactoryCollection(): void |
337 | 337 | { |
338 | 338 | $container = new Container(); |
339 | - $container->set(static::SERVICE, $container->factory(function () { |
|
339 | + $container->set(static::SERVICE, $container->factory(function() { |
|
340 | 340 | return 'foo'; |
341 | 341 | })); |
342 | - $container->extend(static::SERVICE, function ($service) { |
|
342 | + $container->extend(static::SERVICE, function($service) { |
|
343 | 343 | return $service . 'bar'; |
344 | 344 | }); |
345 | 345 | |
@@ -353,12 +353,12 @@ discard block |
||
353 | 353 | { |
354 | 354 | //Arrange |
355 | 355 | $container = new Container(); |
356 | - $container->set(static::SERVICE, function () { |
|
356 | + $container->set(static::SERVICE, function() { |
|
357 | 357 | return [static::SERVICE_PROPERTY_1 => true]; |
358 | 358 | }); |
359 | 359 | |
360 | 360 | //Act |
361 | - $container->extend(static::SERVICE, function ($existingService, $container) { |
|
361 | + $container->extend(static::SERVICE, function($existingService, $container) { |
|
362 | 362 | $existingService[static::SERVICE_PROPERTY_2] = true; |
363 | 363 | |
364 | 364 | return $existingService; |
@@ -378,14 +378,14 @@ discard block |
||
378 | 378 | { |
379 | 379 | //Arrange |
380 | 380 | $container = new Container(); |
381 | - $container->extend(static::SERVICE, function ($existingService, $container) { |
|
381 | + $container->extend(static::SERVICE, function($existingService, $container) { |
|
382 | 382 | $existingService[static::SERVICE_PROPERTY_2] = true; |
383 | 383 | |
384 | 384 | return $existingService; |
385 | 385 | }); |
386 | 386 | |
387 | 387 | //Act |
388 | - $container->set(static::SERVICE, function () { |
|
388 | + $container->set(static::SERVICE, function() { |
|
389 | 389 | return [static::SERVICE_PROPERTY_1 => true]; |
390 | 390 | }); |
391 | 391 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function testSetGlobalAddsAService(): void |
49 | 49 | { |
50 | 50 | $container = new Container(); |
51 | - $service = function () { |
|
51 | + $service = function() { |
|
52 | 52 | return static::SERVICE_GLOBAL; |
53 | 53 | }; |
54 | 54 | $container->setGlobal(static::SERVICE_GLOBAL, $service); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testSetGlobalAddsAServiceAndMakesItGloballyAvailable(): void |
63 | 63 | { |
64 | 64 | $container = new Container(); |
65 | - $service = function () { |
|
65 | + $service = function() { |
|
66 | 66 | return static::SERVICE_GLOBAL; |
67 | 67 | }; |
68 | 68 | $container->setGlobal(static::SERVICE_GLOBAL, $service); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public function testSetGlobalThrowsAnExceptionWhenServiceWasAlreadyRetrieved(): void |
79 | 79 | { |
80 | 80 | $container = new Container(); |
81 | - $service = function () { |
|
81 | + $service = function() { |
|
82 | 82 | return static::SERVICE_GLOBAL; |
83 | 83 | }; |
84 | 84 | $container->setGlobal(static::SERVICE_GLOBAL, $service); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function testGetGlobalReturnsSameServiceInstanceOnConsecutiveCalls(): void |
96 | 96 | { |
97 | 97 | $container = new Container(); |
98 | - $container->setGlobal(static::SERVICE_GLOBAL, function () { |
|
98 | + $container->setGlobal(static::SERVICE_GLOBAL, function() { |
|
99 | 99 | return new class |
100 | 100 | { |
101 | 101 | }; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | public function testHasReturnsTrueWhenGlobalServiceIsSet(): void |
124 | 124 | { |
125 | 125 | $container = new Container(); |
126 | - $container->setGlobal(static::SERVICE_GLOBAL, function () { |
|
126 | + $container->setGlobal(static::SERVICE_GLOBAL, function() { |
|
127 | 127 | return static::SERVICE_GLOBAL; |
128 | 128 | }); |
129 | 129 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function testRemoveRemovesAGlobalService(): void |
139 | 139 | { |
140 | 140 | $container = new Container(); |
141 | - $container->setGlobal(static::SERVICE_GLOBAL, function (): void { |
|
141 | + $container->setGlobal(static::SERVICE_GLOBAL, function(): void { |
|
142 | 142 | }); |
143 | 143 | |
144 | 144 | $container->remove(static::SERVICE_GLOBAL); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | public function testConfigureWithIsGlobalTrueWillMakeServiceGloballyAvailable(): void |
164 | 164 | { |
165 | 165 | $container = new Container(); |
166 | - $container->set(static::SERVICE, function () { |
|
166 | + $container->set(static::SERVICE, function() { |
|
167 | 167 | return static::SERVICE; |
168 | 168 | }); |
169 | 169 | $container->configure(static::SERVICE, ['isGlobal' => true]); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | public function testExtendThrowsExceptionWhenPassedServiceIsNotAService(): void |
179 | 179 | { |
180 | 180 | $container = new Container(); |
181 | - $container->setGlobal(static::SERVICE_GLOBAL, function () { |
|
181 | + $container->setGlobal(static::SERVICE_GLOBAL, function() { |
|
182 | 182 | return [static::SERVICE_PROPERTY_1 => true]; |
183 | 183 | }); |
184 | 184 | |
@@ -192,14 +192,14 @@ discard block |
||
192 | 192 | public function testExtendThrowsExceptionWhenTheServiceToBeExtendedIsFrozen(): void |
193 | 193 | { |
194 | 194 | $container = new Container(); |
195 | - $container->setGlobal(static::SERVICE_GLOBAL, function () { |
|
195 | + $container->setGlobal(static::SERVICE_GLOBAL, function() { |
|
196 | 196 | return [static::SERVICE_PROPERTY_1 => true]; |
197 | 197 | }); |
198 | 198 | |
199 | 199 | $container->get(static::SERVICE_GLOBAL); |
200 | 200 | |
201 | 201 | $this->expectException(FrozenServiceException::class); |
202 | - $container->extend(static::SERVICE_GLOBAL, function (): void { |
|
202 | + $container->extend(static::SERVICE_GLOBAL, function(): void { |
|
203 | 203 | }); |
204 | 204 | } |
205 | 205 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $container->get(static::SERVICE_GLOBAL); |
215 | 215 | |
216 | 216 | $this->expectException(ContainerException::class); |
217 | - $container->extend(static::SERVICE_GLOBAL, function (): void { |
|
217 | + $container->extend(static::SERVICE_GLOBAL, function(): void { |
|
218 | 218 | }); |
219 | 219 | } |
220 | 220 | |
@@ -224,12 +224,12 @@ discard block |
||
224 | 224 | public function testExtendExtendsAGlobalService(): void |
225 | 225 | { |
226 | 226 | $container = new Container(); |
227 | - $container->set(static::SERVICE_GLOBAL, function () { |
|
227 | + $container->set(static::SERVICE_GLOBAL, function() { |
|
228 | 228 | return 'foo'; |
229 | 229 | }); |
230 | 230 | $container->configure(static::SERVICE_GLOBAL, ['isGlobal' => true]); |
231 | 231 | |
232 | - $container->extend(static::SERVICE_GLOBAL, function ($existingService) { |
|
232 | + $container->extend(static::SERVICE_GLOBAL, function($existingService) { |
|
233 | 233 | return $existingService . 'bar'; |
234 | 234 | }); |
235 | 235 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | $this->getNavigationFacade()->createNavigation($navigationTransfer); |
35 | 35 | |
36 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($navigationTransfer): void { |
|
36 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($navigationTransfer): void { |
|
37 | 37 | $this->cleanupNavigation($navigationTransfer); |
38 | 38 | }); |
39 | 39 |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $fileSystemService->setFactory($factory); |
91 | 91 | $container = new Container(); |
92 | 92 | |
93 | - $container[FileManagerDependencyProvider::SERVICE_FILE_SYSTEM] = function (Container $container) use ($fileSystemService) { |
|
93 | + $container[FileManagerDependencyProvider::SERVICE_FILE_SYSTEM] = function(Container $container) use ($fileSystemService) { |
|
94 | 94 | return new FileManagerToFileSystemServiceBridge($fileSystemService); |
95 | 95 | }; |
96 | 96 | |
@@ -122,13 +122,13 @@ discard block |
||
122 | 122 | protected function setupContainerAndFlysystemService(ServiceContainer $container): ServiceContainer |
123 | 123 | { |
124 | 124 | $flysystemContainer = new ServiceContainer(); |
125 | - $flysystemContainer[FlysystemDependencyProvider::PLUGIN_COLLECTION_FILESYSTEM_BUILDER] = function (ServiceContainer $flysystemContainer) { |
|
125 | + $flysystemContainer[FlysystemDependencyProvider::PLUGIN_COLLECTION_FILESYSTEM_BUILDER] = function(ServiceContainer $flysystemContainer) { |
|
126 | 126 | return [ |
127 | 127 | new LocalFilesystemBuilderPlugin(), |
128 | 128 | ]; |
129 | 129 | }; |
130 | 130 | |
131 | - $flysystemContainer[FlysystemDependencyProvider::PLUGIN_COLLECTION_FLYSYSTEM] = function (ServiceContainer $flysystemContainer) { |
|
131 | + $flysystemContainer[FlysystemDependencyProvider::PLUGIN_COLLECTION_FLYSYSTEM] = function(ServiceContainer $flysystemContainer) { |
|
132 | 132 | return []; |
133 | 133 | }; |
134 | 134 | |
@@ -150,15 +150,15 @@ discard block |
||
150 | 150 | $fileSystemStreamPlugin = new FileSystemStreamPlugin(); |
151 | 151 | $fileSystemStreamPlugin->setService($flysystemService); |
152 | 152 | |
153 | - $container[FileSystemDependencyProvider::PLUGIN_READER] = function (ServiceContainer $container) use ($fileSystemReaderPlugin) { |
|
153 | + $container[FileSystemDependencyProvider::PLUGIN_READER] = function(ServiceContainer $container) use ($fileSystemReaderPlugin) { |
|
154 | 154 | return $fileSystemReaderPlugin; |
155 | 155 | }; |
156 | 156 | |
157 | - $container[FileSystemDependencyProvider::PLUGIN_WRITER] = function (ServiceContainer $container) use ($fileSystemWriterPlugin) { |
|
157 | + $container[FileSystemDependencyProvider::PLUGIN_WRITER] = function(ServiceContainer $container) use ($fileSystemWriterPlugin) { |
|
158 | 158 | return $fileSystemWriterPlugin; |
159 | 159 | }; |
160 | 160 | |
161 | - $container[FileSystemDependencyProvider::PLUGIN_STREAM] = function (ServiceContainer $container) use ($fileSystemStreamPlugin) { |
|
161 | + $container[FileSystemDependencyProvider::PLUGIN_STREAM] = function(ServiceContainer $container) use ($fileSystemStreamPlugin) { |
|
162 | 162 | return $fileSystemStreamPlugin; |
163 | 163 | }; |
164 | 164 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $customerEntity->save(); |
126 | 126 | $customerTransfer->fromArray($customerEntity->toArray(), true); |
127 | 127 | |
128 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($customerTransfer): void { |
|
128 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($customerTransfer): void { |
|
129 | 129 | $this->cleanupCustomer($customerTransfer); |
130 | 130 | }); |
131 | 131 |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | public function testPreRunPluginsWillExecutesBeforeConsoleCommands(): void |
54 | 54 | { |
55 | 55 | $container = new Container(); |
56 | - $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_PRE_RUN_HOOK] = function (Container $container) { |
|
56 | + $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_PRE_RUN_HOOK] = function(Container $container) { |
|
57 | 57 | $preRunPluginMock = $this->getPreRunPluginMock(); |
58 | 58 | |
59 | 59 | return [$preRunPluginMock]; |
60 | 60 | }; |
61 | 61 | |
62 | - $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_POST_RUN_HOOK] = function (Container $container) { |
|
62 | + $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_POST_RUN_HOOK] = function(Container $container) { |
|
63 | 63 | return []; |
64 | 64 | }; |
65 | 65 | |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | public function testPostRunPluginsWillExecutesBeforeConsoleCommands(): void |
76 | 76 | { |
77 | 77 | $container = new Container(); |
78 | - $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_PRE_RUN_HOOK] = function (Container $container) { |
|
78 | + $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_PRE_RUN_HOOK] = function(Container $container) { |
|
79 | 79 | return []; |
80 | 80 | }; |
81 | 81 | |
82 | - $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_POST_RUN_HOOK] = function (Container $container) { |
|
82 | + $container[ConsoleDependencyProvider::PLUGINS_CONSOLE_POST_RUN_HOOK] = function(Container $container) { |
|
83 | 83 | $postRunPluginMock = $this->getPostRunPluginMock(); |
84 | 84 | |
85 | 85 | return [$postRunPluginMock]; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ->createCompanyUserInvitation($companyUserInvitationCreateRequestTransfer) |
49 | 49 | ->getCompanyUserInvitation(); |
50 | 50 | |
51 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($companyUserInvitationTransfer): void { |
|
51 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($companyUserInvitationTransfer): void { |
|
52 | 52 | $this->setDependencies(); |
53 | 53 | |
54 | 54 | $companyUserInvitationDeleteRequestTransfer = (new CompanyUserInvitationDeleteRequestTransfer()) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $companyUserInvitationTransfer = (new CompanyUserInvitationBuilder($seedData))->build(); |
72 | 72 | $companyUserInvitationTransfer->requireFkCompanyUser(); |
73 | 73 | |
74 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($companyUserInvitationTransfer): void { |
|
74 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($companyUserInvitationTransfer): void { |
|
75 | 75 | $this->setDependencies(); |
76 | 76 | |
77 | 77 | $criteriaFilter = (new CompanyUserInvitationCriteriaFilterTransfer()) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function testShouldCommitWhenNoErrors(): void |
45 | 45 | { |
46 | - $callback = function (): void { |
|
46 | + $callback = function(): void { |
|
47 | 47 | }; |
48 | 48 | |
49 | 49 | $this->connection |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function testShouldCatchExceptionAndRollback(): void |
68 | 68 | { |
69 | - $callback = function (): void { |
|
69 | + $callback = function(): void { |
|
70 | 70 | throw new Exception('Error when saving'); |
71 | 71 | }; |
72 | 72 |