@@ -23,7 +23,7 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | $menu |
| 26 | - ->addChild('vendors', ['route' => 'odiseo_sylius_vendor_plugin_admin_vendor_index']) |
|
| 26 | + ->addChild('vendors', [ 'route' => 'odiseo_sylius_vendor_plugin_admin_vendor_index' ]) |
|
| 27 | 27 | ->setLabel('odiseo_sylius_banner_plugin.ui.vendors') |
| 28 | 28 | ->setLabelAttribute('icon', 'trademark') |
| 29 | 29 | ; |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public static function getExtendedTypes(): iterable |
| 29 | 29 | { |
| 30 | - return [ProductType::class]; |
|
| 30 | + return [ ProductType::class ]; |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | 'label' => 'odiseo_sylius_vendor_plugin.form.vendor.email', |
| 41 | 41 | ]) |
| 42 | 42 | ->add('logoFile', FileType::class, [ |
| 43 | - 'label' => 'odiseo_sylius_vendor_plugin.form.vendor.logo', |
|
| 43 | + 'label' => 'odiseo_sylius_vendor_plugin.form.vendor.logo', |
|
| 44 | 44 | ]) |
| 45 | 45 | ->add('channels', ChannelChoiceType::class, [ |
| 46 | 46 | 'required' => false, |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function buildForm(FormBuilderInterface $builder, array $options): void |
| 30 | 30 | { |
| 31 | - if ($options['multiple']) { |
|
| 31 | + if ($options[ 'multiple' ]) { |
|
| 32 | 32 | $builder->addModelTransformer(new CollectionToArrayTransformer()); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -38,17 +38,17 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function configureOptions(OptionsResolver $resolver): void |
| 40 | 40 | { |
| 41 | - $criteria = []; |
|
| 42 | - $orderBy = ['name' => 'ASC']; |
|
| 41 | + $criteria = [ ]; |
|
| 42 | + $orderBy = [ 'name' => 'ASC' ]; |
|
| 43 | 43 | |
| 44 | 44 | $resolver->setDefaults([ |
| 45 | - 'choices' => function (Options $options) use ($criteria, $orderBy): array { |
|
| 45 | + 'choices' => function(Options $options) use ($criteria, $orderBy): array { |
|
| 46 | 46 | $vendors = $this->vendorRepository->findBy($criteria, $orderBy); |
| 47 | 47 | |
| 48 | - $choices = []; |
|
| 48 | + $choices = [ ]; |
|
| 49 | 49 | /** @var VendorInterface $vendor */ |
| 50 | 50 | foreach ($vendors as $vendor) { |
| 51 | - $choices[$vendor->getName()] = $vendor; |
|
| 51 | + $choices[ $vendor->getName() ] = $vendor; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | return $choices; |
@@ -63,10 +63,10 @@ discard block |
||
| 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; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | private function getTranslations(VendorInterface $vendor): Collection |
| 80 | 80 | { |
| 81 | - return $vendor->getTranslations()->filter(function (TranslationInterface $translation) { |
|
| 81 | + return $vendor->getTranslations()->filter(function(TranslationInterface $translation) { |
|
| 82 | 82 | return $this->localeInLocaleCodes($translation); |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | /** @var ChannelInterface $channel */ |
| 112 | 112 | $channel = $this->channelContext->getChannel(); |
| 113 | 113 | |
| 114 | - return $channel->getLocales()->map(function (LocaleInterface $locale) { |
|
| 114 | + return $channel->getLocales()->map(function(LocaleInterface $locale) { |
|
| 115 | 115 | return $locale->getCode(); |
| 116 | 116 | })->toArray(); |
| 117 | 117 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function load(array $config, ContainerBuilder $container): void |
| 18 | 18 | { |
| 19 | - $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
|
| 19 | + $config = $this->processConfiguration($this->getConfiguration([ ], $container), $config); |
|
| 20 | 20 | |
| 21 | 21 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
| 22 | 22 | |