@@ -16,7 +16,7 @@ |
||
16 | 16 | use Symfony\Component\Form\Exception\UnexpectedTypeException; |
17 | 17 | |
18 | 18 | // Since the root namespace "spec" is not in our autoload |
19 | -require_once __DIR__ . DIRECTORY_SEPARATOR . 'FakeEntity.php'; |
|
19 | +require_once __DIR__.DIRECTORY_SEPARATOR.'FakeEntity.php'; |
|
20 | 20 | |
21 | 21 | class ObjectSelectionToIdentifierCollectionTransformerSpec extends ObjectBehavior |
22 | 22 | { |
@@ -307,7 +307,7 @@ |
||
307 | 307 | $sorting = $this->getRequestParameter('sorting'); |
308 | 308 | foreach ($defaultSorting as $key => $value) { |
309 | 309 | //do not override request parameters by $defaultSorting values |
310 | - if (!isset($sorting[$key])){ |
|
310 | + if (!isset($sorting[$key])) { |
|
311 | 311 | $sorting[$key] = $value; |
312 | 312 | } |
313 | 313 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $data = $table->getRowsHash(); |
78 | 78 | $type = str_replace(' ', '_', trim($type)); |
79 | 79 | |
80 | - $object = $this->waitFor(function () use ($type, $data) { |
|
80 | + $object = $this->waitFor(function() use ($type, $data) { |
|
81 | 81 | try { |
82 | 82 | return $this->findOneByName($type, $data['name']); |
83 | 83 | } catch (\InvalidArgumentException $exception) { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $entityManager = $this->getEntityManager(); |
88 | 88 | $entityManager->getFilters()->disable('softdeleteable'); |
89 | 89 | |
90 | - $resource = $this->waitFor(function () use ($type, $property, $value) { |
|
90 | + $resource = $this->waitFor(function() use ($type, $property, $value) { |
|
91 | 91 | return $this->getRepository($type)->findOneBy([$property => $value]); |
92 | 92 | }); |
93 | 93 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | { |
299 | 299 | $tableNode = new TableNode(array( |
300 | 300 | array(trim($columnName)), |
301 | - array(trim('%' . $value . '%')), |
|
301 | + array(trim('%'.$value.'%')), |
|
302 | 302 | )); |
303 | 303 | |
304 | 304 | $this->iShouldSeeTheFollowingRow($tableNode); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | { |
314 | 314 | $tableNode = new TableNode(array( |
315 | 315 | array(trim($columnName)), |
316 | - array(trim('%' . $value . '%')), |
|
316 | + array(trim('%'.$value.'%')), |
|
317 | 317 | )); |
318 | 318 | |
319 | 319 | $this->iShouldNotSeeTheFollowingRow($tableNode); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | public function iWait($time) |
416 | 416 | { |
417 | - $this->getSession()->wait($time*1000); |
|
417 | + $this->getSession()->wait($time * 1000); |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | /** |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | public function iShouldBeOnThePageWithGivenParent($page, $parentType, $parentName) |
518 | 518 | { |
519 | 519 | $parent = $this->findOneByName($parentType, $parentName); |
520 | - $this->assertSession()->addressEquals($this->generatePageUrl($page, array(sprintf('%sId',$parentType) => $parent->getId()))); |
|
520 | + $this->assertSession()->addressEquals($this->generatePageUrl($page, array(sprintf('%sId', $parentType) => $parent->getId()))); |
|
521 | 521 | |
522 | 522 | try { |
523 | 523 | $this->assertStatusCodeEquals(200); |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | */ |
531 | 531 | public function iAmDoingSomethingWithResourceByNameFromGivenCategory($action, $type, $name, $categoryType, $categoryName) |
532 | 532 | { |
533 | - $type = str_replace(' ','_', $type); |
|
533 | + $type = str_replace(' ', '_', $type); |
|
534 | 534 | $action = str_replace(array_keys($this->actions), array_values($this->actions), $action); |
535 | 535 | |
536 | 536 | $root = $this->findOneByName($categoryType, $categoryName); |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | */ |
612 | 612 | protected function waitForModalToAppear($modalContainer) |
613 | 613 | { |
614 | - $this->waitFor(function () use ($modalContainer) { |
|
614 | + $this->waitFor(function() use ($modalContainer) { |
|
615 | 615 | return false !== strpos($modalContainer->getAttribute('class'), 'in'); |
616 | 616 | }); |
617 | 617 | } |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | */ |
622 | 622 | protected function waitForModalToDisappear($modalContainer) |
623 | 623 | { |
624 | - $this->waitFor(function () use ($modalContainer) { |
|
624 | + $this->waitFor(function() use ($modalContainer) { |
|
625 | 625 | return false === strpos($modalContainer->getAttribute('class'), 'in'); |
626 | 626 | }); |
627 | 627 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $repositoryClass = new Parameter('sylius.phpcr_odm.repository.class'); |
41 | 41 | |
42 | 42 | if ($metadata->hasClass('repository')) { |
43 | - $repositoryClass = $metadata->getClass('repository'); |
|
43 | + $repositoryClass = $metadata->getClass('repository'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $definition = new Definition($repositoryClass); |
@@ -110,9 +110,9 @@ |
||
110 | 110 | $translatableResourceMetadata = $this->registry->get(str_replace('_translation', '', $resourceMetadata->getAlias())); |
111 | 111 | |
112 | 112 | $metadata->mapManyToOne(array( |
113 | - 'fieldName' => 'translatable' , |
|
113 | + 'fieldName' => 'translatable', |
|
114 | 114 | 'targetEntity' => $translatableResourceMetadata->getClass('model'), |
115 | - 'inversedBy' => 'translations' , |
|
115 | + 'inversedBy' => 'translations', |
|
116 | 116 | 'joinColumns' => array(array( |
117 | 117 | 'name' => 'translatable_id', |
118 | 118 | 'referencedColumnName' => 'id', |
@@ -116,15 +116,15 @@ discard block |
||
116 | 116 | $wrapped = AbstractWrapper::wrap($relation, $this->om); |
117 | 117 | if ($parent = $wrapped->getPropertyValue($options['relationParentRelationField'])) { |
118 | 118 | |
119 | - $translation = call_user_func_array(array($parent,$options['translate']), array($locale)); |
|
119 | + $translation = call_user_func_array(array($parent, $options['translate']), array($locale)); |
|
120 | 120 | |
121 | 121 | $this->parentSlug = $translation->{$options['parentFieldMethod']}(); |
122 | 122 | |
123 | 123 | // if needed, remove suffix from parentSlug, so we can use it to prepend it to our slug |
124 | - if(isset($options['suffix'])) { |
|
124 | + if (isset($options['suffix'])) { |
|
125 | 125 | $suffix = $options['suffix']; |
126 | 126 | |
127 | - if(substr($this->parentSlug, -strlen($suffix)) === $suffix) { //endsWith |
|
127 | + if (substr($this->parentSlug, -strlen($suffix)) === $suffix) { //endsWith |
|
128 | 128 | $this->parentSlug = substr_replace($this->parentSlug, '', -1 * strlen($suffix)); |
129 | 129 | } |
130 | 130 | } |
@@ -219,6 +219,6 @@ discard block |
||
219 | 219 | */ |
220 | 220 | private function deleteUnnecessaryParentSlug($slug) |
221 | 221 | { |
222 | - return preg_replace('/^' . preg_quote($this->parentSlug.$this->usedPathSeparator, '/') . '/', '', $slug); |
|
222 | + return preg_replace('/^'.preg_quote($this->parentSlug.$this->usedPathSeparator, '/').'/', '', $slug); |
|
223 | 223 | } |
224 | 224 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | |
87 | 87 | $resolver |
88 | 88 | ->setDefaults(array( |
89 | - 'validation_groups' => function (Options $options) { |
|
89 | + 'validation_groups' => function(Options $options) { |
|
90 | 90 | if ($options['shippable']) { |
91 | 91 | $this->validationGroups[] = 'shippable'; |
92 | 92 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function buildView(FormView $view, FormInterface $form, array $options) |
56 | 56 | { |
57 | 57 | if ($form->getConfig()->hasAttribute('prototypes')) { |
58 | - $view->vars['prototypes'] = array_map(function (FormInterface $prototype) use ($view) { |
|
58 | + $view->vars['prototypes'] = array_map(function(FormInterface $prototype) use ($view) { |
|
59 | 59 | return $prototype->createView($view); |
60 | 60 | }, $form->getConfig()->getAttribute('prototypes')); |
61 | 61 | } |