Passed
Push — master ( 65d67e...988c58 )
by
unknown
08:37
created
src/Form/Extension/ProductTypeExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
      */
28 28
     public static function getExtendedTypes(): iterable
29 29
     {
30
-        return [ProductType::class];
30
+        return [ ProductType::class ];
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Form/Type/VendorChoiceType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
spec/Entity/VendorSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
spec/Entity/VendorTranslationSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Mapping/VendorAwareListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,14 +132,14 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Menu/AdminMenuListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
         ;
Please login to merge, or discard this patch.
src/Menu/VendorFormMenuBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
         $this->eventDispatcher = $eventDispatcher;
25 25
     }
26 26
 
27
-    public function createMenu(array $options = []): ItemInterface
27
+    public function createMenu(array $options = [ ]): ItemInterface
28 28
     {
29 29
         $menu = $this->factory->createItem('root');
30 30
 
31
-        if (!array_key_exists('vendor', $options) || !$options['vendor'] instanceof VendorInterface) {
31
+        if (!array_key_exists('vendor', $options) || !$options[ 'vendor' ] instanceof VendorInterface) {
32 32
             return $menu;
33 33
         }
34 34
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         ;
53 53
 
54 54
         $this->eventDispatcher->dispatch(
55
-            new VendorFormMenuBuilderEvent($this->factory, $menu, $options['vendor'])
55
+            new VendorFormMenuBuilderEvent($this->factory, $menu, $options[ 'vendor' ])
56 56
         );
57 57
 
58 58
         return $menu;
Please login to merge, or discard this patch.
bin/create_node_symlink.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 const NODE_MODULES_FOLDER_NAME = 'node_modules';
4
-const PATH_TO_NODE_MODULES = 'tests' . DIRECTORY_SEPARATOR . 'Application' . DIRECTORY_SEPARATOR . 'node_modules';
4
+const PATH_TO_NODE_MODULES = 'tests'.DIRECTORY_SEPARATOR.'Application'.DIRECTORY_SEPARATOR.'node_modules';
5 5
 
6 6
 /* cannot use `file_exists` or `stat` as gives false on symlinks if target path does not exist yet */
7 7
 if (@lstat(NODE_MODULES_FOLDER_NAME))
8 8
 {
9 9
     if (is_link(NODE_MODULES_FOLDER_NAME) || is_dir(NODE_MODULES_FOLDER_NAME)) {
10
-        echo '> `' . NODE_MODULES_FOLDER_NAME . '` already exists as a link or folder, keeping existing as may be intentional.' . PHP_EOL;
10
+        echo '> `'.NODE_MODULES_FOLDER_NAME.'` already exists as a link or folder, keeping existing as may be intentional.'.PHP_EOL;
11 11
         exit(0);
12 12
     } else {
13
-        echo '> Invalid symlink `' . NODE_MODULES_FOLDER_NAME . '` detected, recreating...' . PHP_EOL;
13
+        echo '> Invalid symlink `'.NODE_MODULES_FOLDER_NAME.'` detected, recreating...'.PHP_EOL;
14 14
         if (!@unlink(NODE_MODULES_FOLDER_NAME)) {
15
-            echo '> Could not delete file `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL;
15
+            echo '> Could not delete file `'.NODE_MODULES_FOLDER_NAME.'`.'.PHP_EOL;
16 16
             exit(1);
17 17
         }
18 18
     }
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 /* if case it has failed, but OS is Windows... */
25 25
 if (!$success && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
26 26
     /* ...then try a different approach which does not require elevated permissions and folder to exist */
27
-    echo '> This system is running Windows, creation of links requires elevated privileges,' . PHP_EOL;
28
-    echo '> and target path to exist. Fallback to NTFS Junction:' . PHP_EOL;
27
+    echo '> This system is running Windows, creation of links requires elevated privileges,'.PHP_EOL;
28
+    echo '> and target path to exist. Fallback to NTFS Junction:'.PHP_EOL;
29 29
     exec(sprintf('mklink /J %s %s 2> NUL', NODE_MODULES_FOLDER_NAME, PATH_TO_NODE_MODULES), $output, $returnCode);
30 30
     $success = $returnCode === 0;
31 31
     if (!$success) {
32
-	echo '> Failed o create the required symlink' . PHP_EOL;
32
+	echo '> Failed o create the required symlink'.PHP_EOL;
33 33
         exit(2);
34 34
     }
35 35
 }
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 $path = @readlink(NODE_MODULES_FOLDER_NAME);
38 38
 /* check if link points to the intended directory */
39 39
 if ($path && realpath($path) === realpath(PATH_TO_NODE_MODULES)) {
40
-    echo '> Successfully created the symlink.' . PHP_EOL;
40
+    echo '> Successfully created the symlink.'.PHP_EOL;
41 41
     exit(0);
42 42
 }
43 43
 
44
-echo '> Failed to create the symlink to `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL;
44
+echo '> Failed to create the symlink to `'.NODE_MODULES_FOLDER_NAME.'`.'.PHP_EOL;
45 45
 exit(3);
Please login to merge, or discard this patch.
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.