Completed
Pull Request — master (#73)
by Eric
84:43 queued 78:40
created
src/Component/Grid/Column/Type/AbstractType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public function configureOptions(OptionsResolver $resolver)
40 40
     {
41 41
         $resolver
42
-            ->setDefault('path', function (Options $options, $path) {
42
+            ->setDefault('path', function(Options $options, $path) {
43 43
                 return $path ?: $options['column']->getName();
44 44
             })
45 45
             ->setAllowedTypes('path', 'string');
Please login to merge, or discard this patch.
src/Component/Grid/Column/Type/ResourceType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,11 +88,11 @@
 block discarded – undo
88 88
             ->setRequired(['resource', 'type'])
89 89
             ->setDefaults([
90 90
                 'options'       => [],
91
-                'resource_path' => function (Options $options, $resourcePath) {
91
+                'resource_path' => function(Options $options, $resourcePath) {
92 92
                     return $resourcePath === null ? $options['resource']->getLabelPropertyPath() : $resourcePath;
93 93
                 },
94 94
             ])
95
-            ->setNormalizer('resource', function (Options $options, $resource) {
95
+            ->setNormalizer('resource', function(Options $options, $resource) {
96 96
                 return is_string($resource) ? $this->resourceRegistry[$resource] : $resource;
97 97
             })
98 98
             ->setAllowedTypes('resource', ['string', ResourceInterface::class])
Please login to merge, or discard this patch.
src/Component/Grid/Filter/Type/AbstractType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             ->setDefaults([
66 66
                 'builder_condition' => self::CONDITION_AND,
67 67
                 'fields_condition'  => self::CONDITION_OR,
68
-                'fields'            => function (Options $options, $fields) {
68
+                'fields'            => function(Options $options, $fields) {
69 69
                     return $fields ?: [$options['filter']->getName()];
70 70
                 },
71 71
             ])
Please login to merge, or discard this patch.
src/Component/Grid/Sort/Type/AbstractType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function configureOptions(OptionsResolver $resolver)
26 26
     {
27 27
         $resolver
28
-            ->setDefault('field', function (Options $options, $field) {
28
+            ->setDefault('field', function(Options $options, $field) {
29 29
                 return $field ?: $options['sort']->getName();
30 30
             })
31 31
             ->setAllowedTypes('field', 'string');
Please login to merge, or discard this patch.
src/Component/Grid/Sort/Type/ResourceType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $resolver
71 71
             ->setRequired('resource')
72 72
             ->setAllowedTypes('resource', ['string', ResourceInterface::class])
73
-            ->setNormalizer('resource', function (Options $options, $resource) {
73
+            ->setNormalizer('resource', function(Options $options, $resource) {
74 74
                 return is_string($resource) ? $this->resourceRegistry[$resource] : $resource;
75 75
             });
76 76
     }
Please login to merge, or discard this patch.
src/Component/Grid/Tests/Column/Type/ResourceTypeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             ->method('render')
84 84
             ->with(
85 85
                 $this->identicalTo($grid = $this->createGridViewMock()),
86
-                $this->callback(function (ColumnInterface $column) use ($resourcePath, $type, $options) {
86
+                $this->callback(function(ColumnInterface $column) use ($resourcePath, $type, $options) {
87 87
                     return $column->getName() === $resourcePath
88 88
                         && $column->getLabel() === null
89 89
                         && $column->getType() === $type
Please login to merge, or discard this patch.
src/Component/Grid/Tests/Sort/SorterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
         $sortType
101 101
             ->expects($this->once())
102 102
             ->method('configureOptions')
103
-            ->with($this->callback(function (OptionsResolver $resolver) use ($options) {
103
+            ->with($this->callback(function(OptionsResolver $resolver) use ($options) {
104 104
                 $resolver->setDefined(array_merge(['builder', 'sort', 'grid'], array_keys($options)));
105 105
 
106 106
                 return true;
Please login to merge, or discard this patch.
src/Component/Resource/Form/Type/ResourceType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,16 +34,16 @@
 block discarded – undo
34 34
             ->setAllowedTypes('resource', ResourceInterface::class)
35 35
             ->setAllowedTypes('factory', FactoryInterface::class)
36 36
             ->setDefaults([
37
-                'data_class' => function (Options $options) {
37
+                'data_class' => function(Options $options) {
38 38
                     return $options['resource']->getModel();
39 39
                 },
40
-                'label_prefix' => function (Options $options) {
40
+                'label_prefix' => function(Options $options) {
41 41
                     return 'lug.'.$options['resource']->getName();
42 42
                 },
43
-                'validation_groups' => function (Options $options) {
43
+                'validation_groups' => function(Options $options) {
44 44
                     return [Constraint::DEFAULT_GROUP, 'lug.'.$options['resource']->getName()];
45 45
                 },
46
-                'empty_data' => function (FormInterface $form) {
46
+                'empty_data' => function(FormInterface $form) {
47 47
                     return $form->isRequired() || !$form->isEmpty()
48 48
                         ? $form->getConfig()->getOption('factory')->create()
49 49
                         : null;
Please login to merge, or discard this patch.
src/Component/Resource/Form/Type/Doctrine/ResourceChoiceType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
             ->setRequired('resource')
33 33
             ->setAllowedTypes('resource', ResourceInterface::class)
34 34
             ->setDefaults([
35
-                'class' => function (Options $options) {
35
+                'class' => function(Options $options) {
36 36
                     return $options['resource']->getModel();
37 37
                 },
38
-                'choice_value' => function (Options $options) {
38
+                'choice_value' => function(Options $options) {
39 39
                     return $options['resource']->getIdPropertyPath();
40 40
                 },
41
-                'choice_label' => function (Options $options) {
41
+                'choice_label' => function(Options $options) {
42 42
                     return $options['resource']->getLabelPropertyPath();
43 43
                 },
44 44
                 'placeholder' => '',
Please login to merge, or discard this patch.