Completed
Push — sensio-insight-fixes ( 787c3e )
by Yann
07:09
created
Twig/Extension/EnumExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     public function getFunctions()
32 32
     {
33 33
         return [
34
-            new Twig_SimpleFunction('enum_label', [ $this, 'getLabel' ]),
35
-            new Twig_SimpleFunction('enum_choices', [ $this, 'getChoices' ]),
34
+            new Twig_SimpleFunction('enum_label', [$this, 'getLabel']),
35
+            new Twig_SimpleFunction('enum_choices', [$this, 'getChoices']),
36 36
         ];
37 37
     }
38 38
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function getFilters()
43 43
     {
44 44
         return [
45
-            new Twig_SimpleFilter('enum_label', [ $this, 'getLabel' ]),
45
+            new Twig_SimpleFilter('enum_label', [$this, 'getLabel']),
46 46
         ];
47 47
     }
48 48
 
Please login to merge, or discard this patch.
Form/Type/EnumType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
             ->setDefault('choices_as_values', true)
37 37
             ->setAllowedValues(
38 38
                 'enum',
39
-                function ($name) {
39
+                function($name) {
40 40
                     return $this->enumRegistry->has($name);
41 41
                 }
42 42
             )
43 43
             ->setDefault(
44 44
                 'choices',
45
-                function (Options $options) {
45
+                function(Options $options) {
46 46
                     return array_flip($this->enumRegistry->get($options['enum'])->getChoices());
47 47
                 }
48 48
             )
Please login to merge, or discard this patch.
DependencyInjection/CompilerPass/DeclarativeEnumCollectorCompilerPass.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             throw new RuntimeException('You need the symfony/finder component to register enums.');
64 64
         }
65 65
 
66
-        $enumDir = $this->bundleDir . '/Enum';
66
+        $enumDir = $this->bundleDir.'/Enum';
67 67
 
68 68
         if (!is_dir($enumDir)) {
69 69
             return;
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 
75 75
         foreach ($finder as $file) {
76 76
             /** @var SplFileInfo $file */
77
-            $enumNamespace = $this->bundleNamespace . '\\Enum';
77
+            $enumNamespace = $this->bundleNamespace.'\\Enum';
78 78
             if ($relativePath = $file->getRelativePath()) {
79
-                $enumNamespace .= '\\' . strtr($relativePath, '/', '\\');
79
+                $enumNamespace .= '\\'.strtr($relativePath, '/', '\\');
80 80
             }
81 81
 
82
-            $enumClass = $enumNamespace . '\\' . $file->getBasename('.php');
82
+            $enumClass = $enumNamespace.'\\'.$file->getBasename('.php');
83 83
             $enumReflection = new ReflectionClass($enumClass);
84 84
 
85 85
             if (!$enumReflection->isSubclassOf(EnumInterface::class) || $enumReflection->isAbstract()) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 explode(
171 171
                     '\\',
172 172
                     str_replace(
173
-                        $this->bundleNamespace . '\\',
173
+                        $this->bundleNamespace.'\\',
174 174
                         '',
175 175
                         $enumClass
176 176
                     )
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
         $enum = array_pop($parts);
182 182
 
183
-        return implode('_', $parts) . '.' . $enum . '.label_%s';
183
+        return implode('_', $parts).'.'.$enum.'.label_%s';
184 184
     }
185 185
 
186 186
     /**
Please login to merge, or discard this patch.
DependencyInjection/EnumExtension.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
 
23 23
         $container->setParameter('enum.register_bundles', $config['register_bundles']);
24 24
 
25
-        $xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
25
+        $xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26 26
         $xmlLoader->load('services.xml');
27 27
         $xmlLoader->load('form_types.xml');
28 28
         $xmlLoader->load('validators.xml');
Please login to merge, or discard this patch.