Passed
Push — master ( 376b05...f10ba2 )
by
unknown
06:55
created
src/SitemapProvider/VendorUrlProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function generate(): iterable
65 65
     {
66
-        $urls = [];
66
+        $urls = [ ];
67 67
 
68 68
         foreach ($this->getVendors() as $vendor) {
69
-            $urls[] = $this->createVendorUrl($vendor);
69
+            $urls[ ] = $this->createVendorUrl($vendor);
70 70
         }
71 71
 
72 72
         return $urls;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     private function getTranslations(VendorInterface $vendor): Collection
82 82
     {
83
-        return $vendor->getTranslations()->filter(function (TranslationInterface $translation): bool {
83
+        return $vendor->getTranslations()->filter(function(TranslationInterface $translation): bool {
84 84
             return $this->localeInLocaleCodes($translation);
85 85
         });
86 86
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         /** @var ChannelInterface $channel */
114 114
         $channel = $this->channelContext->getChannel();
115 115
 
116
-        return $channel->getLocales()->map(function (LocaleInterface $locale): ?string {
116
+        return $channel->getLocales()->map(function(LocaleInterface $locale): ?string {
117 117
             return $locale->getCode();
118 118
         })->toArray();
119 119
     }
Please login to merge, or discard this patch.
src/Fixture/Factory/VendorExampleFactory.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -69,33 +69,33 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * {@inheritdoc}
71 71
      */
72
-    public function create(array $options = []): VendorInterface
72
+    public function create(array $options = [ ]): VendorInterface
73 73
     {
74 74
         $options = $this->optionsResolver->resolve($options);
75 75
 
76 76
         /** @var VendorInterface $vendor */
77 77
         $vendor = $this->vendorFactory->createNew();
78
-        $vendor->setName($options['name']);
79
-        $vendor->setEmail($options['email']);
78
+        $vendor->setName($options[ 'name' ]);
79
+        $vendor->setEmail($options[ 'email' ]);
80 80
 
81 81
         /** @var string $localeCode */
82 82
         foreach ($this->getLocales() as $localeCode) {
83 83
             $vendor->setCurrentLocale($localeCode);
84 84
             $vendor->setFallbackLocale($localeCode);
85 85
 
86
-            $vendor->setDescription($options['description']);
87
-            $vendor->setSlug($options['slug']);
86
+            $vendor->setDescription($options[ 'description' ]);
87
+            $vendor->setSlug($options[ 'slug' ]);
88 88
         }
89 89
 
90
-        foreach ($options['channels'] as $channel) {
90
+        foreach ($options[ 'channels' ] as $channel) {
91 91
             $vendor->addChannel($channel);
92 92
         }
93 93
 
94
-        foreach ($options['products'] as $product) {
94
+        foreach ($options[ 'products' ] as $product) {
95 95
             $vendor->addProduct($product);
96 96
         }
97 97
 
98
-        $vendor->setLogoFile($this->createImage($options['logo']));
98
+        $vendor->setLogoFile($this->createImage($options[ 'logo' ]));
99 99
 
100 100
         $this->vendorLogoUploader->upload($vendor);
101 101
 
@@ -136,27 +136,27 @@  discard block
 block discarded – undo
136 136
             ->setNormalizer('products', LazyOption::findBy($this->productRepository, 'code'))
137 137
             ->setRequired('name')
138 138
             ->setAllowedTypes('name', 'string')
139
-            ->setDefault('name', function (Options $options): string {
139
+            ->setDefault('name', function(Options $options): string {
140 140
                 return $this->faker->company;
141 141
             })
142 142
             ->setRequired('slug')
143 143
             ->setAllowedTypes('slug', 'string')
144
-            ->setDefault('slug', function (Options $options): string {
145
-                return StringInflector::nameToCode((string) $options['name']);
144
+            ->setDefault('slug', function(Options $options): string {
145
+                return StringInflector::nameToCode((string) $options[ 'name' ]);
146 146
             })
147 147
             ->setRequired('email')
148 148
             ->setAllowedTypes('email', 'string')
149
-            ->setDefault('email', function (Options $options): string {
149
+            ->setDefault('email', function(Options $options): string {
150 150
                 return $this->faker->companyEmail;
151 151
             })
152 152
             ->setRequired('logo')
153 153
             ->setAllowedTypes('logo', 'string')
154
-            ->setDefault('logo', function (Options $options): string {
154
+            ->setDefault('logo', function(Options $options): string {
155 155
                 return __DIR__.'/../../Resources/fixtures/vendor/images/0'.rand(1, 3).'.png';
156 156
             })
157 157
             ->setRequired('description')
158 158
             ->setAllowedTypes('description', 'string')
159
-            ->setDefault('description', function (Options $options): string {
159
+            ->setDefault('description', function(Options $options): string {
160 160
                 return $this->faker->text;
161 161
             })
162 162
         ;
Please login to merge, or discard this patch.