@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | $string .= '('; |
| 139 | 139 | |
| 140 | 140 | foreach ($this->getOptions() as $option) { |
| 141 | - $string .= $option->getOption()->getName() . ': ' . $option->getValue() . ', '; |
|
| 141 | + $string .= $option->getOption()->getName().': '.$option->getValue().', '; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - $string = substr($string, 0, -2) . ')'; |
|
| 144 | + $string = substr($string, 0, -2).')'; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $string; |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function setSold($sold) |
| 304 | 304 | { |
| 305 | - $this->sold = (int)$sold; |
|
| 305 | + $this->sold = (int) $sold; |
|
| 306 | 306 | |
| 307 | 307 | return $this; |
| 308 | 308 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | public function setAvailableOnDemand($availableOnDemand) |
| 330 | 330 | { |
| 331 | - $this->availableOnDemand = (bool)$availableOnDemand; |
|
| 331 | + $this->availableOnDemand = (bool) $availableOnDemand; |
|
| 332 | 332 | |
| 333 | 333 | return $this; |
| 334 | 334 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | $adjustment = $this->createAdjustment($promotion); |
| 37 | 37 | $adjustmentAmount = (int) round($subject->getAdjustmentsTotal(AdjustmentInterface::SHIPPING_ADJUSTMENT) * $configuration['percentage']); |
| 38 | - $adjustment->setAmount(- $adjustmentAmount); |
|
| 38 | + $adjustment->setAmount(-$adjustmentAmount); |
|
| 39 | 39 | |
| 40 | 40 | $subject->addAdjustment($adjustment); |
| 41 | 41 | } |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | */ |
| 87 | 87 | public function remove(ResourceInterface $resource) |
| 88 | 88 | { |
| 89 | - $newResources = array_filter($this->findAll(), function ($object) use ($resource) { |
|
| 89 | + $newResources = array_filter($this->findAll(), function($object) use ($resource) { |
|
| 90 | 90 | return $object !== $resource; |
| 91 | 91 | }); |
| 92 | 92 | |
@@ -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()); |