@@ -75,7 +75,7 @@ |
||
75 | 75 | private function assertEntityFieldContains(Collection $data, string $className, array $expected) |
76 | 76 | { |
77 | 77 | $expectedIds = array_map( |
78 | - function ($entity) { |
|
78 | + function($entity) { |
|
79 | 79 | return $entity->getId(); |
80 | 80 | }, |
81 | 81 | $expected |
@@ -88,7 +88,7 @@ |
||
88 | 88 | 'attr' => [], |
89 | 89 | ]); |
90 | 90 | |
91 | - $resolver->setNormalizer('attr', function (Options $options, $value) { |
|
91 | + $resolver->setNormalizer('attr', function(Options $options, $value) { |
|
92 | 92 | $value['readonly'] = (count($options['choices']) === 1); |
93 | 93 | |
94 | 94 | return $value; |
@@ -51,7 +51,7 @@ 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); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | private function rename($featurePath, $newFileName) |
118 | 118 | { |
119 | 119 | $dir = pathinfo($featurePath, PATHINFO_DIRNAME); |
120 | - $newFeaturePath = $dir.DIRECTORY_SEPARATOR.$newFileName; |
|
120 | + $newFeaturePath = $dir . DIRECTORY_SEPARATOR . $newFileName; |
|
121 | 121 | |
122 | 122 | if (is_file($newFeaturePath)) { |
123 | 123 | $this->errors[] = sprintf('File "%s" cannot be renamed to "%s"', $featurePath, $newFeaturePath); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $classes = preg_split('/\s+/', (string)$sndParent->getAttribute('class'), -1, PREG_SPLIT_NO_EMPTY); |
212 | 212 | |
213 | 213 | if (in_array('control-group-collection', $classes, true)) { |
214 | - $elementName = Inflector::singularize(trim($label->getText())).'Collection'; |
|
214 | + $elementName = Inflector::singularize(trim($label->getText())) . 'Collection'; |
|
215 | 215 | $elementName = $this->elementFactory->hasElement($elementName) ? $elementName : 'CollectionField'; |
216 | 216 | |
217 | 217 | return $this->elementFactory->wrapElement($elementName, $sndParent); |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | return $sndParent->find('css', 'input[type=checkbox]'); |
226 | 226 | } elseif (in_array('control-group-choice', $classes, true)) { |
227 | 227 | return $this->elementFactory->wrapElement('GroupChoiceField', $sndParent->find('css', '.controls')); |
228 | - } elseif ($field = $sndParent->find('css', '#'.$label->getAttribute('for'))) { |
|
228 | + } elseif ($field = $sndParent->find('css', '#' . $label->getAttribute('for'))) { |
|
229 | 229 | return $field; |
230 | - } elseif ($field = $this->getPage()->find('css', '#'.$label->getAttribute('for'))) { |
|
230 | + } elseif ($field = $this->getPage()->find('css', '#' . $label->getAttribute('for'))) { |
|
231 | 231 | return $field; |
232 | 232 | } else { |
233 | 233 | self::fail(sprintf('Find label "%s", but can\'t determine field type', $locator)); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $value = new \DateTime($matches['value']); |
297 | 297 | } |
298 | 298 | if ('Date' === $matches['function']) { |
299 | - $parsed = new \DateTime($matches['value']); |
|
299 | + $parsed = new \DateTime($matches['value']); |
|
300 | 300 | $value = str_replace($matches[0], $parsed->format('M j, Y'), $value); |
301 | 301 | } |
302 | 302 | } |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | self::assertNotEmpty($errorSpans, "Field $fieldName has no validation errors"); |
401 | 401 | |
402 | - return array_map(function (NodeElement $error) { |
|
402 | + return array_map(function(NodeElement $error) { |
|
403 | 403 | return $error->getText(); |
404 | 404 | }, $errorSpans); |
405 | 405 | } |