Passed
Branch master (b3a86f)
by Maxime
10:03 queued 32s
created
Bridge/Symfony/Form/DataTransformer/BitmaskToBitFlagsValueTransformer.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
     /**
52 52
      * Transforms an array of flagged enums to  single flagged enumeration instance.
53 53
      *
54
-     * @param int[] $values bit flags
55 54
      *
56 55
      * @throws TransformationFailedException When the transformation fails
57 56
      *
Please login to merge, or discard this patch.
src/Enum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      */
112 112
     public static function instances(): array
113 113
     {
114
-        return array_map(function ($value) {
114
+        return array_map(function($value) {
115 115
             return static::create($value);
116 116
         }, static::values());
117 117
     }
Please login to merge, or discard this patch.
Symfony/Form/DataTransformer/SingleToCollectionFlagEnumTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             ));
39 39
         }
40 40
 
41
-        return array_map(function ($flag) {
41
+        return array_map(function($flag) {
42 42
             return $this->createEnum($flag);
43 43
         }, $value->getFlags());
44 44
     }
Please login to merge, or discard this patch.
src/Bridge/Symfony/Form/Type/FlaggedEnumType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $resolver
46 46
             ->setDefault('multiple', true)
47
-            ->setAllowedValues('enum_class', function ($value) {
47
+            ->setAllowedValues('enum_class', function($value) {
48 48
                 return is_a($value, FlaggedEnum::class, true);
49 49
             })
50 50
         ;
Please login to merge, or discard this patch.
src/Bridge/Symfony/Form/Type/EnumType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $resolver
28 28
             ->setDefaults([
29
-                'choices' => function (Options $options) {
29
+                'choices' => function(Options $options) {
30 30
                     $enumClass = $options['enum_class'];
31 31
 
32 32
                     if (!$options['as_value']) {
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
 
47 47
                     return $choices;
48 48
                 },
49
-                'choice_label' => function (Options $options) {
49
+                'choice_label' => function(Options $options) {
50 50
                     if ($options['as_value']) {
51 51
                         return null;
52 52
                     }
53 53
 
54 54
                     return $this->isReadable($options['enum_class']) ? 'readable' : 'value';
55 55
                 },
56
-                'choice_value' => function (Options $options) {
56
+                'choice_value' => function(Options $options) {
57 57
                     return $options['as_value'] ? null : 'value';
58 58
                 },
59 59
                 // If true, will accept and return the enum value instead of object:
60 60
                 'as_value' => false,
61 61
             ])
62 62
             ->setRequired('enum_class')
63
-            ->setAllowedValues('enum_class', function ($value) {
63
+            ->setAllowedValues('enum_class', function($value) {
64 64
                 return is_a($value, EnumInterface::class, true);
65 65
             })
66 66
         ;
Please login to merge, or discard this patch.