| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | public function getFunctions(): array | 
| 25 | 25 |      { | 
| 26 | 26 | return [ | 
| 27 | -            new TwigFunction('banner_slider_name', [$this, 'getBannerSliderName']) | |
| 27 | +            new TwigFunction('banner_slider_name', [ $this, 'getBannerSliderName' ]) | |
| 28 | 28 | ]; | 
| 29 | 29 | } | 
| 30 | 30 | |
| @@ -16,9 +16,9 @@ | ||
| 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 | -        $container->setParameter('odiseo_sylius_banner_plugin.slider', $config['slider']); | |
| 21 | +        $container->setParameter('odiseo_sylius_banner_plugin.slider', $config[ 'slider' ]); | |
| 22 | 22 | |
| 23 | 23 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | 
| 24 | 24 | |
| @@ -43,11 +43,11 @@ | ||
| 43 | 43 | parent::configureOptions($resolver); | 
| 44 | 44 | |
| 45 | 45 | $resolver->setDefaults([ | 
| 46 | -            'validation_groups' => function (FormInterface $form) { | |
| 46 | +            'validation_groups' => function(FormInterface $form) { | |
| 47 | 47 | $bannerTranslation = $form->getData(); | 
| 48 | 48 | |
| 49 | 49 |                  if (!$bannerTranslation || null === $bannerTranslation->getId()) { | 
| 50 | - return array_merge($this->validationGroups, ['odiseo_image_create']); | |
| 50 | + return array_merge($this->validationGroups, [ 'odiseo_image_create' ]); | |
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | return $this->validationGroups; | 
| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | 25 | $item | 
| 26 | -            ->addChild('banners', ['route' => 'odiseo_sylius_banner_plugin_admin_banner_index']) | |
| 26 | +            ->addChild('banners', [ 'route' => 'odiseo_sylius_banner_plugin_admin_banner_index' ]) | |
| 27 | 27 |              ->setLabel('odiseo_sylius_banner_plugin.menu.admin.banners') | 
| 28 | 28 |              ->setLabelAttribute('icon', 'image') | 
| 29 | 29 | ; | 
| @@ -65,22 +65,22 @@ discard block | ||
| 65 | 65 |              ->setAllowedTypes('channels', 'array') | 
| 66 | 66 |              ->setNormalizer('channels', LazyOption::findBy($this->channelRepository, 'code')) | 
| 67 | 67 | |
| 68 | -            ->setDefault('image', function (Options $options): string { | |
| 68 | +            ->setDefault('image', function(Options $options): string { | |
| 69 | 69 | return __DIR__.'/../../Resources/fixtures/banner/images/0'.rand(1, 4).'.png'; | 
| 70 | 70 | }) | 
| 71 | -            ->setAllowedTypes('image', ['string']) | |
| 71 | +            ->setAllowedTypes('image', [ 'string' ]) | |
| 72 | 72 | |
| 73 | -            ->setDefault('mobile_image', function (Options $options): string { | |
| 73 | +            ->setDefault('mobile_image', function(Options $options): string { | |
| 74 | 74 | return __DIR__.'/../../Resources/fixtures/banner/mobile-images/0'.rand(1, 4).'.png'; | 
| 75 | 75 | }) | 
| 76 | -            ->setAllowedTypes('mobile_image', ['string']) | |
| 76 | +            ->setAllowedTypes('mobile_image', [ 'string' ]) | |
| 77 | 77 | ; | 
| 78 | 78 | } | 
| 79 | 79 | |
| 80 | 80 | /** | 
| 81 | 81 |       * {@inheritdoc} | 
| 82 | 82 | */ | 
| 83 | - public function create(array $options = []): BannerInterface | |
| 83 | + public function create(array $options = [ ]): BannerInterface | |
| 84 | 84 |      { | 
| 85 | 85 | $options = $this->optionsResolver->resolve($options); | 
| 86 | 86 | |
| @@ -88,7 +88,7 @@ discard block | ||
| 88 | 88 | $banner = $this->bannerFactory->createNew(); | 
| 89 | 89 | $banner->setCode($this->faker->slug); | 
| 90 | 90 | |
| 91 | -        foreach ($options['channels'] as $channel) { | |
| 91 | +        foreach ($options[ 'channels' ] as $channel) { | |
| 92 | 92 | $banner->addChannel($channel); | 
| 93 | 93 | } | 
| 94 | 94 | |
| @@ -99,8 +99,8 @@ discard block | ||
| 99 | 99 | |
| 100 | 100 | $banner->setUrl($this->faker->url); | 
| 101 | 101 | |
| 102 | - $banner->setImageFile($this->createImage($options['image'])); | |
| 103 | - $banner->setMobileImageFile($this->createImage($options['mobile_image'])); | |
| 102 | + $banner->setImageFile($this->createImage($options[ 'image' ])); | |
| 103 | + $banner->setMobileImageFile($this->createImage($options[ 'mobile_image' ])); | |
| 104 | 104 | } | 
| 105 | 105 | |
| 106 | 106 | return $banner; |