@@ -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 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | $ids = $buildIdsQueryBuilder->execute()->fetchAll(); |
| 67 | 67 | |
| 68 | - $ids = array_map(function ($data) { |
|
| 68 | + $ids = array_map(function($data) { |
|
| 69 | 69 | return $data['build_id']; |
| 70 | 70 | }, $ids); |
| 71 | 71 | $ids = array_filter($ids); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | ->fetchAll() |
| 156 | 156 | ; |
| 157 | 157 | |
| 158 | - $models = array_map(function (array $data) { |
|
| 158 | + $models = array_map(function(array $data) { |
|
| 159 | 159 | $model = $this->className::fromArray($data); |
| 160 | 160 | $this->collection[$model->getId()] = $model; |
| 161 | 161 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $result = $this->connection->createQueryBuilder() |
| 178 | 178 | ->select('*') |
| 179 | 179 | ->from($this->className::getName()) |
| 180 | - ->where($this->className::getIdField().' = ?') |
|
| 180 | + ->where($this->className::getIdField() . ' = ?') |
|
| 181 | 181 | ->setParameter(0, $id) |
| 182 | 182 | ->orderBy('id', 'DESC') |
| 183 | 183 | ->execute() |
@@ -22,16 +22,16 @@ discard block |
||
| 22 | 22 | 'type' => null, |
| 23 | 23 | 'settings' => [ |
| 24 | 24 | 'extra_key' => 'extra_value', |
| 25 | - 'paths' => array_map(function ($n) { |
|
| 26 | - return '/tmp/'.$n; |
|
| 25 | + 'paths' => array_map(function($n) { |
|
| 26 | + return '/tmp/' . $n; |
|
| 27 | 27 | }, range(1, 3)) |
| 28 | 28 | ], |
| 29 | 29 | ], |
| 30 | 30 | 'AcmeSuite5' => [ |
| 31 | 31 | 'type' => null, |
| 32 | 32 | 'settings' => [ |
| 33 | - 'paths' => array_map(function ($n) { |
|
| 34 | - return '/tmp/'.$n; |
|
| 33 | + 'paths' => array_map(function($n) { |
|
| 34 | + return '/tmp/' . $n; |
|
| 35 | 35 | }, range(1, 5)) |
| 36 | 36 | ], |
| 37 | 37 | ], |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->assertArrayHasKey($setName, $expectedSets, sprintf('"%s" is not expected set name', $setName)); |
| 63 | 63 | $this->assertSame( |
| 64 | 64 | $expectedSets[$setName], |
| 65 | - array_map(function (Suite $configuration) { |
|
| 65 | + array_map(function(Suite $configuration) { |
|
| 66 | 66 | return $configuration->getName(); |
| 67 | 67 | }, $configs) |
| 68 | 68 | ); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | [ |
| 76 | 76 | 'divider' => 10, |
| 77 | 77 | 'expectedSets' => [ |
| 78 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_0' => [ |
|
| 78 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_0' => [ |
|
| 79 | 79 | 'AcmeSuite3_0', |
| 80 | 80 | 'AcmeSuite3_1', |
| 81 | 81 | 'AcmeSuite3_2', |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | [ |
| 91 | 91 | 'divider' => 5, |
| 92 | 92 | 'expectedSets' => [ |
| 93 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_0' => [ |
|
| 93 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_0' => [ |
|
| 94 | 94 | 'AcmeSuite5_2', |
| 95 | 95 | 'AcmeSuite5_3', |
| 96 | 96 | 'AcmeSuite5_4', |
| 97 | 97 | 'AcmeSuite3_0', |
| 98 | 98 | ], |
| 99 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_1' => [ |
|
| 99 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_1' => [ |
|
| 100 | 100 | 'AcmeSuite3_1', |
| 101 | 101 | 'AcmeSuite3_2', |
| 102 | 102 | 'AcmeSuite5_0', |
@@ -107,17 +107,17 @@ discard block |
||
| 107 | 107 | [ |
| 108 | 108 | 'divider' => 3, |
| 109 | 109 | 'expectedSets' => [ |
| 110 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_0' => [ |
|
| 110 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_0' => [ |
|
| 111 | 111 | 'AcmeSuite3_0', |
| 112 | 112 | 'AcmeSuite3_1', |
| 113 | 113 | 'AcmeSuite3_2', |
| 114 | 114 | ], |
| 115 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_1' => [ |
|
| 115 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_1' => [ |
|
| 116 | 116 | 'AcmeSuite5_3', |
| 117 | 117 | 'AcmeSuite5_4', |
| 118 | 118 | 'AcmeSuite5_0', |
| 119 | 119 | ], |
| 120 | - SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_2' => [ |
|
| 120 | + SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_2' => [ |
|
| 121 | 121 | 'AcmeSuite5_1', |
| 122 | 122 | 'AcmeSuite5_2', |
| 123 | 123 | ], |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | $this->assertInternalType( |
| 197 | 197 | 'array', |
| 198 | - $suiteConfigRegistry->getSet(SuiteConfigurationRegistry::PREFIX_SUITE_SET.'_0') |
|
| 198 | + $suiteConfigRegistry->getSet(SuiteConfigurationRegistry::PREFIX_SUITE_SET . '_0') |
|
| 199 | 199 | ); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -32,35 +32,35 @@ |
||
| 32 | 32 | 'array' => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| 33 | 33 | 'Suite divider' => 3, |
| 34 | 34 | 'Expected result' => [ |
| 35 | - self::BASE_NAME.'_0' => [1, 2, 3], |
|
| 36 | - self::BASE_NAME.'_1' => [4, 5, 6], |
|
| 37 | - self::BASE_NAME.'_2' => [10, 7], |
|
| 38 | - self::BASE_NAME.'_3' => [8, 9] |
|
| 35 | + self::BASE_NAME . '_0' => [1, 2, 3], |
|
| 36 | + self::BASE_NAME . '_1' => [4, 5, 6], |
|
| 37 | + self::BASE_NAME . '_2' => [10, 7], |
|
| 38 | + self::BASE_NAME . '_3' => [8, 9] |
|
| 39 | 39 | ], |
| 40 | 40 | ], |
| 41 | 41 | [ |
| 42 | 42 | 'array' => [1, 2, 3, 4], |
| 43 | 43 | 'Suite divider' => 3, |
| 44 | 44 | 'Expected result' => [ |
| 45 | - self::BASE_NAME.'_0' => [4, 1], |
|
| 46 | - self::BASE_NAME.'_1' => [2, 3], |
|
| 45 | + self::BASE_NAME . '_0' => [4, 1], |
|
| 46 | + self::BASE_NAME . '_1' => [2, 3], |
|
| 47 | 47 | ], |
| 48 | 48 | ], |
| 49 | 49 | [ |
| 50 | 50 | 'array' => [1, 2, 3, 4], |
| 51 | 51 | 'Suite divider' => 1, |
| 52 | 52 | 'Expected result' => [ |
| 53 | - self::BASE_NAME.'_0' => [1], |
|
| 54 | - self::BASE_NAME.'_1' => [2], |
|
| 55 | - self::BASE_NAME.'_2' => [3], |
|
| 56 | - self::BASE_NAME.'_3' => [4], |
|
| 53 | + self::BASE_NAME . '_0' => [1], |
|
| 54 | + self::BASE_NAME . '_1' => [2], |
|
| 55 | + self::BASE_NAME . '_2' => [3], |
|
| 56 | + self::BASE_NAME . '_3' => [4], |
|
| 57 | 57 | ] |
| 58 | 58 | ], |
| 59 | 59 | [ |
| 60 | 60 | 'array' => [1, 2, 3, 4, 5], |
| 61 | 61 | 'Suite divider' => 7, |
| 62 | 62 | 'Expected result' => [ |
| 63 | - self::BASE_NAME.'_0' => [1, 2, 3, 4, 5] |
|
| 63 | + self::BASE_NAME . '_0' => [1, 2, 3, 4, 5] |
|
| 64 | 64 | ] |
| 65 | 65 | ], |
| 66 | 66 | ]; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function prepareProcess() |
| 44 | 44 | { |
| 45 | - $this->testAppPath = realpath(__DIR__.'/../../TestApp'); |
|
| 45 | + $this->testAppPath = realpath(__DIR__ . '/../../TestApp'); |
|
| 46 | 46 | $phpFinder = new PhpExecutableFinder(); |
| 47 | 47 | if (false === $php = $phpFinder->find()) { |
| 48 | 48 | throw new \RuntimeException('Unable to find the PHP executable.'); |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | /** @BeforeScenario */ |
| 55 | 55 | public function prepareBehatYaml() |
| 56 | 56 | { |
| 57 | - $behatYaml = $this->testAppPath.'/behat.yml'; |
|
| 57 | + $behatYaml = $this->testAppPath . '/behat.yml'; |
|
| 58 | 58 | |
| 59 | 59 | if (file_exists($behatYaml)) { |
| 60 | 60 | unlink($behatYaml); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - copy($this->testAppPath.'/behat.yml.dist', $behatYaml); |
|
| 63 | + copy($this->testAppPath . '/behat.yml.dist', $behatYaml); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | escapeshellarg(BEHAT_BIN_PATH), |
| 83 | 83 | $argumentsString, |
| 84 | 84 | strtr('--format-settings=\'{"timer": false}\'', ['\'' => '"', '"' => '\"']), |
| 85 | - $this->testAppPath.'/behat.yml' |
|
| 85 | + $this->testAppPath . '/behat.yml' |
|
| 86 | 86 | ) |
| 87 | 87 | ); |
| 88 | 88 | $this->process->start(); |
@@ -94,12 +94,12 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function enabledExtensionInBehatYml(PyStringNode $extensionConfig) |
| 96 | 96 | { |
| 97 | - $config = Yaml::parse(file_get_contents($this->testAppPath.'/behat.yml')); |
|
| 97 | + $config = Yaml::parse(file_get_contents($this->testAppPath . '/behat.yml')); |
|
| 98 | 98 | $extensionConfig = Yaml::parse($extensionConfig->getRaw()); |
| 99 | 99 | $config['default']['extensions'] = $extensionConfig; |
| 100 | 100 | $this->dbConfig = array_shift($extensionConfig)['connection']; |
| 101 | 101 | |
| 102 | - file_put_contents($this->testAppPath.'/behat.yml', Yaml::dump($config, 6)); |
|
| 102 | + file_put_contents($this->testAppPath . '/behat.yml', Yaml::dump($config, 6)); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -107,11 +107,11 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function enabledSuitesInBehatYml(PyStringNode $suitesConfig) |
| 109 | 109 | { |
| 110 | - $config = Yaml::parse(file_get_contents($this->testAppPath.'/behat.yml')); |
|
| 110 | + $config = Yaml::parse(file_get_contents($this->testAppPath . '/behat.yml')); |
|
| 111 | 111 | $suitesConfig = Yaml::parse($suitesConfig->getRaw()); |
| 112 | 112 | $config['default']['suites'] = $suitesConfig; |
| 113 | 113 | |
| 114 | - file_put_contents($this->testAppPath.'/behat.yml', Yaml::dump($config, 6)); |
|
| 114 | + file_put_contents($this->testAppPath . '/behat.yml', Yaml::dump($config, 6)); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | public function sqliteDatabaseExists($dbname) |
| 208 | 208 | { |
| 209 | - $dbFile = $this->testAppPath.'/'.$dbname; |
|
| 209 | + $dbFile = $this->testAppPath . '/' . $dbname; |
|
| 210 | 210 | |
| 211 | 211 | if (file_exists($dbFile)) { |
| 212 | 212 | unlink($dbFile); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | throw new RuntimeException('No db name in configuration'); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $dbName = $this->dbConfig['dbname']; |
|
| 228 | + $dbName = $this->dbConfig['dbname']; |
|
| 229 | 229 | $dbConfig = $this->dbConfig; |
| 230 | 230 | $dbConfig['dbname'] = null; |
| 231 | 231 | |
@@ -290,21 +290,21 @@ discard block |
||
| 290 | 290 | if ('/' !== DIRECTORY_SEPARATOR) { |
| 291 | 291 | $text = preg_replace_callback( |
| 292 | 292 | '/ features\/[^\n ]+/', |
| 293 | - function ($matches) { |
|
| 293 | + function($matches) { |
|
| 294 | 294 | return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]); |
| 295 | 295 | }, |
| 296 | 296 | $text |
| 297 | 297 | ); |
| 298 | 298 | $text = preg_replace_callback( |
| 299 | 299 | '/\<span class\="path"\>features\/[^\<]+/', |
| 300 | - function ($matches) { |
|
| 300 | + function($matches) { |
|
| 301 | 301 | return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]); |
| 302 | 302 | }, |
| 303 | 303 | $text |
| 304 | 304 | ); |
| 305 | 305 | $text = preg_replace_callback( |
| 306 | 306 | '/\+[fd] [^ ]+/', |
| 307 | - function ($matches) { |
|
| 307 | + function($matches) { |
|
| 308 | 308 | return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]); |
| 309 | 309 | }, |
| 310 | 310 | $text |
@@ -333,10 +333,10 @@ discard block |
||
| 333 | 333 | */ |
| 334 | 334 | public function iReconfigureStatisticExtension(PyStringNode $extensionConfig) |
| 335 | 335 | { |
| 336 | - $config = Yaml::parse(file_get_contents($this->testAppPath.'/behat.yml')); |
|
| 336 | + $config = Yaml::parse(file_get_contents($this->testAppPath . '/behat.yml')); |
|
| 337 | 337 | $extensionConfig = Yaml::parse($extensionConfig->getRaw()); |
| 338 | 338 | $config['default']['extensions'][BehatStatisticExtension::class] = $extensionConfig; |
| 339 | 339 | |
| 340 | - file_put_contents($this->testAppPath.'/behat.yml', Yaml::dump($config, 6)); |
|
| 340 | + file_put_contents($this->testAppPath . '/behat.yml', Yaml::dump($config, 6)); |
|
| 341 | 341 | } |
| 342 | 342 | } |