@@ -113,7 +113,7 @@ |
||
113 | 113 | { |
114 | 114 | if ($this->invoiceable) { |
115 | 115 | $task = new org_openpsa_projects_task_dba($this->task); |
116 | - $time_slot = (float)$task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
116 | + $time_slot = (float) $task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
117 | 117 | if (empty($time_slot)) { |
118 | 118 | $time_slot = (float) midcom_baseclasses_components_configuration::get('org.openpsa.expenses', 'config')->get('default_minimum_time_slot'); |
119 | 119 | if (empty($time_slot)) { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function configureOptions(OptionsResolver $resolver) |
34 | 34 | { |
35 | 35 | $resolver->setDefault('error_bubbling', false); |
36 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) { |
|
36 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) { |
|
37 | 37 | $widget_defaults = [ |
38 | 38 | 'creation_mode_enabled' => false, |
39 | 39 | 'class' => null, |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | return helper::normalize($widget_defaults, $value); |
68 | 68 | }); |
69 | - $resolver->setNormalizer('type_config', function (Options $options, $value) { |
|
69 | + $resolver->setNormalizer('type_config', function(Options $options, $value) { |
|
70 | 70 | $type_defaults = [ |
71 | 71 | 'options' => [], |
72 | 72 | 'method' => 'GET', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function finishView(FormView $view, FormInterface $form, array $options) |
109 | 109 | { |
110 | 110 | $preset = []; |
111 | - if ( !empty($view->children['selection']->vars['data']) |
|
111 | + if (!empty($view->children['selection']->vars['data']) |
|
112 | 112 | && !empty($options['widget_config']['class'])) { |
113 | 113 | foreach (array_filter((array) $view->children['selection']->vars['data']) as $identifier) { |
114 | 114 | if ($options['widget_config']['id_field'] == 'id') { |
@@ -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; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | midcom::get()->metadata->set_request_metadata($this->_topic->metadata->revised, $this->_topic->guid); |
25 | 25 | $data['node'] = $this->_topic; |
26 | 26 | |
27 | - if ( $this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id |
|
27 | + if ($this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id |
|
28 | 28 | && !midcom::get()->config->get('midcom_root_component')) { |
29 | 29 | // if we have an ad hoc root topic, give user some options to do the initial setup |
30 | 30 | return new midcom_response_relocate($this->router->generate('wizard')); |
@@ -192,7 +192,7 @@ |
||
192 | 192 | return false; |
193 | 193 | } |
194 | 194 | |
195 | - if ( !empty($this->_old_username) |
|
195 | + if (!empty($this->_old_username) |
|
196 | 196 | && $this->_old_username !== $new_username) { |
197 | 197 | $history = @unserialize($this->_person->get_parameter('midcom', 'username_history')) ?: []; |
198 | 198 | $history[time()] = ['old' => $this->_old_username, 'new' => $new_username]; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | - if ( !$request->request->has('midcom_services_auth_frontend_form_submit') |
|
49 | + if (!$request->request->has('midcom_services_auth_frontend_form_submit') |
|
50 | 50 | || !$request->request->has('username') |
51 | 51 | || !$request->request->has('password')) { |
52 | 52 | return null; |