Completed
Pull Request — dev (#9)
by Arnaud
16:32 queued 13:45
created
Action/Configuration/ActionConfiguration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         $resolver
83 83
             ->setDefault('route', '')
84 84
             ->setAllowedTypes('route', 'string')
85
-            ->setNormalizer('route', function (Options $options, $value) {
85
+            ->setNormalizer('route', function(Options $options, $value) {
86 86
                 if (!$value) {
87 87
                     // if no route was provided, it should be linked to an Admin
88 88
                     if (!$this->admin) {
89
-                        throw new InvalidOptionsException('No route was provided for action : ' . $this->actionName);
89
+                        throw new InvalidOptionsException('No route was provided for action : '.$this->actionName);
90 90
                     }
91 91
 
92 92
                     // generate default route from admin
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_NONE)
115 115
             ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_UNIQUE)
116 116
             ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_MULTIPLE)
117
-            ->setNormalizer('load_strategy', function (Options $options, $value) {
117
+            ->setNormalizer('load_strategy', function(Options $options, $value) {
118 118
 
119 119
                 if (!$value) {
120 120
                     if ($this->actionName == 'create') {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         // criteria used to find entity in the data provider
140 140
         $resolver
141 141
             ->setDefault('criteria', [])
142
-            ->setNormalizer('criteria', function (Options $options, $value) {
142
+            ->setNormalizer('criteria', function(Options $options, $value) {
143 143
 
144 144
                 if (!$value) {
145 145
                     $idActions = [
Please login to merge, or discard this patch.
Application/Configuration/ApplicationConfiguration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             'name_pattern' => 'lag.admin.{admin}',
70 70
         ]);
71 71
         $resolver->setAllowedTypes('routing', 'array');
72
-        $resolver->setNormalizer('routing', function (Options $options, $value) {
72
+        $resolver->setNormalizer('routing', function(Options $options, $value) {
73 73
 
74 74
             // url pattern should contain {admin} and {action} token
75 75
             $urlPattern = $value['url_pattern'];
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             'pattern' => 'lag.admin.{key}'
98 98
         ]);
99 99
         $resolver->setAllowedTypes('translation', 'array');
100
-        $resolver->setNormalizer('translation', function (Options $options, $value) {
100
+        $resolver->setNormalizer('translation', function(Options $options, $value) {
101 101
 
102 102
             if (!is_bool($value['enabled'])) {
103 103
                 throw new InvalidOptionsException('Admin translation enabled parameter should be a boolean');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         $resolver->setDefault('fields_mapping', $defaultMapping);
130 130
         $resolver->setAllowedTypes('fields_mapping', 'array');
131
-        $resolver->setNormalizer('fields_mapping', function (Options $options, $value) use ($defaultMapping) {
131
+        $resolver->setNormalizer('fields_mapping', function(Options $options, $value) use ($defaultMapping) {
132 132
             // merge with default mapping to allow override
133 133
             $value = array_merge($defaultMapping, $value);
134 134
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $resolver->setDefault('fields_template_mapping', $defaultMapping);
144 144
         $resolver->setAllowedTypes('fields_template_mapping', 'array');
145
-        $resolver->setNormalizer('fields_template_mapping', function (Options $options, $value) use ($defaultMapping) {
145
+        $resolver->setNormalizer('fields_template_mapping', function(Options $options, $value) use ($defaultMapping) {
146 146
             // merge with default mapping to allow override
147 147
             $value = array_merge($defaultMapping, $value);
148 148
 
Please login to merge, or discard this patch.