@@ -87,7 +87,7 @@ |
||
87 | 87 | * Converts the selected options according to the multiple_storagemode setting. |
88 | 88 | * |
89 | 89 | * @return mixed The data converted to the final data storage. |
90 | - */ |
|
90 | + */ |
|
91 | 91 | function convert_multiple_to_storage() |
92 | 92 | { |
93 | 93 | switch ($this->config['type_config']['multiple_storagemode']) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | //workaround for weird mgd API behavior where setting falsy (i.e. deleting) a nonexistent parameter |
46 | 46 | //returns an error |
47 | - if ( !$this->value |
|
47 | + if (!$this->value |
|
48 | 48 | && $this->load() === null) { |
49 | 49 | return true; |
50 | 50 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | switch ($this->config['type_config']['multiple_storagemode']) { |
64 | 64 | case 'serialized': |
65 | 65 | case 'array': |
66 | - if ( !is_array($source) |
|
66 | + if (!is_array($source) |
|
67 | 67 | && empty($source)) { |
68 | 68 | $source = array(); |
69 | 69 | } |
@@ -144,15 +144,15 @@ discard block |
||
144 | 144 | 'validation' => array() |
145 | 145 | )); |
146 | 146 | |
147 | - $normalize_widget = function (Options $options, $value) { |
|
148 | - if ( $value == 'images' |
|
147 | + $normalize_widget = function(Options $options, $value) { |
|
148 | + if ($value == 'images' |
|
149 | 149 | || $value == 'downloads') { |
150 | 150 | return 'subform'; |
151 | 151 | } |
152 | 152 | return $value; |
153 | 153 | }; |
154 | 154 | |
155 | - $normalize_storage = function (Options $options, $value) use ($name) { |
|
155 | + $normalize_storage = function(Options $options, $value) use ($name) { |
|
156 | 156 | $default = array( |
157 | 157 | 'location' => 'parameter', |
158 | 158 | 'domain' => 'midcom.helper.datamanager2', |
@@ -185,9 +185,9 @@ discard block |
||
185 | 185 | return $value; |
186 | 186 | }; |
187 | 187 | |
188 | - $normalize_validation = function (Options $options, $config) { |
|
188 | + $normalize_validation = function(Options $options, $config) { |
|
189 | 189 | $validation = array(); |
190 | - if (array_key_exists('validation',(array) $config)) { |
|
190 | + if (array_key_exists('validation', (array) $config)) { |
|
191 | 191 | $validation = (array) $config['validation']; |
192 | 192 | } |
193 | 193 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $rule = array('type' => $rule); |
197 | 197 | } elseif (!array_key_exists('type', $rule)) { |
198 | 198 | throw new midcom_error("Missing validation rule type for rule {$key} on field {$config['name']}, this is a required option."); |
199 | - } elseif ( $rule['type'] == 'compare' |
|
199 | + } elseif ($rule['type'] == 'compare' |
|
200 | 200 | && !array_key_exists('compare_with', $rule)) { |
201 | 201 | throw new midcom_error("Missing compare_with option for compare type rule {$key} on field {$config['name']}, this is a required option."); |
202 | 202 | } |