@@ -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 | } |
@@ -143,15 +143,15 @@ discard block |
||
| 143 | 143 | 'validation' => array() |
| 144 | 144 | )); |
| 145 | 145 | |
| 146 | - $normalize_widget = function (Options $options, $value) { |
|
| 147 | - if ( $value == 'images' |
|
| 146 | + $normalize_widget = function(Options $options, $value) { |
|
| 147 | + if ($value == 'images' |
|
| 148 | 148 | || $value == 'downloads') { |
| 149 | 149 | return 'subform'; |
| 150 | 150 | } |
| 151 | 151 | return $value; |
| 152 | 152 | }; |
| 153 | 153 | |
| 154 | - $normalize_storage = function (Options $options, $value) use ($name) { |
|
| 154 | + $normalize_storage = function(Options $options, $value) use ($name) { |
|
| 155 | 155 | $default = array( |
| 156 | 156 | 'location' => 'parameter', |
| 157 | 157 | 'domain' => 'midcom.helper.datamanager2', |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $rule = array('type' => $rule); |
| 205 | 205 | } elseif (!array_key_exists('type', $rule)) { |
| 206 | 206 | throw new midcom_error("Missing validation rule type for rule {$key} on field {$config['name']}, this is a required option."); |
| 207 | - } elseif ( $rule['type'] == 'compare' |
|
| 207 | + } elseif ($rule['type'] == 'compare' |
|
| 208 | 208 | && !array_key_exists('compare_with', $rule)) { |
| 209 | 209 | throw new midcom_error("Missing compare_with option for compare type rule {$key} on field {$config['name']}, this is a required option."); |
| 210 | 210 | } |