@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function configureOptions(OptionsResolver $resolver) |
| 41 | 41 | { |
| 42 | - $format = function (Options $options, $value) { |
|
| 42 | + $format = function(Options $options, $value) { |
|
| 43 | 43 | if ($options['widget'] === 'single_text') { |
| 44 | 44 | $formatter = new \IntlDateFormatter( |
| 45 | 45 | \Locale::getDefault(), |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | private function getFieldsFromMetadata(ClassMetadata $metadata) |
| 71 | 71 | { |
| 72 | - $fields = (array)$metadata->getFieldNames(); |
|
| 72 | + $fields = (array) $metadata->getFieldNames(); |
|
| 73 | 73 | |
| 74 | 74 | if (!$this->isIdentifierNatural($metadata)) { |
| 75 | 75 | $fields = array_diff($fields, $metadata->getIdentifier()); |
@@ -81,22 +81,22 @@ |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | if (in_array('create', $routesToGenerate)) { |
| 84 | - $createRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath : $rootPath . 'new', 'create', $isApi ? array('POST') : array('GET', 'POST')); |
|
| 84 | + $createRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath : $rootPath.'new', 'create', $isApi ? array('POST') : array('GET', 'POST')); |
|
| 85 | 85 | $routes->add($this->getRouteName($metadata, $configuration, 'create'), $createRoute); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | if (in_array('update', $routesToGenerate)) { |
| 89 | - $updateRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath . '{id}' : $rootPath . '{id}/edit', 'update', $isApi ? array('PUT', 'PATCH') : array('GET', 'PUT', 'PATCH')); |
|
| 89 | + $updateRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath.'{id}' : $rootPath.'{id}/edit', 'update', $isApi ? array('PUT', 'PATCH') : array('GET', 'PUT', 'PATCH')); |
|
| 90 | 90 | $routes->add($this->getRouteName($metadata, $configuration, 'update'), $updateRoute); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (in_array('show', $routesToGenerate)) { |
| 94 | - $showRoute = $this->createRoute($metadata, $configuration, $rootPath . '{id}', 'show', array('GET')); |
|
| 94 | + $showRoute = $this->createRoute($metadata, $configuration, $rootPath.'{id}', 'show', array('GET')); |
|
| 95 | 95 | $routes->add($this->getRouteName($metadata, $configuration, 'show'), $showRoute); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (in_array('delete', $routesToGenerate)) { |
| 99 | - $deleteRoute = $this->createRoute($metadata, $configuration, $rootPath . '{id}', 'delete', array('DELETE')); |
|
| 99 | + $deleteRoute = $this->createRoute($metadata, $configuration, $rootPath.'{id}', 'delete', array('DELETE')); |
|
| 100 | 100 | $routes->add($this->getRouteName($metadata, $configuration, 'delete'), $deleteRoute); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | 'paginate' => $limit, |
| 280 | 280 | '_sylius' => array('paginate' => '$paginate'), |
| 281 | 281 | ) |
| 282 | - )->willReturn('?paginate=' . $limit); |
|
| 282 | + )->willReturn('?paginate='.$limit); |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | $twig->render('SyliusResourceBundle:Twig:paginate.html.twig', array( |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | 'paginate' => $limit, |
| 326 | 326 | '_sylius' => array('paginate' => '$paginate'), |
| 327 | 327 | ) |
| 328 | - )->willReturn('?paginate=' . $limit . '¶ms=value'); |
|
| 328 | + )->willReturn('?paginate='.$limit.'¶ms=value'); |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | $twig->render('SyliusResourceBundle:Twig:newpaginate.html.twig', array( |
@@ -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); |