@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | */ |
271 | 271 | private function add_misc_rule(array $rule, string $class, string $person_property) |
272 | 272 | { |
273 | - $persons = [ 0 => -1]; |
|
273 | + $persons = [0 => -1]; |
|
274 | 274 | $match = $rule['match']; |
275 | 275 | $constraint_match = "IN"; |
276 | 276 | if ($rule['match'] == '<>') { |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $ret = []; |
343 | 343 | |
344 | 344 | foreach ($object->get_properties() as $property) { |
345 | - if ( $property[0] == '_' |
|
345 | + if ($property[0] == '_' |
|
346 | 346 | || in_array($property, $skip_properties)) { |
347 | 347 | // Skip private or otherwise invalid properties |
348 | 348 | continue; |
@@ -110,7 +110,8 @@ discard block |
||
110 | 110 | try { |
111 | 111 | $this->process_classes($rules['classes'], $rules['type']); |
112 | 112 | return true; |
113 | - } catch (midcom_error $e) { |
|
113 | + } |
|
114 | + catch (midcom_error $e) { |
|
114 | 115 | $e->log(); |
115 | 116 | return false; |
116 | 117 | } |
@@ -225,7 +226,8 @@ discard block |
||
225 | 226 | $guid = $mc_parameter->get_subkey($parameter_key, 'parentguid'); |
226 | 227 | try { |
227 | 228 | $parent = midcom::get()->dbfactory->get_object_by_guid($guid); |
228 | - } catch (midcom_error $e) { |
|
229 | + } |
|
230 | + catch (midcom_error $e) { |
|
229 | 231 | $e->log(); |
230 | 232 | continue; |
231 | 233 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $this->_user_id = midcom::get()->auth->acl->get_user_id(); |
103 | 103 | } |
104 | 104 | |
105 | - if ( $this->hide_invisible |
|
105 | + if ($this->hide_invisible |
|
106 | 106 | && !$this->_visibility_checks_added) { |
107 | 107 | if (!midcom::get()->config->get('show_hidden_objects')) { |
108 | 108 | $this->add_constraint('metadata.hidden', '=', false); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | // Deal with empty arrays, which would produce invalid queries |
169 | 169 | // This is done here to avoid repetitive code in callers, and because |
170 | 170 | // it's easy enough to generalize: IN empty set => always false, NOT IN empty set => always true |
171 | - if ( is_array($value) |
|
171 | + if (is_array($value) |
|
172 | 172 | && empty($value)) { |
173 | 173 | if ($operator == 'NOT IN') { |
174 | 174 | return; |