Completed
Pull Request — master (#7)
by Yann
06:37 queued 04:20
created
DependencyInjection/EnumExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function load(array $config, ContainerBuilder $container)
19 19
     {
20
-        $xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
20
+        $xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
21 21
         $xmlLoader->load('services.xml');
22 22
         $xmlLoader->load('form_types.xml');
23 23
         $xmlLoader->load('validators.xml');
Please login to merge, or discard this patch.
Enum/AbstractTranslatedEnum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         return array_combine(
48 48
             $this->getValues(),
49 49
             array_map(
50
-                function ($value) {
50
+                function($value) {
51 51
                     return $this->translator->trans(
52 52
                         sprintf($this->transPattern, $value),
53 53
                         [],
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
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
             ->setRequired('enum')
35 35
             ->setAllowedValues(
36 36
                 'enum',
37
-                function ($name) {
37
+                function($name) {
38 38
                     return $this->enumRegistry->has($name);
39 39
                 }
40 40
             )
41 41
             ->setDefault(
42 42
                 'choices',
43
-                function (Options $options) {
43
+                function(Options $options) {
44 44
                     return $this->enumRegistry->get($options['enum'])->getChoices();
45 45
                 }
46 46
             )
Please login to merge, or discard this patch.
Twig/Extension/EnumExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function getFunctions()
30 30
     {
31 31
         return [
32
-            new \Twig_SimpleFunction('enum_label', [ $this, 'getLabel' ]),
32
+            new \Twig_SimpleFunction('enum_label', [$this, 'getLabel']),
33 33
         ];
34 34
     }
35 35
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function getFilters()
40 40
     {
41 41
         return [
42
-            new \Twig_SimpleFilter('enum_label', [ $this, 'getLabel' ]),
42
+            new \Twig_SimpleFilter('enum_label', [$this, 'getLabel']),
43 43
         ];
44 44
     }
45 45
 
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
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             throw new \RuntimeException('You need the symfony/finder component to register enums.');
61 61
         }
62 62
 
63
-        $enumDir = $this->bundleDir . '/Enum';
63
+        $enumDir = $this->bundleDir.'/Enum';
64 64
 
65 65
         if (!is_dir($enumDir)) {
66 66
             return;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 
72 72
         foreach ($finder as $file) {
73 73
             /** @var SplFileInfo $file */
74
-            $enumNamespace = $this->bundleNamespace . '\\Enum';
74
+            $enumNamespace = $this->bundleNamespace.'\\Enum';
75 75
             if ($relativePath = $file->getRelativePath()) {
76
-                $enumNamespace .= '\\' . strtr($relativePath, '/', '\\');
76
+                $enumNamespace .= '\\'.strtr($relativePath, '/', '\\');
77 77
             }
78 78
 
79
-            $enumClass = $enumNamespace . '\\' . $file->getBasename('.php');
79
+            $enumClass = $enumNamespace.'\\'.$file->getBasename('.php');
80 80
             $enumReflection = new \ReflectionClass($enumClass);
81 81
 
82 82
             if (!$enumReflection->isSubclassOf(EnumInterface::class) || $enumReflection->isAbstract()) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 explode(
158 158
                     '\\',
159 159
                     str_replace(
160
-                        $this->bundleNamespace . '\\',
160
+                        $this->bundleNamespace.'\\',
161 161
                         '',
162 162
                         $enumClass
163 163
                     )
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $enum = array_pop($parts);
169 169
 
170
-        return implode('_', $parts) . '.' . $enum . '.label_%s';
170
+        return implode('_', $parts).'.'.$enum.'.label_%s';
171 171
     }
172 172
 
173 173
     /**
Please login to merge, or discard this patch.