@@ -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 | } |
@@ -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 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $this->setEmail('[email protected]'); |
| 94 | 94 | $this->getEmail()->shouldReturn('[email protected]'); |
| 95 | 95 | |
| 96 | - $file = new File(__DIR__ . '/VendorSpec.php'); |
|
| 96 | + $file = new File(__DIR__.'/VendorSpec.php'); |
|
| 97 | 97 | $this->setLogoFile($file); |
| 98 | 98 | $this->getLogoFile()->shouldReturn($file); |
| 99 | 99 | |
@@ -49,6 +49,6 @@ |
||
| 49 | 49 | function it_allows_access_via_properties(): void |
| 50 | 50 | { |
| 51 | 51 | $this->setDescription('Vendor description'); |
| 52 | - $this->getDescription()->shouldReturn('Vendor description');; |
|
| 52 | + $this->getDescription()->shouldReturn('Vendor description'); ; |
|
| 53 | 53 | } |
| 54 | 54 | } |
@@ -132,14 +132,14 @@ |
||
| 132 | 132 | 'inversedBy' => $inversedBy, |
| 133 | 133 | 'joinTable' => [ |
| 134 | 134 | 'name' => 'odiseo_vendor_'.$inversedBy, |
| 135 | - 'joinColumns' => [[ |
|
| 135 | + 'joinColumns' => [ [ |
|
| 136 | 136 | 'name' => $joinColumn, |
| 137 | 137 | 'referencedColumnName' => 'id' |
| 138 | - ]], |
|
| 139 | - 'inverseJoinColumns' => [[ |
|
| 138 | + ] ], |
|
| 139 | + 'inverseJoinColumns' => [ [ |
|
| 140 | 140 | 'name' => 'vendor_id', |
| 141 | 141 | 'referencedColumnName' => 'id' |
| 142 | - ]], |
|
| 142 | + ] ], |
|
| 143 | 143 | ] |
| 144 | 144 | ]); |
| 145 | 145 | } |
@@ -61,11 +61,11 @@ |
||
| 61 | 61 | parent::configureOptions($resolver); |
| 62 | 62 | |
| 63 | 63 | $resolver->setDefaults([ |
| 64 | - 'validation_groups' => function (FormInterface $form) { |
|
| 64 | + 'validation_groups' => function(FormInterface $form) { |
|
| 65 | 65 | $vendor = $form->getData(); |
| 66 | 66 | |
| 67 | 67 | if (!$vendor || null === $vendor->getId()) { |
| 68 | - return array_merge($this->validationGroups, ['odiseo_logo_create']); |
|
| 68 | + return array_merge($this->validationGroups, [ 'odiseo_logo_create' ]); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | return $this->validationGroups; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $item = $menu; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - $item->addChild('vendors', ['route' => 'odiseo_sylius_vendor_plugin_admin_vendor_index']) |
|
| 25 | + $item->addChild('vendors', [ 'route' => 'odiseo_sylius_vendor_plugin_admin_vendor_index' ]) |
|
| 26 | 26 | ->setLabel('odiseo_sylius_vendor_plugin.menu.admin.vendors') |
| 27 | 27 | ->setLabelAttribute('icon', 'trademark') |
| 28 | 28 | ; |