@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function configureOptions(OptionsResolver $resolver) |
| 24 | 24 | { |
| 25 | - $map_attr = function (Options $options, $value) { |
|
| 25 | + $map_attr = function(Options $options, $value) { |
|
| 26 | 26 | $value ??= []; |
| 27 | 27 | $value['rows'] = $options['widget_config']['height']; |
| 28 | 28 | $value['cols'] = $options['widget_config']['width']; |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | ]) |
| 88 | 88 | ->setRequired('object') |
| 89 | 89 | ->setAllowedTypes('object', midcom_core_dbaobject::class) |
| 90 | - ->setNormalizer('label', function ($options, $value) { |
|
| 90 | + ->setNormalizer('label', function($options, $value) { |
|
| 91 | 91 | return $value ?? midcom_helper_reflector::get_object_title($options['object']); |
| 92 | 92 | }); |
| 93 | 93 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 29 | 29 | |
| 30 | - if ( !($this->_object instanceof midcom_db_topic) |
|
| 30 | + if (!($this->_object instanceof midcom_db_topic) |
|
| 31 | 31 | && !($this->_object instanceof midcom_db_article)) { |
| 32 | 32 | throw new midcom_error_notfound("Moving only topics and articles is supported."); |
| 33 | 33 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $folder ??= midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC); |
| 68 | 68 | |
| 69 | - if ( $this->_object instanceof midcom_db_topic |
|
| 69 | + if ($this->_object instanceof midcom_db_topic |
|
| 70 | 70 | && $folder->up == $this->_object->id) { |
| 71 | 71 | $tree_disabled = true; |
| 72 | 72 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $selected = ' checked="checked"'; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if ( !($this->_object instanceof midcom_db_topic) |
|
| 82 | + if (!($this->_object instanceof midcom_db_topic) |
|
| 83 | 83 | && $folder->component !== $this->current_folder->component) { |
| 84 | 84 | // Non-topic objects may only be moved under folders of same component |
| 85 | 85 | $class = 'wrong_component'; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $event ??= new org_openpsa_calendar_event_dba($this->eid); |
| 68 | 68 | |
| 69 | - if ( $recipient->id == midcom_connection::get_user() |
|
| 69 | + if ($recipient->id == midcom_connection::get_user() |
|
| 70 | 70 | && !$event->send_notify_me) { |
| 71 | 71 | //Do not send notification to current user |
| 72 | 72 | debug_add('event->send_notify_me is false and recipient is current user, aborting notify'); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | if (isset($events_by_date[$ymd])) { |
| 194 | 194 | foreach ($events_by_date[$ymd] as $event) { |
| 195 | - if ( $event->end <= $workday_starts_ts |
|
| 195 | + if ($event->end <= $workday_starts_ts |
|
| 196 | 196 | || $event->start >= $workday_ends_ts) { |
| 197 | 197 | // We need not consider this event, it is outside the defined workday |
| 198 | 198 | continue; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | // End of day slot |
| 213 | - if ( $last_end_time < $workday_ends_ts |
|
| 213 | + if ($last_end_time < $workday_ends_ts |
|
| 214 | 214 | && (($workday_ends_ts - $last_end_time) >= $amount)) { |
| 215 | 215 | $slots[] = self::_create_slot($last_end_time, $workday_ends_ts, $last_event); |
| 216 | 216 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | return $this->render_link($parts[1], $parts[2]) . $after; |
| 220 | 220 | |
| 221 | 221 | // Macro [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>]) |
| 222 | - case ( preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
| 222 | + case (preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
| 223 | 223 | && method_exists($this, "_run_macro_{$macro_parts[1]}")): |
| 224 | 224 | $method = "_run_macro_{$macro_parts[1]}"; |
| 225 | 225 | return $this->$method($macro_parts[2], $match[0], $after); |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | // No page matched, link to creation |
| 248 | 248 | $folder = $wikipage_match['folder'] ?? $wikipage_match['latest_parent']; |
| 249 | 249 | |
| 250 | - if ( isset($folder[MIDCOM_NAV_OBJECT]) |
|
| 250 | + if (isset($folder[MIDCOM_NAV_OBJECT]) |
|
| 251 | 251 | && $folder[MIDCOM_NAV_OBJECT]->can_do('midgard:create')) { |
| 252 | 252 | $workflow = $this->get_workflow('datamanager'); |
| 253 | 253 | return "<a href=\"{$folder[MIDCOM_NAV_ABSOLUTEURL]}create/?wikiword={$wikipage_match['remaining_path']}\" " . $workflow->render_attributes() . " class=\"wiki_missing\" title=\"" . $this->_l10n->get('click to create') . "\">{$text}</a>"; |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $links[$parts[1]] = $parts[2]; |
| 283 | 283 | } |
| 284 | 284 | // Ignore macros [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>]) |
| 285 | - elseif ( !preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
| 285 | + elseif (!preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
| 286 | 286 | || !method_exists($this, "_run_macro_{$macro_parts[1]}")) { |
| 287 | 287 | // MediaWiki-style link [wikipage] (no text) |
| 288 | 288 | $links[$fulltext] = $fulltext; |