@@ -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 = ''; |
@@ -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 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | ->setPriority(100) |
51 | 51 | ); |
52 | 52 | $this->tagBag->addTag( |
53 | - (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/library.html.twig', ['api_id' => $this->apiId])) |
|
53 | + (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/library.html.twig', [ 'api_id' => $this->apiId ])) |
|
54 | 54 | ->setSection(TagInterface::SECTION_BODY_END) |
55 | 55 | ->setName(Tags::TAG_LIBRARY) |
56 | 56 | ->setPriority(-100) |
@@ -30,7 +30,7 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | $this->tagBag->addTag( |
33 | - (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/item_visited.js.twig', ['product' => $product])) |
|
33 | + (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/item_visited.js.twig', [ 'product' => $product ])) |
|
34 | 34 | ->setSection(TagInterface::SECTION_BODY_END) |
35 | 35 | ->setName(Tags::TAG_ITEM_VISITED) |
36 | 36 | ); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | $this->tagBag->addTag( |
33 | - (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/items_purchased.js.twig', ['order' => $order])) |
|
33 | + (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/items_purchased.js.twig', [ 'order' => $order ])) |
|
34 | 34 | ->setSection(TagInterface::SECTION_BODY_END) |
35 | 35 | ->setName(Tags::TAG_ITEMS_PURCHASED) |
36 | 36 | ); |