@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $sndParent = $label->getParent()->getParent(); |
206 | 206 | |
207 | 207 | if ($sndParent->hasClass('control-group-collection')) { |
208 | - $elementName = Inflector::singularize(trim($label->getText())).'Collection'; |
|
208 | + $elementName = Inflector::singularize(trim($label->getText())) . 'Collection'; |
|
209 | 209 | $elementName = $this->elementFactory->hasElement($elementName) ? $elementName : 'CollectionField'; |
210 | 210 | |
211 | 211 | return $this->elementFactory->wrapElement($elementName, $sndParent); |
@@ -219,9 +219,9 @@ discard block |
||
219 | 219 | return $sndParent->find('css', 'input[type=checkbox]'); |
220 | 220 | } elseif ($sndParent->hasClass('control-group-choice')) { |
221 | 221 | return $this->elementFactory->wrapElement('GroupChoiceField', $sndParent->find('css', '.controls')); |
222 | - } elseif ($field = $sndParent->find('css', '#'.$label->getAttribute('for'))) { |
|
222 | + } elseif ($field = $sndParent->find('css', '#' . $label->getAttribute('for'))) { |
|
223 | 223 | return $field; |
224 | - } elseif ($field = $this->getPage()->find('css', '#'.$label->getAttribute('for'))) { |
|
224 | + } elseif ($field = $this->getPage()->find('css', '#' . $label->getAttribute('for'))) { |
|
225 | 225 | return $field; |
226 | 226 | } else { |
227 | 227 | self::fail(sprintf('Find label "%s", but can\'t determine field type', $locator)); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $value = new \DateTime($matches['value']); |
283 | 283 | } |
284 | 284 | if ('Date' === $matches['function']) { |
285 | - $parsed = new \DateTime($matches['value']); |
|
285 | + $parsed = new \DateTime($matches['value']); |
|
286 | 286 | $value = str_replace($matches[0], $parsed->format('M j, Y'), $value); |
287 | 287 | } |
288 | 288 | } |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | |
382 | 382 | self::assertNotEmpty($errorSpans, "Field $fieldName has no validation errors"); |
383 | 383 | |
384 | - return array_map(function (NodeElement $error) { |
|
384 | + return array_map(function(NodeElement $error) { |
|
385 | 385 | return $error->getText(); |
386 | 386 | }, $errorSpans); |
387 | 387 | } |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | $helper = new QuestionHelper(); |
87 | 87 | $question = new ConfirmationQuestion( |
88 | 88 | sprintf( |
89 | - '<question>"%s" isolator discover that last time '. |
|
90 | - 'environment was not restored properly.'.PHP_EOL |
|
89 | + '<question>"%s" isolator discover that last time ' . |
|
90 | + 'environment was not restored properly.' . PHP_EOL |
|
91 | 91 | .'Do you what to restore the state?(Y/n)</question>', |
92 | 92 | $isolator->getName() |
93 | 93 | ), |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | continue; |
110 | 110 | } |
111 | 111 | |
112 | - $this->stopwatch->start($isolator->getTag().'::start'); |
|
112 | + $this->stopwatch->start($isolator->getTag() . '::start'); |
|
113 | 113 | try { |
114 | 114 | $isolator->start($event); |
115 | 115 | } catch (TableNotFoundException $e) { |
116 | 116 | break; |
117 | 117 | } finally { |
118 | - $eventResult = $this->stopwatch->stop($isolator->getTag().'::start'); |
|
118 | + $eventResult = $this->stopwatch->stop($isolator->getTag() . '::start'); |
|
119 | 119 | if ($eventResult->getDuration() >= self::ISOLATOR_THRESHOLD) { |
120 | 120 | $this->output->writeln(sprintf('time: %s ms', $eventResult->getDuration())); |
121 | 121 | } |
@@ -140,13 +140,13 @@ discard block |
||
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | |
143 | - $this->stopwatch->start($isolator->getTag().'::beforeTest'); |
|
143 | + $this->stopwatch->start($isolator->getTag() . '::beforeTest'); |
|
144 | 144 | try { |
145 | 145 | $isolator->beforeTest($event); |
146 | 146 | } catch (TableNotFoundException $e) { |
147 | 147 | break; |
148 | 148 | } finally { |
149 | - $eventResult = $this->stopwatch->stop($isolator->getTag().'::beforeTest'); |
|
149 | + $eventResult = $this->stopwatch->stop($isolator->getTag() . '::beforeTest'); |
|
150 | 150 | if ($eventResult->getDuration() >= self::ISOLATOR_THRESHOLD) { |
151 | 151 | $this->output->writeln(sprintf('time: %s ms', $eventResult->getDuration())); |
152 | 152 | } |
@@ -181,13 +181,13 @@ discard block |
||
181 | 181 | continue; |
182 | 182 | } |
183 | 183 | |
184 | - $this->stopwatch->start($isolator->getTag().'::afterTest'); |
|
184 | + $this->stopwatch->start($isolator->getTag() . '::afterTest'); |
|
185 | 185 | try { |
186 | 186 | $isolator->afterTest($event); |
187 | 187 | } catch (TableNotFoundException $e) { |
188 | 188 | break; |
189 | 189 | } finally { |
190 | - $eventResult = $this->stopwatch->stop($isolator->getTag().'::afterTest'); |
|
190 | + $eventResult = $this->stopwatch->stop($isolator->getTag() . '::afterTest'); |
|
191 | 191 | if ($eventResult->getDuration() >= self::ISOLATOR_THRESHOLD) { |
192 | 192 | $this->output->writeln(sprintf('time: %s ms', $eventResult->getDuration())); |
193 | 193 | } |
@@ -209,13 +209,13 @@ discard block |
||
209 | 209 | continue; |
210 | 210 | } |
211 | 211 | |
212 | - $this->stopwatch->start($isolator->getTag().'::terminate'); |
|
212 | + $this->stopwatch->start($isolator->getTag() . '::terminate'); |
|
213 | 213 | try { |
214 | 214 | $isolator->terminate($event); |
215 | 215 | } catch (TableNotFoundException $e) { |
216 | 216 | break; |
217 | 217 | } finally { |
218 | - $eventResult = $this->stopwatch->stop($isolator->getTag().'::terminate'); |
|
218 | + $eventResult = $this->stopwatch->stop($isolator->getTag() . '::terminate'); |
|
219 | 219 | if ($eventResult->getDuration() >= self::ISOLATOR_THRESHOLD) { |
220 | 220 | $this->output->writeln(sprintf('time: %s ms', $eventResult->getDuration())); |
221 | 221 | } |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | $container = $kernel->getContainer(); |
51 | 51 | |
52 | 52 | $this->dbHost = $container->getParameter('database_host'); |
53 | - $this->dbPort = $container->getParameter('database_port') ? : 3306; |
|
53 | + $this->dbPort = $container->getParameter('database_port') ?: 3306; |
|
54 | 54 | $this->dbName = $container->getParameter('database_name'); |
55 | 55 | $this->dbUser = $container->getParameter('database_user'); |
56 | 56 | $this->dbPass = $container->getParameter('database_password'); |
57 | - $this->dbDump = sys_get_temp_dir().DIRECTORY_SEPARATOR.$this->dbName.TokenGenerator::generateToken('db'); |
|
58 | - $this->dbTempName = $this->dbName.'_temp'.TokenGenerator::generateToken('db'); |
|
57 | + $this->dbDump = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $this->dbName . TokenGenerator::generateToken('db'); |
|
58 | + $this->dbTempName = $this->dbName . '_temp' . TokenGenerator::generateToken('db'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** {@inheritdoc} */ |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | protected function renameTempDb() |
209 | 209 | { |
210 | 210 | $this->restoreDbFromDumpProcess = $this->runProcess(sprintf( |
211 | - 'MYSQL_PWD=%s && for table in `mysql -h %s -P %s -u %s -s -N -e "use %s;show tables from %4$s;"`; '. |
|
211 | + 'MYSQL_PWD=%s && for table in `mysql -h %s -P %s -u %s -s -N -e "use %s;show tables from %4$s;"`; ' . |
|
212 | 212 | 'do mysql -h %2$s -u %3$s -s -N -e "use %4$s;rename table %4$s.$table to %5$s.$table;"; done;', |
213 | 213 | $this->dbPass, |
214 | 214 | $this->dbHost, |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | private function isDbExists($dbName) |
274 | 274 | { |
275 | 275 | $process = $this->runProcess(sprintf( |
276 | - 'MYSQL_PWD=%s mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA '. |
|
276 | + 'MYSQL_PWD=%s mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA ' . |
|
277 | 277 | 'WHERE SCHEMA_NAME = \'%s\'" -h %s -P %s -u %s', |
278 | 278 | $this->dbPass, |
279 | 279 | $dbName, |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | $path = $event->getFeature()->getFile(); |
52 | 52 | |
53 | 53 | $featureFileName = pathinfo($path, PATHINFO_BASENAME); |
54 | - $expectedFileName = $this->canonize($featureTitle).'.feature'; |
|
54 | + $expectedFileName = $this->canonize($featureTitle) . '.feature'; |
|
55 | 55 | |
56 | 56 | if ($expectedFileName != $featureFileName) { |
57 | 57 | $this->rename($path, $expectedFileName); |
58 | 58 | $this->errors[] = sprintf( |
59 | - 'Feature "%s" should be renamed to "%s"'.PHP_EOL. |
|
59 | + 'Feature "%s" should be renamed to "%s"' . PHP_EOL . |
|
60 | 60 | 'Actually it is renamed, so please apply and commit changes', |
61 | 61 | $featureFileName, |
62 | 62 | $expectedFileName |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | private function rename($featurePath, $newFileName) |
119 | 119 | { |
120 | 120 | $dir = pathinfo($featurePath, PATHINFO_DIRNAME); |
121 | - $newFeaturePath = $dir.DIRECTORY_SEPARATOR.$newFileName; |
|
121 | + $newFeaturePath = $dir . DIRECTORY_SEPARATOR . $newFileName; |
|
122 | 122 | |
123 | 123 | if (is_file($newFeaturePath)) { |
124 | 124 | $this->errors[] = sprintf('File "%s" cannot be renamed to "%s"', $featurePath, $newFeaturePath); |
@@ -120,9 +120,9 @@ |
||
120 | 120 | private function addDetails(&$message, BeforeFeatureTested $event, $exception) |
121 | 121 | { |
122 | 122 | $message = sprintf( |
123 | - $message.PHP_EOL. |
|
124 | - ' Suite: %s'.PHP_EOL. |
|
125 | - ' Feature: %s'.PHP_EOL. |
|
123 | + $message . PHP_EOL . |
|
124 | + ' Suite: %s' . PHP_EOL . |
|
125 | + ' Feature: %s' . PHP_EOL . |
|
126 | 126 | ' %s', |
127 | 127 | $event->getSuite()->getName(), |
128 | 128 | $event->getFeature()->getFile(), |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $this->mink = $mink; |
45 | 45 | $this->logDir = $logDir; |
46 | - $this->logFile = $this->logDir.DIRECTORY_SEPARATOR.'behat_'.LogType::BROWSER.'.log'; |
|
46 | + $this->logFile = $this->logDir . DIRECTORY_SEPARATOR . 'behat_' . LogType::BROWSER . '.log'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | foreach ($content as $item) { |
115 | 115 | $time = isset($item['timestamp']) |
116 | - ? '@'.round($item['timestamp']/1000) |
|
116 | + ? '@' . round($item['timestamp'] / 1000) |
|
117 | 117 | : 'now'; |
118 | 118 | $dateTime = new \DateTime($time); |
119 | 119 | $level = isset($item['level']) |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $request = array( |
33 | 33 | "user" => array( |
34 | 34 | "username" => 'user_' . mt_rand(), |
35 | - "email" => 'test_' . mt_rand() . '@test.com', |
|
35 | + "email" => 'test_' . mt_rand() . '@test.com', |
|
36 | 36 | "enabled" => '1', |
37 | 37 | "plainPassword" => '1231231q', |
38 | 38 | "firstName" => "firstName", |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $roundedValue = $this->roundingService->round($value); |
54 | 54 | return $this->formatter->formatDecimal( |
55 | 55 | $roundedValue, |
56 | - [ 'fraction_digits' => $this->roundingService->getPrecision() ] |
|
56 | + ['fraction_digits' => $this->roundingService->getPrecision()] |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | $replaceSymbols = array_filter( |
54 | 54 | [$currency, $currencySymbol, $currencyIntlSymbol], |
55 | - function ($symbol) use ($localizedCurrencySymbol) { |
|
55 | + function($symbol) use ($localizedCurrencySymbol) { |
|
56 | 56 | return $symbol !== $localizedCurrencySymbol; |
57 | 57 | } |
58 | 58 | ); |