@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | return "{$cacheroot}/{$subdir}/{$this->guid}/{$this->name}"; |
156 | 156 | } |
157 | 157 | |
158 | - public static function get_url(midgard_attachment|midcom_db_attachment|string $attachment, string $name = null) : string |
|
158 | + public static function get_url(midgard_attachment | midcom_db_attachment | string $attachment, string $name = null) : string |
|
159 | 159 | { |
160 | 160 | if (is_string($attachment)) { |
161 | 161 | $guid = $attachment; |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | public function update_cache() |
302 | 302 | { |
303 | 303 | // Check if the attachment can be read anonymously |
304 | - if ( midcom::get()->config->get('attachment_cache_enabled') |
|
304 | + if (midcom::get()->config->get('attachment_cache_enabled') |
|
305 | 305 | && !$this->can_do('midgard:read', 'EVERYONE')) { |
306 | 306 | // Not public file, ensure it is removed |
307 | 307 | $this->remove_from_cache(); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | /** |
94 | 94 | * Retrieve an object, uses in-request caching |
95 | 95 | */ |
96 | - public static function get(string|int $src) : self |
|
96 | + public static function get(string | int $src) : self |
|
97 | 97 | { |
98 | 98 | static $cache = []; |
99 | 99 | |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | - if ( $this->_config->get('jabber_enable_presence') |
|
139 | + if ($this->_config->get('jabber_enable_presence') |
|
140 | 140 | && $person->get_parameter('org.openpsa.jabber', 'jid')) { |
141 | 141 | $this->contact_details['jid'] = $person->get_parameter('org.openpsa.jabber', 'jid'); |
142 | 142 | } |
143 | 143 | |
144 | - if ( $this->_config->get('skype_enable_presence') |
|
144 | + if ($this->_config->get('skype_enable_presence') |
|
145 | 145 | && $person->get_parameter('org.openpsa.skype', 'name')) { |
146 | 146 | $this->contact_details['skype'] = $person->get_parameter('org.openpsa.skype', 'name'); |
147 | 147 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | if (!empty($attachments[$type])) { |
179 | 179 | return '<img class="photo" src="' . midcom_db_attachment::get_url($attachments[$type]) . '">'; |
180 | 180 | } |
181 | - if ( $this->_config->get('gravatar_enable') |
|
181 | + if ($this->_config->get('gravatar_enable') |
|
182 | 182 | && !empty($this->contact_details['email'])) { |
183 | 183 | $size = ($type == 'view') ? 500 : 32; |
184 | 184 | $gravatar_url = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->contact_details['email']))) . "?s=" . $size . '&d=identicon'; |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | |
292 | 292 | private function _show_groups() |
293 | 293 | { |
294 | - if ( !$this->show_groups |
|
294 | + if (!$this->show_groups |
|
295 | 295 | || empty($this->contact_details['id'])) { |
296 | 296 | return; |
297 | 297 | } |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | $default_shown = true; |
356 | 356 | $cards_to_show[] = $cardname; |
357 | 357 | } |
358 | - } elseif ( $customer->$property |
|
358 | + } elseif ($customer->$property |
|
359 | 359 | || ($customer->street && !$inherited_cards_only && !$default_shown)) { |
360 | 360 | $inherited_cards_only = false; |
361 | 361 | $multiple_addresses = true; |
@@ -377,8 +377,8 @@ discard block |
||
377 | 377 | |
378 | 378 | foreach ($cards_to_show as $cardname) { |
379 | 379 | echo '<div class="vcard">'; |
380 | - if ( $multiple_addresses |
|
381 | - || ( $cardname != 'visiting' |
|
380 | + if ($multiple_addresses |
|
381 | + || ($cardname != 'visiting' |
|
382 | 382 | && !$inherited_cards_only)) { |
383 | 383 | echo '<div style="text-align:center"><em>' . midcom::get()->i18n->get_string($cardname . ' address', 'org.openpsa.contacts') . "</em></div>\n"; |
384 | 384 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public static function get_by_object(org_openpsa_invoices_interfaces_customer $object) : self |
54 | 54 | { |
55 | - if ( !($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer)) |
|
55 | + if (!($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer)) |
|
56 | 56 | // check if the customerContact is set and has invoice_data |
57 | 57 | && !($bd = self::get_billing_data(org_openpsa_contacts_person_dba::class, $object->customerContact))) { |
58 | 58 | $bd = new self(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Get the billing data for given contact if any. |
70 | 70 | */ |
71 | - private static function get_billing_data(string $dba_class, string|int $contact_id) : ?self |
|
71 | + private static function get_billing_data(string $dba_class, string | int $contact_id) : ?self |
|
72 | 72 | { |
73 | 73 | if ($contact_id == 0) { |
74 | 74 | return null; |