@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | private function send(int $httpcode, string $message) |
| 112 | 112 | { |
| 113 | 113 | $error_actions = midcom::get()->config->get_array('error_actions'); |
| 114 | - if ( !isset($error_actions[$httpcode]) |
|
| 114 | + if (!isset($error_actions[$httpcode]) |
|
| 115 | 115 | || !isset($error_actions[$httpcode]['action'])) { |
| 116 | 116 | // No action specified for this error code, skip |
| 117 | 117 | return; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | return; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - if ( !is_writable($config['filename']) |
|
| 144 | + if (!is_writable($config['filename']) |
|
| 145 | 145 | && !is_writable(dirname($config['filename']))) { |
| 146 | 146 | debug_add("Error logging file {$config['filename']} is not writable", MIDCOM_LOG_WARN); |
| 147 | 147 | return; |
@@ -221,7 +221,7 @@ |
||
| 221 | 221 | return true; |
| 222 | 222 | } |
| 223 | 223 | if ($user === null) { |
| 224 | - $user =& $this->user; |
|
| 224 | + $user = & $this->user; |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | if ($user == 'EVERYONE') { |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | $label_prop = $this->get_label_property(); |
| 328 | 328 | |
| 329 | - if ( $label_prop != 'guid' |
|
| 329 | + if ($label_prop != 'guid' |
|
| 330 | 330 | && $this->_mgd_reflector->property_exists($label_prop)) { |
| 331 | 331 | $search_properties[$label_prop] = true; |
| 332 | 332 | } |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | continue; |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | - if ( !$ref->is_link($property) |
|
| 383 | + if (!$ref->is_link($property) |
|
| 384 | 384 | && $ref->get_midgard_type($property) != MGD_TYPE_GUID) { |
| 385 | 385 | continue; |
| 386 | 386 | } |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | protected static function class_rewrite(string $schema_type) : string |
| 416 | 416 | { |
| 417 | 417 | $extends = midcom_baseclasses_components_configuration::get('midcom.helper.reflector', 'config')->get_array('class_extends'); |
| 418 | - if ( isset($extends[$schema_type]) |
|
| 418 | + if (isset($extends[$schema_type]) |
|
| 419 | 419 | && class_exists($extends[$schema_type])) { |
| 420 | 420 | return $extends[$schema_type]; |
| 421 | 421 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | // Configured properties |
| 486 | 486 | foreach ($this->_config->get_array($type . '_exceptions') as $class => $property) { |
| 487 | 487 | if (midcom::get()->dbfactory->is_a($object, $class)) { |
| 488 | - if ( $property !== false |
|
| 488 | + if ($property !== false |
|
| 489 | 489 | && !$this->_mgd_reflector->property_exists($property)) { |
| 490 | 490 | debug_add("Matched class '{$key}' to '{$class}' via is_a but property '{$property}' does not exist", MIDCOM_LOG_ERROR); |
| 491 | 491 | } else { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | public function __set($name, $value) |
| 61 | 61 | { |
| 62 | - if ( $name == 'homepage' |
|
| 62 | + if ($name == 'homepage' |
|
| 63 | 63 | && !empty($value) |
| 64 | 64 | && $value != $this->homepage) { |
| 65 | 65 | $this->_register_prober = true; |