Completed
Branch master (c1061b)
by Andreas
20:29
created
lib/org/openpsa/calendar/event/member.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,8 @@
 block discarded – undo
152 152
                 debug_add('person #' . $person->id . 'has no email address, aborting');
153 153
                 return false;
154 154
             }
155
-        } catch (midcom_error $e) {
155
+        }
156
+        catch (midcom_error $e) {
156 157
             return false;
157 158
         }
158 159
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $event = new org_openpsa_calendar_event_dba($this->eid);
69 69
         }
70 70
 
71
-        if (    $recipient->id == midcom_connection::get_user()
71
+        if ($recipient->id == midcom_connection::get_user()
72 72
              && !$event->send_notify_me) {
73 73
             //Do not send notification to current user
74 74
             debug_add('event->send_notify_me is false and recipient is current user, aborting notify');
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
             if (isset($events_by_date[$ymd])) {
196 196
                 foreach ($events_by_date[$ymd] as $event) {
197
-                    if (   $event->end <= $workday_starts_ts
197
+                    if ($event->end <= $workday_starts_ts
198 198
                         || $event->start >= $workday_ends_ts) {
199 199
                         // We need not consider this event, it is outside the defined workday
200 200
                         continue;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 }
213 213
             }
214 214
             // End of day slot
215
-            if (   $last_end_time < $workday_ends_ts
215
+            if ($last_end_time < $workday_ends_ts
216 216
                 && (($workday_ends_ts - $last_end_time) >= $amount)) {
217 217
                 $slots[] = self::_create_slot($last_end_time, $workday_ends_ts, $last_event);
218 218
             }
Please login to merge, or discard this patch.
lib/midcom/core/query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     protected function _add_visibility_checks()
130 130
     {
131
-        if (   $this->hide_invisible
131
+        if ($this->hide_invisible
132 132
             && !$this->_visibility_checks_added) {
133 133
             if (!midcom::get()->config->get('show_hidden_objects')) {
134 134
                 $this->add_constraint('metadata.hidden', '=', false);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         // Deal with empty arrays, which would produce invalid queries
195 195
         // This is done here to avoid repetitive code in callers, and because
196 196
         // it's easy enough to generalize: IN empty set => always false, NOT IN empty set => always true
197
-        if (   is_array($value)
197
+        if (is_array($value)
198 198
             && empty($value)) {
199 199
             if ($operator == 'NOT IN') {
200 200
                 return true;
Please login to merge, or discard this patch.
lib/midcom/core/querybuilder.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         $this->_add_visibility_checks();
107 107
 
108
-        if (   empty($this->_limit)
108
+        if (empty($this->_limit)
109 109
             && empty($this->_offset)) {
110 110
             // No point to do windowing
111 111
             $newresult = $this->_execute_and_check_privileges();
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         }
151 151
         $this->_query->set_limit($window_size);
152 152
 
153
-        while (    ($resultset = $this->_execute_and_check_privileges())
153
+        while (($resultset = $this->_execute_and_check_privileges())
154 154
                 || $this->denied > $denied) {
155 155
             $size = count($resultset);
156 156
             $total_size = $size + ($this->denied - $denied);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,8 @@
 block discarded – undo
57 57
             $classname = $this->_real_class;
58 58
             try {
59 59
                 $result[] = new $classname($object);
60
-            } catch (midcom_error $e) {
60
+            }
61
+            catch (midcom_error $e) {
61 62
                 if ($e->getCode() == MIDCOM_ERRFORBIDDEN) {
62 63
                     $this->denied++;
63 64
                 }
Please login to merge, or discard this patch.
lib/net/nemein/rss/manage.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
     {
26 26
         try {
27 27
             $viewer->register_plugin_namespace('__feeds', ['rss' => ['class' => __CLASS__]]);
28
-        } catch (midcom_error $e) {
28
+        }
29
+        catch (midcom_error $e) {
29 30
             $e->log();
30 31
         }
31 32
     }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/navigation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         // Hide the articles that have the publish time in the future and if
43 43
         // the user is not administrator
44
-        if (   $this->_config->get('enable_scheduled_publishing')
44
+        if ($this->_config->get('enable_scheduled_publishing')
45 45
             && !midcom::get()->auth->admin) {
46 46
             // Show the article only if the publishing time has passed or the viewer
47 47
             // is the author
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
     private function _add_pseudo_leaves(array &$leaves)
85 85
     {
86
-        if (   $this->_config->get('archive_enable')
86
+        if ($this->_config->get('archive_enable')
87 87
             && $this->_config->get('archive_in_navigation')) {
88 88
             $leaves["{$this->_topic->id}_ARCHIVE"] = [
89 89
                 MIDCOM_NAV_URL => "archive/",
90 90
                 MIDCOM_NAV_NAME => $this->_l10n->get('archive'),
91 91
             ];
92 92
         }
93
-        if (   $this->_config->get('rss_enable')
93
+        if ($this->_config->get('rss_enable')
94 94
             && $this->_config->get('feeds_in_navigation')) {
95 95
             $leaves[self::LEAFID_FEEDS] = [
96 96
                 MIDCOM_NAV_URL => "feeds/",
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             ];
99 99
         }
100 100
 
101
-        if (   $this->_config->get('categories_in_navigation')
101
+        if ($this->_config->get('categories_in_navigation')
102 102
             && $this->_config->get('categories') != '') {
103 103
             $categories = explode(',', $this->_config->get('categories'));
104 104
             foreach ($categories as $category) {
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
             }
110 110
         }
111 111
 
112
-        if (   $this->_config->get('archive_years_in_navigation')
112
+        if ($this->_config->get('archive_years_in_navigation')
113 113
             && $this->_config->get('archive_years_enable')) {
114 114
             $qb = midcom_db_article::new_query_builder();
115 115
             $qb->add_constraint('topic', '=', $this->_topic->id);
116 116
 
117 117
             // Hide the articles that have the publish time in the future and if
118 118
             // the user is not administrator
119
-            if (   $this->_config->get('enable_scheduled_publishing')
119
+            if ($this->_config->get('enable_scheduled_publishing')
120 120
                 && !midcom::get()->auth->admin) {
121 121
                 // Show the article only if the publishing time has passed or the viewer
122 122
                 // is the author
Please login to merge, or discard this patch.
lib/net/nehmer/static/viewer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             }
74 74
         }
75 75
 
76
-        if (   $this->_topic->can_do('midgard:update')
76
+        if ($this->_topic->can_do('midgard:update')
77 77
             && $this->_topic->can_do('midcom:component_config')) {
78 78
             $buttons[] = $workflow->get_button('config/', [
79 79
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/stylehelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
                 'midcom' => [
95 95
                     'style-init' => '',
96 96
                     'style-finish' => '',
97
-                 ]
97
+                    ]
98 98
             ],
99 99
             'nodes' => [],
100 100
         ];
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function __construct(array &$data)
24 24
     {
25
-        $this->_data =& $data;
25
+        $this->_data = & $data;
26 26
         midcom::get()->head->enable_jquery_ui(['accordion']);
27 27
     }
28 28
 
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
             return;
34 34
         }
35 35
 
36
-        if (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
37
-            && (   $this->_data['handler_id'] !== 'object_create'
36
+        if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
37
+            && ($this->_data['handler_id'] !== 'object_create'
38 38
                 || $this->_data['current_type'] == 'midgard_element')) {
39 39
             $help_element = $this->_get_help_style_elementnames($this->_data['object']);
40
-        } elseif (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
40
+        } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
41 41
                   && $this->_data['handler_id'] !== 'object_create') {
42 42
             $help_element = $this->_get_help_element();
43 43
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     private function _get_help_element()
51 51
     {
52
-        if (   empty($this->_data['object']->name)
52
+        if (empty($this->_data['object']->name)
53 53
             || empty($this->_data['object']->style)) {
54 54
             // We cannot help with empty elements
55 55
             return;
Please login to merge, or discard this patch.
lib/midcom/core/dbaproxy.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@
 block discarded – undo
62 62
         try {
63 63
             $this->__object = call_user_func([$this->__midcom_class_name__, 'get_cached'], $this->__identifier);
64 64
             return true;
65
-        } catch (midcom_error $e) {
65
+        }
66
+        catch (midcom_error $e) {
66 67
             $e->log();
67 68
         }
68 69
         return false;
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/tree.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -553,7 +553,8 @@
 block discarded – undo
553 553
         $tree = [];
554 554
         try {
555 555
             $children = self::get_child_objects($parent);
556
-        } catch (midcom_error $e) {
556
+        }
557
+        catch (midcom_error $e) {
557 558
             return $tree;
558 559
         }
559 560
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     private static function _check_permissions(bool $deleted) : bool
124 124
     {
125 125
         // PONDER: Check for some generic user privilege instead  ??
126
-        if (   $deleted
126
+        if ($deleted
127 127
             && !midcom_connection::is_admin()
128 128
             && !midcom::get()->auth->is_component_sudo()) {
129 129
             debug_add('Non-admins are not allowed to list deleted objects', MIDCOM_LOG_ERROR);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                     'target' => $ref->get_link_target($field)
208 208
                 ];
209 209
                 $linked_class = $ref->get_link_name($field);
210
-                if (   empty($linked_class)
210
+                if (empty($linked_class)
211 211
                     && $info['type'] === MGD_TYPE_GUID) {
212 212
                     // Guid link without class specification, valid for all classes
213 213
                     if (empty($info['target'])) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             $field_type = $field_data['type'];
258 258
             $field = $field_data['name'];
259 259
 
260
-            if (   !$field_target
260
+            if (!$field_target
261 261
                 || !isset($for_object->$field_target)) {
262 262
                 // Why return false ???
263 263
                 return false;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
             $parent_property = midgard_object_class::get_property_parent($schema_type);
370 370
             $up_property = midgard_object_class::get_property_up($schema_type);
371 371
 
372
-            if (   $this->is_link_to_current_class($parent_property, $schema_type)
372
+            if ($this->is_link_to_current_class($parent_property, $schema_type)
373 373
                 || $this->is_link_to_current_class($up_property, $schema_type)) {
374 374
                 $child_classes[] = $schema_type;
375 375
             }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         $ref = new midgard_reflection_property($prospect_type);
393 393
         $link_class = $ref->get_link_name($property);
394
-        if (   empty($link_class)
394
+        if (empty($link_class)
395 395
             && $ref->get_midgard_type($property) === MGD_TYPE_GUID) {
396 396
             return true;
397 397
         }
Please login to merge, or discard this patch.