| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | '@SetonoSyliusStrandsPlugin/Tag/items_purchased.js.twig', | 
| 35 | 35 | TagInterface::TYPE_SCRIPT, | 
| 36 | 36 | Tags::TAG_ITEMS_PURCHASED, | 
| 37 | - ['order' => $order] | |
| 37 | + [ 'order' => $order ] | |
| 38 | 38 | ), TagBagInterface::SECTION_BODY_BEGIN); | 
| 39 | 39 | } | 
| 40 | 40 | } | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | '@SetonoSyliusStrandsPlugin/Tag/library.html.twig', | 
| 52 | 52 | TagInterface::TYPE_HTML, | 
| 53 | 53 | Tags::TAG_LIBRARY, | 
| 54 | - ['api_id' => $this->apiId] | |
| 54 | + [ 'api_id' => $this->apiId ] | |
| 55 | 55 | ), TagBagInterface::SECTION_BODY_END); | 
| 56 | 56 | } | 
| 57 | 57 | } | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | return; | 
| 55 | 55 | } | 
| 56 | 56 | |
| 57 | - $codes = []; | |
| 57 | + $codes = [ ]; | |
| 58 | 58 | |
| 59 | 59 |          foreach ($cart->getItems() as $item) { | 
| 60 | 60 | $code = $this->itemCodeResolver->resolve($item); | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | continue; | 
| 63 | 63 | } | 
| 64 | 64 | |
| 65 | - $codes[] = $code; | |
| 65 | + $codes[ ] = $code; | |
| 66 | 66 | } | 
| 67 | 67 | |
| 68 | 68 | $codeString = ''; | 
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | '@SetonoSyliusStrandsPlugin/Tag/item_visited.js.twig', | 
| 35 | 35 | TagInterface::TYPE_SCRIPT, | 
| 36 | 36 | Tags::TAG_ITEM_VISITED, | 
| 37 | - ['product' => $product] | |
| 37 | + [ 'product' => $product ] | |
| 38 | 38 | ), TagBagInterface::SECTION_BODY_BEGIN); | 
| 39 | 39 | } | 
| 40 | 40 | } | 
| @@ -13,11 +13,11 @@ | ||
| 13 | 13 |  { | 
| 14 | 14 | public function load(array $config, ContainerBuilder $container): void | 
| 15 | 15 |      { | 
| 16 | - $config = $this->processConfiguration($this->getConfiguration([], $container), $config); | |
| 16 | + $config = $this->processConfiguration($this->getConfiguration([ ], $container), $config); | |
| 17 | 17 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); | 
| 18 | 18 | |
| 19 | -        $container->setParameter('setono_sylius_strands.api_id', $config['api_id']); | |
| 20 | -        $container->setParameter('setono_sylius_strands.variant_based', $config['variant_based']); | |
| 19 | +        $container->setParameter('setono_sylius_strands.api_id', $config[ 'api_id' ]); | |
| 20 | +        $container->setParameter('setono_sylius_strands.variant_based', $config[ 'variant_based' ]); | |
| 21 | 21 | |
| 22 | 22 |          $loader->load('services.xml'); | 
| 23 | 23 | } | 
| @@ -13,10 +13,10 @@ discard block | ||
| 13 | 13 | private $template; | 
| 14 | 14 | |
| 15 | 15 | /** @var string[] */ | 
| 16 | - private $items = []; | |
| 16 | + private $items = [ ]; | |
| 17 | 17 | |
| 18 | 18 | /** @var string[][] */ | 
| 19 | - private $filters = []; | |
| 19 | + private $filters = [ ]; | |
| 20 | 20 | |
| 21 | 21 | public function __construct(string $template) | 
| 22 | 22 |      { | 
| @@ -53,7 +53,7 @@ discard block | ||
| 53 | 53 | |
| 54 | 54 | public function addItem(string $item): self | 
| 55 | 55 |      { | 
| 56 | - $this->items[] = $item; | |
| 56 | + $this->items[ ] = $item; | |
| 57 | 57 | |
| 58 | 58 | return $this; | 
| 59 | 59 | } | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | */ | 
| 65 | 65 | public function addFilter(string $key, string $value): self | 
| 66 | 66 |      { | 
| 67 | - $this->filters[$key][] = $value; | |
| 67 | + $this->filters[ $key ][ ] = $value; | |
| 68 | 68 | |
| 69 | 69 | return $this; | 
| 70 | 70 | } | 
| @@ -75,10 +75,10 @@ discard block | ||
| 75 | 75 | return null; | 
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | - $filterGroups = []; | |
| 78 | + $filterGroups = [ ]; | |
| 79 | 79 | |
| 80 | 80 |          foreach ($this->filters as $key => $val) { | 
| 81 | -            $filterGroups[] = $key . '::' . implode(';;', $val); | |
| 81 | +            $filterGroups[ ] = $key . '::' . implode(';;', $val); | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 |          return implode('_._', $filterGroups); | 
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | public function getFilters(): array | 
| 13 | 13 |      { | 
| 14 | 14 | return [ | 
| 15 | -            new TwigFilter('strands_item_code', [Runtime::class, 'itemCode'], ['is_safe' => ['html']]), | |
| 15 | +            new TwigFilter('strands_item_code', [ Runtime::class, 'itemCode' ], [ 'is_safe' => [ 'html' ] ]), | |
| 16 | 16 | ]; | 
| 17 | 17 | } | 
| 18 | 18 | } | 
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | public function getFilters(): array | 
| 14 | 14 |      { | 
| 15 | 15 | return [ | 
| 16 | -            new TwigFilter('strands_format_money', [$this, 'formatMoney']), | |
| 16 | +            new TwigFilter('strands_format_money', [ $this, 'formatMoney' ]), | |
| 17 | 17 | ]; | 
| 18 | 18 | } | 
| 19 | 19 | |
| @@ -13,16 +13,16 @@ | ||
| 13 | 13 | public function getFilters(): array | 
| 14 | 14 |      { | 
| 15 | 15 | return [ | 
| 16 | -            new TwigFilter('strands_add_item', [Runtime::class, 'addItem'], ['is_safe' => ['html']]), | |
| 17 | -            new TwigFilter('strands_add_items', [Runtime::class, 'addItems'], ['is_safe' => ['html']]), | |
| 18 | -            new TwigFilter('strands_add_cart_items', [Runtime::class, 'addCartItems'], ['is_safe' => ['html']]), | |
| 16 | +            new TwigFilter('strands_add_item', [ Runtime::class, 'addItem' ], [ 'is_safe' => [ 'html' ] ]), | |
| 17 | +            new TwigFilter('strands_add_items', [ Runtime::class, 'addItems' ], [ 'is_safe' => [ 'html' ] ]), | |
| 18 | +            new TwigFilter('strands_add_cart_items', [ Runtime::class, 'addCartItems' ], [ 'is_safe' => [ 'html' ] ]), | |
| 19 | 19 | ]; | 
| 20 | 20 | } | 
| 21 | 21 | |
| 22 | 22 | public function getFunctions(): array | 
| 23 | 23 |      { | 
| 24 | 24 | return [ | 
| 25 | -            new TwigFunction('strands_widget', [Runtime::class, 'widget'], ['is_safe' => ['html']]), | |
| 25 | +            new TwigFunction('strands_widget', [ Runtime::class, 'widget' ], [ 'is_safe' => [ 'html' ] ]), | |
| 26 | 26 | ]; | 
| 27 | 27 | } | 
| 28 | 28 | } |