@@ -86,7 +86,7 @@ |
||
| 86 | 86 | 'inversedBy' => 'reviews', |
| 87 | 87 | 'joinColumns' => [ |
| 88 | 88 | [ |
| 89 | - 'name' => $subject.'_id', |
|
| 89 | + 'name' => $subject . '_id', |
|
| 90 | 90 | 'referencedColumnName' => $reviewableEntityMetadata->fieldMappings['id']['columnName'], |
| 91 | 91 | 'nullable' => false, |
| 92 | 92 | 'onDelete' => 'CASCADE', |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | SessionInterface $session, |
| 46 | 46 | OrderRepositoryInterface $orderRepository, |
| 47 | 47 | OrderInterface $cart |
| 48 | - ) { |
|
| 48 | + ) { |
|
| 49 | 49 | $session->has('session_key_name')->willReturn(true); |
| 50 | 50 | $session->get('session_key_name')->willReturn(12345); |
| 51 | 51 | $orderRepository->findCartById(12345)->willReturn($cart); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | SessionInterface $session, |
| 46 | 46 | OrderRepositoryInterface $orderRepository, |
| 47 | 47 | OrderInterface $cart |
| 48 | - ) { |
|
| 48 | + ) { |
|
| 49 | 49 | $session->has('session_key_name')->willReturn(true); |
| 50 | 50 | $session->get('session_key_name')->willReturn(12345); |
| 51 | 51 | $orderRepository->findCartById(12345)->willReturn($cart); |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | public function getFunctions() |
| 38 | 38 | { |
| 39 | 39 | return [ |
| 40 | - new \Twig_SimpleFunction('sylius_inventory_is_available', [$this->helper, 'isStockAvailable']), |
|
| 41 | - new \Twig_SimpleFunction('sylius_inventory_is_sufficient', [$this->helper, 'isStockSufficient']), |
|
| 40 | + new \Twig_SimpleFunction('sylius_inventory_is_available', [$this->helper, 'isStockAvailable']), |
|
| 41 | + new \Twig_SimpleFunction('sylius_inventory_is_sufficient', [$this->helper, 'isStockSufficient']), |
|
| 42 | 42 | ]; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | 'targetEntity' => $subjectClass, |
| 88 | 88 | 'inversedBy' => 'attributes', |
| 89 | 89 | 'joinColumns' => [[ |
| 90 | - 'name' => $subject.'_id', |
|
| 90 | + 'name' => $subject . '_id', |
|
| 91 | 91 | 'referencedColumnName' => $targetEntityMetadata->fieldMappings['id']['columnName'], |
| 92 | 92 | 'nullable' => false, |
| 93 | 93 | 'onDelete' => 'CASCADE', |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @return array |
|
| 42 | + * @return string[] |
|
| 43 | 43 | */ |
| 44 | 44 | public function getSubscribedEvents() |
| 45 | 45 | { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $client = $this->getClient(); |
| 28 | 28 | |
| 29 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 29 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 30 | 30 | $this->assertEquals($contents, trim($crawler->text())); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $client = $this->getClient(); |
| 56 | 56 | |
| 57 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 57 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 58 | 58 | $this->assertEquals($contents, trim($crawler->text())); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $client = $this->getClient(); |
| 84 | 84 | |
| 85 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 85 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 86 | 86 | $this->assertEquals($contents, trim($crawler->text())); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | $client = $this->getClient(); |
| 110 | 110 | |
| 111 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 111 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 112 | 112 | $this->assertEquals($contents, trim($crawler->text())); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | | sylius.two | |
| 57 | 57 | +------------+ |
| 58 | 58 | |
| 59 | -EOT |
|
| 59 | +eot |
|
| 60 | 60 | , $display); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | | whatever.something.elephants | camels | |
| 83 | 83 | +------------------------------+-----------------+ |
| 84 | 84 | |
| 85 | -EOT |
|
| 85 | +eot |
|
| 86 | 86 | , $display); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | ], |
| 970 | 970 | ]; |
| 971 | 971 | $routeFactory->createRoute('/products/new', $createDefaults, [], [], '', [], ['GET', 'POST']) |
| 972 | - ->willReturn($createRoute); |
|
| 972 | + ->willReturn($createRoute); |
|
| 973 | 973 | $routeCollection->add('sylius_product_create', $createRoute)->shouldBeCalled(); |
| 974 | 974 | |
| 975 | 975 | $updateDefaults = [ |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | ], |
| 980 | 980 | ]; |
| 981 | 981 | $routeFactory->createRoute('/products/{id}/edit', $updateDefaults, [], [], '', [], ['GET', 'PUT', 'PATCH']) |
| 982 | - ->willReturn($updateRoute); |
|
| 982 | + ->willReturn($updateRoute); |
|
| 983 | 983 | $routeCollection->add('sylius_product_update', $updateRoute)->shouldBeCalled(); |
| 984 | 984 | |
| 985 | 985 | $deleteDefaults = [ |
@@ -989,7 +989,7 @@ discard block |
||
| 989 | 989 | ], |
| 990 | 990 | ]; |
| 991 | 991 | $routeFactory->createRoute('/products/{id}', $deleteDefaults, [], [], '', [], ['DELETE']) |
| 992 | - ->willReturn($deleteRoute); |
|
| 992 | + ->willReturn($deleteRoute); |
|
| 993 | 993 | $routeCollection->add('sylius_product_delete', $deleteRoute)->shouldBeCalled(); |
| 994 | 994 | |
| 995 | 995 | $this->load($configuration, 'sylius.resource')->shouldReturn($routeCollection); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | <<<EOT |
| 50 | 50 | foo: bar |
| 51 | 51 | only: string |
| 52 | -EOT; |
|
| 52 | +eot; |
|
| 53 | 53 | |
| 54 | 54 | $this |
| 55 | 55 | ->shouldThrow(InvalidConfigurationException::class) |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $configuration = |
| 64 | 64 | <<<EOT |
| 65 | 65 | alias: sylius.foo |
| 66 | -EOT; |
|
| 66 | +eot; |
|
| 67 | 67 | |
| 68 | 68 | $this |
| 69 | 69 | ->shouldThrow(\InvalidArgumentException::class) |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $configuration = |
| 93 | 93 | <<<EOT |
| 94 | 94 | alias: sylius.product |
| 95 | -EOT; |
|
| 95 | +eot; |
|
| 96 | 96 | |
| 97 | 97 | $showDefaults = [ |
| 98 | 98 | '_controller' => 'sylius.controller.product:showAction', |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $configuration = |
| 165 | 165 | <<<EOT |
| 166 | 166 | alias: sylius.product_option |
| 167 | -EOT; |
|
| 167 | +eot; |
|
| 168 | 168 | |
| 169 | 169 | $showDefaults = [ |
| 170 | 170 | '_controller' => 'sylius.controller.product_option:showAction', |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | <<<EOT |
| 238 | 238 | alias: sylius.product |
| 239 | 239 | path: super-duper-products |
| 240 | -EOT; |
|
| 240 | +eot; |
|
| 241 | 241 | |
| 242 | 242 | $showDefaults = [ |
| 243 | 243 | '_controller' => 'sylius.controller.product:showAction', |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | <<<EOT |
| 311 | 311 | alias: sylius.product |
| 312 | 312 | form: sylius_product_custom |
| 313 | -EOT; |
|
| 313 | +eot; |
|
| 314 | 314 | |
| 315 | 315 | $showDefaults = [ |
| 316 | 316 | '_controller' => 'sylius.controller.product:showAction', |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | <<<EOT |
| 386 | 386 | alias: sylius.product |
| 387 | 387 | section: admin |
| 388 | -EOT; |
|
| 388 | +eot; |
|
| 389 | 389 | |
| 390 | 390 | $showDefaults = [ |
| 391 | 391 | '_controller' => 'sylius.controller.product:showAction', |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | <<<EOT |
| 464 | 464 | alias: sylius.product |
| 465 | 465 | templates: SyliusAdminBundle:Product |
| 466 | -EOT; |
|
| 466 | +eot; |
|
| 467 | 467 | |
| 468 | 468 | $showDefaults = [ |
| 469 | 469 | '_controller' => 'sylius.controller.product:showAction', |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | <<<EOT |
| 539 | 539 | alias: sylius.product |
| 540 | 540 | except: ['show', 'delete'] |
| 541 | -EOT; |
|
| 541 | +eot; |
|
| 542 | 542 | |
| 543 | 543 | $indexDefaults = [ |
| 544 | 544 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | <<<EOT |
| 591 | 591 | alias: sylius.product |
| 592 | 592 | only: ['create', 'index'] |
| 593 | -EOT; |
|
| 593 | +eot; |
|
| 594 | 594 | |
| 595 | 595 | $indexDefaults = [ |
| 596 | 596 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | alias: sylius.product |
| 621 | 621 | except: ['show', 'delete'] |
| 622 | 622 | only: ['create'] |
| 623 | -EOT; |
|
| 623 | +eot; |
|
| 624 | 624 | |
| 625 | 625 | $this |
| 626 | 626 | ->shouldThrow(\InvalidArgumentException::class) |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | <<<EOT |
| 651 | 651 | alias: sylius.product |
| 652 | 652 | redirect: update |
| 653 | -EOT; |
|
| 653 | +eot; |
|
| 654 | 654 | |
| 655 | 655 | $showDefaults = [ |
| 656 | 656 | '_controller' => 'sylius.controller.product:showAction', |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $configuration = |
| 725 | 725 | <<<EOT |
| 726 | 726 | alias: sylius.product |
| 727 | -EOT; |
|
| 727 | +eot; |
|
| 728 | 728 | |
| 729 | 729 | $showDefaults = [ |
| 730 | 730 | '_controller' => 'sylius.controller.product:showAction', |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | alias: sylius.product |
| 800 | 800 | only: ['create', 'index'] |
| 801 | 801 | grid: sylius_admin_product |
| 802 | -EOT; |
|
| 802 | +eot; |
|
| 803 | 803 | |
| 804 | 804 | $indexDefaults = [ |
| 805 | 805 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | bar: foo |
| 853 | 853 | update: |
| 854 | 854 | abc: xyz |
| 855 | -EOT; |
|
| 855 | +eot; |
|
| 856 | 856 | |
| 857 | 857 | $showDefaults = [ |
| 858 | 858 | '_controller' => 'sylius.controller.product:showAction', |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | <<<EOT |
| 943 | 943 | alias: sylius.product |
| 944 | 944 | permission: true |
| 945 | -EOT; |
|
| 945 | +eot; |
|
| 946 | 946 | |
| 947 | 947 | $showDefaults = [ |
| 948 | 948 | '_controller' => 'sylius.controller.product:showAction', |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | protected function getPropertyName($name) |
| 97 | 97 | { |
| 98 | 98 | if (in_array($name, $this->translatableFields, true)) { |
| 99 | - return 'translations.'.$this->localeProvider->getDefaultLocaleCode().'.'.$name; |
|
| 99 | + return 'translations.' . $this->localeProvider->getDefaultLocaleCode() . '.' . $name; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | return $name; |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | namespace Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB; |
| 13 | 13 | |
| 14 | 14 | use Doctrine\MongoDB\Query\Builder as QueryBuilder; |
| 15 | -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; |
|
| 16 | 15 | use Sylius\Component\Resource\Repository\TranslatableRepositoryInterface; |
| 16 | +use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Doctrine ORM driver translatable entity repository. |
@@ -133,11 +133,11 @@ |
||
| 133 | 133 | { |
| 134 | 134 | foreach ($parameters as $key => $value) { |
| 135 | 135 | if (is_array($value)) { |
| 136 | - $flattened = $this->flattenParameters($value, $flattened, $prefix.$key.'.'); |
|
| 136 | + $flattened = $this->flattenParameters($value, $flattened, $prefix . $key . '.'); |
|
| 137 | 137 | continue; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $flattened[$prefix.$key] = $value; |
|
| 140 | + $flattened[$prefix . $key] = $value; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $flattened; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | To show the metadata for a resource, pass its alias: |
| 56 | 56 | |
| 57 | 57 | $ php %command.full_name% sylius.user |
| 58 | -EOT |
|
| 58 | +eot |
|
| 59 | 59 | ); |
| 60 | 60 | $this->addArgument('resource', InputArgument::OPTIONAL, 'Resource to debug'); |
| 61 | 61 | } |