@@ -65,17 +65,17 @@ discard block |
||
65 | 65 | ->setAllowedTypes('channels', 'array') |
66 | 66 | ->setNormalizer('channels', LazyOption::findBy($this->channelRepository, 'code')) |
67 | 67 | |
68 | - ->setDefault('logo', function (Options $options): string { |
|
68 | + ->setDefault('logo', function(Options $options): string { |
|
69 | 69 | return __DIR__.'/../../Resources/fixtures/vendor/0'.rand(1, 4).'.png'; |
70 | 70 | }) |
71 | - ->setAllowedTypes('logo', ['string']) |
|
71 | + ->setAllowedTypes('logo', [ 'string' ]) |
|
72 | 72 | ; |
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | 76 | * {@inheritdoc} |
77 | 77 | */ |
78 | - public function create(array $options = []): VendorInterface |
|
78 | + public function create(array $options = [ ]): VendorInterface |
|
79 | 79 | { |
80 | 80 | $options = $this->optionsResolver->resolve($options); |
81 | 81 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $vendor->setSlug($this->faker->slug); |
86 | 86 | $vendor->setEmail($this->faker->companyEmail); |
87 | 87 | |
88 | - foreach ($options['channels'] as $channel) { |
|
88 | + foreach ($options[ 'channels' ] as $channel) { |
|
89 | 89 | $vendor->addChannel($channel); |
90 | 90 | } |
91 | 91 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $vendor->setDescription($this->faker->text); |
98 | 98 | } |
99 | 99 | |
100 | - $vendor->setLogoFile($this->createImage($options['logo'])); |
|
100 | + $vendor->setLogoFile($this->createImage($options[ 'logo' ])); |
|
101 | 101 | |
102 | 102 | return $vendor; |
103 | 103 | } |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | private function createImage(string $imagePath): UploadedFile |
110 | 110 | { |
111 | 111 | $imagePath = $this->fileLocator === null ? $imagePath : $this->fileLocator->locate($imagePath); |
112 | - if(is_array($imagePath) && count($imagePath) > 0) |
|
113 | - $imagePath = $imagePath[0]; |
|
112 | + if (is_array($imagePath) && count($imagePath) > 0) |
|
113 | + $imagePath = $imagePath[ 0 ]; |
|
114 | 114 | |
115 | 115 | return new UploadedFile($imagePath, basename($imagePath)); |
116 | 116 | } |
@@ -109,8 +109,9 @@ |
||
109 | 109 | private function createImage(string $imagePath): UploadedFile |
110 | 110 | { |
111 | 111 | $imagePath = $this->fileLocator === null ? $imagePath : $this->fileLocator->locate($imagePath); |
112 | - if(is_array($imagePath) && count($imagePath) > 0) |
|
113 | - $imagePath = $imagePath[0]; |
|
112 | + if(is_array($imagePath) && count($imagePath) > 0) { |
|
113 | + $imagePath = $imagePath[0]; |
|
114 | + } |
|
114 | 115 | |
115 | 116 | return new UploadedFile($imagePath, basename($imagePath)); |
116 | 117 | } |