@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | |
| 816 | 816 | $authorizationChecker->isGranted($configuration, 'sylius.product.update')->willReturn(true); |
| 817 | 817 | |
| 818 | - $singleResourceProvider->get($configuration, $repository)->willReturn($resource);; |
|
| 818 | + $singleResourceProvider->get($configuration, $repository)->willReturn($resource); ; |
|
| 819 | 819 | $resourceFormFactory->create($configuration, $resource)->willReturn($form); |
| 820 | 820 | |
| 821 | 821 | $request->isMethod('PATCH')->willReturn(true); |
@@ -1243,7 +1243,7 @@ discard block |
||
| 1243 | 1243 | */ |
| 1244 | 1244 | private function getViewComparingCallback(View $expectedView) |
| 1245 | 1245 | { |
| 1246 | - return function ($value) use ($expectedView) { |
|
| 1246 | + return function($value) use ($expectedView) { |
|
| 1247 | 1247 | if (!$value instanceof View) { |
| 1248 | 1248 | return false; |
| 1249 | 1249 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | if ($this->isSortable()) { |
| 300 | 300 | $sorting = $this->getRequestParameter('sorting'); |
| 301 | 301 | foreach ($defaultSorting as $key => $value) { |
| 302 | - if (!isset($sorting[$key])){ |
|
| 302 | + if (!isset($sorting[$key])) { |
|
| 303 | 303 | $sorting[$key] = $value; |
| 304 | 304 | } |
| 305 | 305 | } |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | return $this->getRequest()->isXmlHttpRequest(); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | - return (bool)$redirect['header']; |
|
| 479 | + return (bool) $redirect['header']; |
|
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | /** |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | */ |
| 337 | 337 | public function getVariants() |
| 338 | 338 | { |
| 339 | - return $this->variants->filter(function (BaseVariantInterface $variant) { |
|
| 339 | + return $this->variants->filter(function(BaseVariantInterface $variant) { |
|
| 340 | 340 | return !$variant->isDeleted() && !$variant->isMaster(); |
| 341 | 341 | }); |
| 342 | 342 | } |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | */ |
| 347 | 347 | public function getAvailableVariants() |
| 348 | 348 | { |
| 349 | - return $this->variants->filter(function (BaseVariantInterface $variant) { |
|
| 349 | + return $this->variants->filter(function(BaseVariantInterface $variant) { |
|
| 350 | 350 | return !$variant->isDeleted() && !$variant->isMaster() && $variant->isAvailable(); |
| 351 | 351 | }); |
| 352 | 352 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * PHP 5.* bug, fixed in PHP 7: https://bugs.php.net/bug.php?id=50688 |
| 40 | 40 | * "usort(): Array was modified by the user comparison function" |
| 41 | 41 | */ |
| 42 | - @usort($files, function ($firstFile, $secondFile) use ($theme) { |
|
| 42 | + @usort($files, function($firstFile, $secondFile) use ($theme) { |
|
| 43 | 43 | $firstFile = str_replace($theme->getPath(), '', $firstFile); |
| 44 | 44 | $secondFile = str_replace($theme->getPath(), '', $secondFile); |
| 45 | 45 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | public function getMatchers() |
| 56 | 56 | { |
| 57 | 57 | return [ |
| 58 | - 'haveFirstElement' => function ($subject, $element) { |
|
| 58 | + 'haveFirstElement' => function($subject, $element) { |
|
| 59 | 59 | if ($element !== reset($subject)) { |
| 60 | 60 | throw new \InvalidArgumentException(sprintf( |
| 61 | 61 | 'Expected "%s" as the first element, actual value was "%s".', |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function getMatchers() |
| 66 | 66 | { |
| 67 | 67 | return [ |
| 68 | - 'haveFunction' => function ($subject, $key) { |
|
| 68 | + 'haveFunction' => function($subject, $key) { |
|
| 69 | 69 | |
| 70 | 70 | if (!is_array($subject)) { |
| 71 | 71 | throw new FailureException('Subject of "hasFunction" matcher must be an array'); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | private function assertElementIsAdjustment($adjustment) |
| 46 | 46 | { |
| 47 | 47 | if (!$adjustment instanceof AdjustmentInterface) { |
| 48 | - throw new \InvalidArgumentException('Each adjustments array element must implement ' . AdjustmentInterface::class . '.'); |
|
| 48 | + throw new \InvalidArgumentException('Each adjustments array element must implement '.AdjustmentInterface::class.'.'); |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function apply(OrderInterface $order, ZoneInterface $zone) |
| 66 | 66 | { |
| 67 | 67 | foreach ($order->getItems() as $item) { |
| 68 | - $quantity = $item->getQuantity(); |
|
| 68 | + $quantity = $item->getQuantity(); |
|
| 69 | 69 | if (0 === $quantity) { |
| 70 | 70 | continue; |
| 71 | 71 | } |
@@ -33,15 +33,15 @@ |
||
| 33 | 33 | |
| 34 | 34 | function it_distributes_simple_integers() |
| 35 | 35 | { |
| 36 | - $this->distribute(0, 4)->shouldReturn(array(0, 0, 0, 0));; |
|
| 37 | - $this->distribute(1000, 4)->shouldReturn(array(250, 250, 250, 250));; |
|
| 38 | - $this->distribute(-1000, 4)->shouldReturn(array(-250, -250, -250, -250));; |
|
| 36 | + $this->distribute(0, 4)->shouldReturn(array(0, 0, 0, 0)); ; |
|
| 37 | + $this->distribute(1000, 4)->shouldReturn(array(250, 250, 250, 250)); ; |
|
| 38 | + $this->distribute(-1000, 4)->shouldReturn(array(-250, -250, -250, -250)); ; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function it_distributes_integers_that_cannot_be_split_equally() |
| 42 | 42 | { |
| 43 | - $this->distribute(1000, 3)->shouldReturn(array(334, 333, 333));; |
|
| 44 | - $this->distribute(-1000, 3)->shouldReturn(array(-334, -333, -333));; |
|
| 43 | + $this->distribute(1000, 3)->shouldReturn(array(334, 333, 333)); ; |
|
| 44 | + $this->distribute(-1000, 3)->shouldReturn(array(-334, -333, -333)); ; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | function it_throws_exception_if_number_of_targets_is_not_integer_or_below_1() |