@@ -21,7 +21,7 @@ |
||
| 21 | 21 | use Sylius\Component\Resource\Repository\InMemoryRepository; |
| 22 | 22 | use Sylius\Component\Resource\Repository\RepositoryInterface; |
| 23 | 23 | |
| 24 | -require_once __DIR__ . '/../Fixtures/SampleResourceInterface.php'; |
|
| 24 | +require_once __DIR__.'/../Fixtures/SampleResourceInterface.php'; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @author Jan Góralski <[email protected]> |
@@ -481,7 +481,7 @@ |
||
| 481 | 481 | return null; |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | - $filtered = $this->oauthAccounts->filter(function (UserOAuthInterface $oauth) use ($provider) { |
|
| 484 | + $filtered = $this->oauthAccounts->filter(function(UserOAuthInterface $oauth) use ($provider) { |
|
| 485 | 485 | return $provider === $oauth->getProvider(); |
| 486 | 486 | }); |
| 487 | 487 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function getMatchers() |
| 66 | 66 | { |
| 67 | 67 | return array( |
| 68 | - 'haveLength' => function ($subject, $key) { |
|
| 68 | + 'haveLength' => function($subject, $key) { |
|
| 69 | 69 | return $key === strlen($subject); |
| 70 | 70 | }, |
| 71 | 71 | ); |
@@ -48,10 +48,10 @@ |
||
| 48 | 48 | $builder |
| 49 | 49 | ->addViewTransformer($transformer) |
| 50 | 50 | ->setAttribute('data_class', $options['data_class']) |
| 51 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($transformer) { |
|
| 51 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($transformer) { |
|
| 52 | 52 | $event->setData($transformer->reverseTransform($event->getData())); |
| 53 | 53 | }) |
| 54 | - ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($transformer) { |
|
| 54 | + ->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) use ($transformer) { |
|
| 55 | 55 | $event->setData($transformer->reverseTransform($event->getData())); |
| 56 | 56 | }) |
| 57 | 57 | ; |
@@ -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 | { |