@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @var array |
36 | 36 | */ |
37 | - private $attributes = []; |
|
37 | + private $attributes = [ ]; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * @return int |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function pushAttribute($attributeName, $value) |
128 | 128 | { |
129 | - $this->attributes[] = ['name' => $attributeName, 'value' => $value]; |
|
129 | + $this->attributes[ ] = [ 'name' => $attributeName, 'value' => $value ]; |
|
130 | 130 | |
131 | 131 | return $this; |
132 | 132 | } |
@@ -174,7 +174,7 @@ |
||
174 | 174 | */ |
175 | 175 | public function addDataTour($dataTour) |
176 | 176 | { |
177 | - $this->dataTour[] = $dataTour; |
|
177 | + $this->dataTour[ ] = $dataTour; |
|
178 | 178 | |
179 | 179 | return $this; |
180 | 180 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return bool |
79 | 79 | */ |
80 | - public function generate(ShopInfo $shopInfo, array $currencies, array $categories, array $offers, array $deliveries = []) |
|
80 | + public function generate(ShopInfo $shopInfo, array $currencies, array $categories, array $offers, array $deliveries = [ ]) |
|
81 | 81 | { |
82 | 82 | try { |
83 | 83 | $this->addHeader(); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | if (!empty($category->getAttributes())) { |
172 | 172 | foreach ($category->getAttributes() as $attribute) { |
173 | - $this->writer->writeAttribute($attribute['name'], $attribute['value']); |
|
173 | + $this->writer->writeAttribute($attribute[ 'name' ], $attribute[ 'value' ]); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * @var array |
63 | 63 | */ |
64 | - private $categoriesId = []; |
|
64 | + private $categoriesId = [ ]; |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * @var string |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * @var array |
113 | 113 | */ |
114 | - private $deliveryOptions = []; |
|
114 | + private $deliveryOptions = [ ]; |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * @var string |
@@ -146,17 +146,17 @@ discard block |
||
146 | 146 | /** |
147 | 147 | * @var array |
148 | 148 | */ |
149 | - private $pictures = []; |
|
149 | + private $pictures = [ ]; |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * @var array |
153 | 153 | */ |
154 | - private $params = []; |
|
154 | + private $params = [ ]; |
|
155 | 155 | |
156 | 156 | /** |
157 | 157 | * @var array |
158 | 158 | */ |
159 | - private $outlets = []; |
|
159 | + private $outlets = [ ]; |
|
160 | 160 | |
161 | 161 | /** |
162 | 162 | * @var bool |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | */ |
545 | 545 | public function addDeliveryOption(Delivery $option) |
546 | 546 | { |
547 | - $this->deliveryOptions[] = $option; |
|
547 | + $this->deliveryOptions[ ] = $option; |
|
548 | 548 | |
549 | 549 | return $this; |
550 | 550 | } |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | */ |
713 | 713 | public function addParam(OfferParam $param) |
714 | 714 | { |
715 | - $this->params[] = $param; |
|
715 | + $this->params[ ] = $param; |
|
716 | 716 | |
717 | 717 | return $this; |
718 | 718 | } |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | */ |
733 | 733 | public function addOutlet(OfferOutlet $outlet) |
734 | 734 | { |
735 | - $this->outlets[] = $outlet; |
|
735 | + $this->outlets[ ] = $outlet; |
|
736 | 736 | |
737 | 737 | return $this; |
738 | 738 | } |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | public function addPicture($url) |
748 | 748 | { |
749 | 749 | if (\count($this->pictures) < 10) { |
750 | - $this->pictures[] = $url; |
|
750 | + $this->pictures[ ] = $url; |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | return $this; |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | * |
795 | 795 | * @return $this |
796 | 796 | */ |
797 | - public function setBarcodes(array $barcodes = []) |
|
797 | + public function setBarcodes(array $barcodes = [ ]) |
|
798 | 798 | { |
799 | 799 | $this->barcodes = $barcodes; |
800 | 800 | |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | */ |
811 | 811 | public function addBarcode($barcode) |
812 | 812 | { |
813 | - $this->barcodes[] = $barcode; |
|
813 | + $this->barcodes[ ] = $barcode; |
|
814 | 814 | |
815 | 815 | return $this; |
816 | 816 | } |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | * |
823 | 823 | * @return $this |
824 | 824 | */ |
825 | - public function setCustomElements(array $customElements = []) |
|
825 | + public function setCustomElements(array $customElements = [ ]) |
|
826 | 826 | { |
827 | 827 | $this->customElements = $customElements; |
828 | 828 | |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | { |
843 | 843 | if ($value !== null) { |
844 | 844 | // Add value to the list of values of the given element type creating array when needed |
845 | - $this->customElements[$elementType][] = $value; |
|
845 | + $this->customElements[ $elementType ][ ] = $value; |
|
846 | 846 | } |
847 | 847 | |
848 | 848 | return $this; |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | */ |
857 | 857 | public function getCustomElements() |
858 | 858 | { |
859 | - return $this->customElements ?: []; |
|
859 | + return $this->customElements ?: [ ]; |
|
860 | 860 | } |
861 | 861 | |
862 | 862 | /** |
@@ -870,11 +870,11 @@ discard block |
||
870 | 870 | public function getCustomElementByType($elementType) |
871 | 871 | { |
872 | 872 | // TODO: Use ?? operator when support for PHP 5.6 is no longer needed |
873 | - if (isset($this->customElements[$elementType])) { |
|
874 | - return $this->customElements[$elementType]; |
|
873 | + if (isset($this->customElements[ $elementType ])) { |
|
874 | + return $this->customElements[ $elementType ]; |
|
875 | 875 | } |
876 | 876 | |
877 | - return []; |
|
877 | + return [ ]; |
|
878 | 878 | } |
879 | 879 | |
880 | 880 | /** |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | 'purchase_price' => $this->getPurchasePrice(), |
935 | 935 | 'currencyId' => $this->getCurrencyId(), |
936 | 936 | 'categoryId' => \array_merge( |
937 | - [$this->getCategoryId()], |
|
937 | + [ $this->getCategoryId() ], |
|
938 | 938 | $this->getCategoriesId() |
939 | 939 | ), |
940 | 940 | 'market_category' => $this->getMarketCategory(), |