@@ -110,7 +110,7 @@ |
||
110 | 110 | public function getFailureExceptions() |
111 | 111 | { |
112 | 112 | return array_map( |
113 | - function ($e) { |
|
113 | + function($e) { |
|
114 | 114 | return $e['message']; |
115 | 115 | }, |
116 | 116 | $this->failureExceptions |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | protected function validateMessageBody($body) |
33 | 33 | { |
34 | - if (! isset( |
|
34 | + if (!isset( |
|
35 | 35 | $body['userId'], |
36 | 36 | $body['jobName'], |
37 | 37 | $body['process'], |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | $result = $this->jobRunner->runUnique( |
70 | 70 | $parentMessageId, |
71 | 71 | $jobName, |
72 | - function (JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) { |
|
72 | + function(JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) { |
|
73 | 73 | foreach ($files as $key => $file) { |
74 | 74 | $jobRunner->createDelayed( |
75 | 75 | sprintf('%s:chunk.%s', $jobName, ++$key), |
76 | - function (JobRunner $jobRunner, Job $child) use ($body, $file, $key) { |
|
76 | + function(JobRunner $jobRunner, Job $child) use ($body, $file, $key) { |
|
77 | 77 | $body['fileName'] = $file; |
78 | 78 | $body['options']['batch_number'] = $key; |
79 | 79 | $this->producer->send( |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ->getRepository(User::class) |
130 | 130 | ->find($body['userId']); |
131 | 131 | |
132 | - if (! $user instanceof User) { |
|
132 | + if (!$user instanceof User) { |
|
133 | 133 | $this->logger->critical( |
134 | 134 | sprintf('User not found. Id: %s', $body['userId']) |
135 | 135 | ); |
@@ -175,7 +175,7 @@ |
||
175 | 175 | |
176 | 176 | $body = $this->validateMessageBody($body); |
177 | 177 | |
178 | - if (! $body) { |
|
178 | + if (!$body) { |
|
179 | 179 | return self::REJECT; |
180 | 180 | } |
181 | 181 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | protected function validateMessageBody($body) |
16 | 16 | { |
17 | - if (! isset( |
|
17 | + if (!isset( |
|
18 | 18 | $body['jobName'], |
19 | 19 | $body['process'], |
20 | 20 | $body['processorAlias'], |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | $result = $this->jobRunner->runUnique( |
54 | 54 | $parentMessageId, |
55 | 55 | $jobName, |
56 | - function (JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) { |
|
56 | + function(JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) { |
|
57 | 57 | foreach ($files as $key => $file) { |
58 | 58 | $jobRunner->createDelayed( |
59 | 59 | sprintf('%s:chunk.%s', $jobName, ++$key), |
60 | - function (JobRunner $jobRunner, Job $child) use ($file, $body) { |
|
60 | + function(JobRunner $jobRunner, Job $child) use ($file, $body) { |
|
61 | 61 | $body['fileName'] = $file; |
62 | 62 | $this->producer->send( |
63 | 63 | Topics::CLI_IMPORT, |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | { |
82 | 82 | $body = JSON::decode($message->getBody()); |
83 | 83 | |
84 | - if (! isset($body['jobId'], $body['jobName'], $body['exportType'], $body['outputFormat'], $body['email'])) { |
|
84 | + if (!isset($body['jobId'], $body['jobName'], $body['exportType'], $body['outputFormat'], $body['email'])) { |
|
85 | 85 | $this->logger->critical('Invalid message'); |
86 | 86 | } |
87 | 87 | |
88 | - if (! ($job = $this->jobStorage->findJobById($body['jobId']))) { |
|
88 | + if (!($job = $this->jobStorage->findJobById($body['jobId']))) { |
|
89 | 89 | $this->logger->critical('Job not found'); |
90 | 90 | |
91 | 91 | return self::REJECT; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $files = []; |
96 | 96 | |
97 | 97 | foreach ($job->getChildJobs() as $childJob) { |
98 | - if (! empty($childJob->getData()) && ($file = $childJob->getData()['file'])) { |
|
98 | + if (!empty($childJob->getData()) && ($file = $childJob->getData()['file'])) { |
|
99 | 99 | $files[] = $file; |
100 | 100 | } |
101 | 101 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $configuration = new Configuration(); |
18 | 18 | $config = $this->processConfiguration($configuration, $configs); |
19 | 19 | |
20 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
20 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
21 | 21 | $loader->load('form.yml'); |
22 | 22 | $loader->load('services.yml'); |
23 | 23 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $jsLogSubscriber->method('getUrl')->willReturn('example.com'); |
32 | 32 | $jsLogSubscriber->log($this->getEventMock()); |
33 | 33 | |
34 | - $expectedLogFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.'behat_browser.log'; |
|
34 | + $expectedLogFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat_browser.log'; |
|
35 | 35 | $this->assertFileExists($expectedLogFile); |
36 | 36 | $this->assertStringEqualsFile($expectedLogFile, $expectedContent); |
37 | 37 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $jsLogSubscriber->method('getLogs')->willReturn([]); |
48 | 48 | $jsLogSubscriber->log($this->getEventMock()); |
49 | 49 | |
50 | - $expectedLogFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.'behat_browser.log'; |
|
50 | + $expectedLogFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat_browser.log'; |
|
51 | 51 | $this->assertFileNotExists($expectedLogFile); |
52 | 52 | } |
53 | 53 | |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | ], |
69 | 69 | ], |
70 | 70 | 'expected result' => |
71 | - '[ERROR - 2017-07-10T19:04:21+00:00] [URL: "example.com"] '. |
|
72 | - '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] '. |
|
73 | - 'Something went wrong'.PHP_EOL. |
|
74 | - '[WARNING - 2017-07-10T19:04:21+00:00] [URL: "example.com"] '. |
|
75 | - '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] '. |
|
76 | - 'Check your environment'.PHP_EOL |
|
71 | + '[ERROR - 2017-07-10T19:04:21+00:00] [URL: "example.com"] ' . |
|
72 | + '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] ' . |
|
73 | + 'Something went wrong' . PHP_EOL . |
|
74 | + '[WARNING - 2017-07-10T19:04:21+00:00] [URL: "example.com"] ' . |
|
75 | + '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] ' . |
|
76 | + 'Check your environment' . PHP_EOL |
|
77 | 77 | ], |
78 | 78 | 'irregular log' => [ |
79 | 79 | 'logs' => [ |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | ], |
83 | 83 | ], |
84 | 84 | 'expected result' => |
85 | - '[UNKNOWN_LEVEL - 2017-07-10T19:04:21+00:00] [URL: "example.com"] '. |
|
86 | - '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] '. |
|
87 | - 'UNKNOWN_MESSAGE'.PHP_EOL |
|
85 | + '[UNKNOWN_LEVEL - 2017-07-10T19:04:21+00:00] [URL: "example.com"] ' . |
|
86 | + '[Feature: "Feature Example", On line: 0, Step: "Test JsLogger Mock Step"] ' . |
|
87 | + 'UNKNOWN_MESSAGE' . PHP_EOL |
|
88 | 88 | ], |
89 | 89 | ]; |
90 | 90 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function removeLog() |
96 | 96 | { |
97 | - $log = sys_get_temp_dir().DIRECTORY_SEPARATOR.'behat_browser.log'; |
|
97 | + $log = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat_browser.log'; |
|
98 | 98 | |
99 | 99 | if (file_exists($log)) { |
100 | 100 | unlink($log); |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | SessionAliasProviderAwareInterface, |
50 | 50 | MessageQueueIsolatorAwareInterface |
51 | 51 | { |
52 | - const SKIP_WAIT_PATTERN = '/'. |
|
53 | - '^(?:|I )should see ".+" flash message$|'. |
|
54 | - '^(?:|I )should see ".+" error message$|'. |
|
55 | - '^(?:|I )should see Schema updated flash message$'. |
|
52 | + const SKIP_WAIT_PATTERN = '/' . |
|
53 | + '^(?:|I )should see ".+" flash message$|' . |
|
54 | + '^(?:|I )should see ".+" error message$|' . |
|
55 | + '^(?:|I )should see Schema updated flash message$' . |
|
56 | 56 | '/'; |
57 | 57 | |
58 | 58 | use AssertTrait, KernelDictionary, PageObjectDictionary, SessionAliasProviderAwareTrait; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $actualFlashMessages = []; |
233 | 233 | /** @var Element|null $flashMessage */ |
234 | 234 | $flashMessage = $this->spin( |
235 | - function (OroMainContext $context) use ($title, &$actualFlashMessages, $flashMessageElement) { |
|
235 | + function(OroMainContext $context) use ($title, &$actualFlashMessages, $flashMessageElement) { |
|
236 | 236 | $flashMessages = $context->findAllElements($flashMessageElement); |
237 | 237 | |
238 | 238 | foreach ($flashMessages as $flashMessage) { |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | public function iShouldSeeFollowingFlashMessages(TableNode $table, $strict = false) |
289 | 289 | { |
290 | 290 | $expectedMessages = array_map( |
291 | - function ($item) { |
|
291 | + function($item) { |
|
292 | 292 | return $item[0]; |
293 | 293 | }, |
294 | 294 | $table->getRows() |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | */ |
339 | 339 | public function assertPageContainsText($text) |
340 | 340 | { |
341 | - $result = $this->spin(function (OroMainContext $context) use ($text) { |
|
341 | + $result = $this->spin(function(OroMainContext $context) use ($text) { |
|
342 | 342 | $context->assertSession()->pageTextContains($this->fixStepArgument($text)); |
343 | 343 | |
344 | 344 | return true; |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | */ |
381 | 381 | public function iShouldSeeErrorMessage($title) |
382 | 382 | { |
383 | - $errorElement = $this->spin(function (MinkContext $context) { |
|
383 | + $errorElement = $this->spin(function(MinkContext $context) { |
|
384 | 384 | return $context->getSession()->getPage()->find('css', '.alert-error'); |
385 | 385 | }); |
386 | 386 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | return; |
436 | 436 | } |
437 | 437 | |
438 | - self::fail('Expect to see no alert but alert with "'.$alertMessage.'" message is present'); |
|
438 | + self::fail('Expect to see no alert but alert with "' . $alertMessage . '" message is present'); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | /** |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | */ |
1100 | 1100 | public function assertElementOnPage($element) |
1101 | 1101 | { |
1102 | - $isVisible = $this->spin(function (OroMainContext $context) use ($element) { |
|
1102 | + $isVisible = $this->spin(function(OroMainContext $context) use ($element) { |
|
1103 | 1103 | return $context->createElement($element)->isVisible(); |
1104 | 1104 | }, 3); |
1105 | 1105 | |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | public function assertElementNotOnPage($element) |
1116 | 1116 | { |
1117 | 1117 | $elementOnPage = $this->createElement($element); |
1118 | - $result = $this->spin(function (OroMainContext $context) use ($elementOnPage, $element) { |
|
1118 | + $result = $this->spin(function(OroMainContext $context) use ($elementOnPage, $element) { |
|
1119 | 1119 | try { |
1120 | 1120 | return !$elementOnPage->isVisible(); |
1121 | 1121 | } catch (NoSuchElement $e) { |
@@ -1789,7 +1789,7 @@ discard block |
||
1789 | 1789 | */ |
1790 | 1790 | public function assertPageAddress($page) |
1791 | 1791 | { |
1792 | - $this->spin(function () use ($page) { |
|
1792 | + $this->spin(function() use ($page) { |
|
1793 | 1793 | parent::assertPageAddress($page); |
1794 | 1794 | }, 10); |
1795 | 1795 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | { |
119 | 119 | if (!self::$resetCallback) { |
120 | 120 | $self = $this; |
121 | - self::$resetCallback = function () use ($self) { |
|
121 | + self::$resetCallback = function() use ($self) { |
|
122 | 122 | $self->client = null; |
123 | 123 | $self->soapClient = null; |
124 | 124 | }; |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | } |
356 | 356 | |
357 | 357 | if (is_array($data)) { |
358 | - array_walk_recursive($data, function (&$item) use ($aliceLoader) { |
|
358 | + array_walk_recursive($data, function(&$item) use ($aliceLoader) { |
|
359 | 359 | $item = $aliceLoader->getProcessor()->process($item, [], null); |
360 | 360 | }); |
361 | 361 | } elseif (is_int($data) || is_string($data)) { |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | } |
581 | 581 | |
582 | 582 | if (!$force) { |
583 | - $removeLoadedFixturesCallback = function ($fixtureId) { |
|
583 | + $removeLoadedFixturesCallback = function($fixtureId) { |
|
584 | 584 | return !in_array($fixtureId, self::$loadedFixtures, true); |
585 | 585 | }; |
586 | 586 | |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | { |
692 | 692 | $oroDefaultPrefix = $this->getUrl('oro_default'); |
693 | 693 | |
694 | - $replaceOroDefaultPrefixCallback = function (&$value) use ($oroDefaultPrefix, $urlParameterKey) { |
|
694 | + $replaceOroDefaultPrefixCallback = function(&$value) use ($oroDefaultPrefix, $urlParameterKey) { |
|
695 | 695 | if (!is_null($value[$urlParameterKey])) { |
696 | 696 | $value[$urlParameterKey] = str_replace( |
697 | 697 | '%oro_default_prefix%', |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | } |
733 | 733 | } |
734 | 734 | |
735 | - $replaceCallback = function (&$value) use ($randomString) { |
|
735 | + $replaceCallback = function(&$value) use ($randomString) { |
|
736 | 736 | if (!is_null($value)) { |
737 | 737 | $value = str_replace('%str%', $randomString, $value); |
738 | 738 | } |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | return $this->getCurrentDir() . DIRECTORY_SEPARATOR . $fileName; |
1092 | 1092 | } |
1093 | 1093 | |
1094 | - return $this->getCurrentDir() . DIRECTORY_SEPARATOR . $folderName . DIRECTORY_SEPARATOR . $fileName; |
|
1094 | + return $this->getCurrentDir() . DIRECTORY_SEPARATOR . $folderName . DIRECTORY_SEPARATOR . $fileName; |
|
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | /** |