Passed
Push — master ( d46fa5...b07635 )
by Andreas
11:04
created
lib/midcom/db/style.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
                     break;
44 44
                 }
45 45
             }
46
-        } catch (midcom_error) {
46
+        }
47
+        catch (midcom_error) {
47 48
         }
48 49
 
49 50
         $path_parts = array_reverse($path_parts);
Please login to merge, or discard this patch.
lib/midcom/connection.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@
 block discarded – undo
84 84
 
85 85
         try {
86 86
             $user = new midgard_user($login_tokens);
87
-        } catch (mgd_exception) {
87
+        }
88
+        catch (mgd_exception) {
88 89
             return null;
89 90
         }
90 91
         if (!$trusted && !self::verify_password($password, $user->password)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
             if ($part === '') {
202 202
                 continue;
203 203
             }
204
-            if (    midcom::get()->config->get('theme')
204
+            if (midcom::get()->config->get('theme')
205 205
                 && !$args_started
206 206
                 && self::check_page_exists($part)) {
207 207
                 $page_style .= '/' . $part;
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/main.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,8 @@
 block discarded – undo
153 153
         if ($object instanceof mgdobject) {
154 154
             try {
155 155
                 $obj = midcom::get()->dbfactory->convert_midgard_to_midcom($object);
156
-            } catch (midcom_error) {
156
+            }
157
+            catch (midcom_error) {
157 158
                 return null;
158 159
             }
159 160
         } else {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return static
53 53
      */
54
-    public static function get(string|object $src) : self
54
+    public static function get(string | object $src) : self
55 55
     {
56 56
         $identifier = static::class . (is_object($src) ? get_class($src) : $src);
57 57
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
         $label_prop = $this->get_label_property();
285 285
 
286
-        if (    $label_prop != 'guid'
286
+        if ($label_prop != 'guid'
287 287
              && $this->property_exists($label_prop)) {
288 288
             $search_properties[$label_prop] = true;
289 289
         }
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
                 continue;
334 334
             }
335 335
 
336
-            if (   !$this->is_link($property)
336
+            if (!$this->is_link($property)
337 337
                 && $this->get_midgard_type($property) != MGD_TYPE_GUID) {
338 338
                 continue;
339 339
             }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     protected static function class_rewrite(string $schema_type) : string
368 368
     {
369 369
         $extends = midcom_baseclasses_components_configuration::get('midcom.helper.reflector', 'config')->get_array('class_extends');
370
-        if (   isset($extends[$schema_type])
370
+        if (isset($extends[$schema_type])
371 371
             && class_exists($extends[$schema_type])) {
372 372
             return $extends[$schema_type];
373 373
         }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     /**
388 388
      * Get the MgdSchema classname for given class
389 389
      */
390
-    public static function resolve_baseclass(string|object $classname) : string
390
+    public static function resolve_baseclass(string | object $classname) : string
391 391
     {
392 392
         static $cached = [];
393 393
 
Please login to merge, or discard this patch.
src/midcom/console/command/cleanup/privileges.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,8 @@
 block discarded – undo
59 59
                 try {
60 60
                     \midgard_object_class::get_object_by_guid($priv->objectguid);
61 61
                     $seen_parents[$priv->objectguid] = true;
62
-                } catch (\Exception) {
62
+                }
63
+                catch (\Exception) {
63 64
                     $seen_parents[$priv->objectguid] = false;
64 65
                 }
65 66
             }
Please login to merge, or discard this patch.
src/midcom/console/command/cleanup/parameters.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@
 block discarded – undo
49 49
                 try {
50 50
                     \midgard_object_class::get_object_by_guid($param->parentguid);
51 51
                     $seen[$param->parentguid] = true;
52
-                } catch (\Exception) {
52
+                }
53
+                catch (\Exception) {
53 54
                     $seen[$param->parentguid] = false;
54 55
                 }
55 56
             }
Please login to merge, or discard this patch.
src/midcom/console/command/exec.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@
 block discarded – undo
94 94
 
95 95
         try {
96 96
             require $basedir . $file;
97
-        } catch (\midcom_error_forbidden) {
97
+        }
98
+        catch (\midcom_error_forbidden) {
98 99
             $dialog = $this->getHelperSet()->get('question');
99 100
             $this->login($dialog, $input, $output);
100 101
             require $basedir . $file;
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $parent = $object->get_parent();
144 144
 
145
-        if (   $object instanceof midcom_db_parameter
145
+        if ($object instanceof midcom_db_parameter
146 146
             && !empty($parent->guid)) {
147 147
             // Add "parameters" list to breadcrumb if we're in a param
148 148
             $breadcrumb[] = [
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         }
153 153
 
154 154
         $i = 0;
155
-        while (   !empty($parent->guid)
155
+        while (!empty($parent->guid)
156 156
                && $i < 10) {
157 157
             $i++;
158 158
             $parent_reflector = midcom_helper_reflector::get($parent);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         static $preferences = [];
261 261
 
262
-        if (   !array_key_exists($preference, $preferences)
262
+        if (!array_key_exists($preference, $preferences)
263 263
             && $person = midcom::get()->auth->user?->get_storage()) {
264 264
             $preferences[$preference] = $person->get_parameter('midgard.admin.asgard:preferences', $preference);
265 265
         }
Please login to merge, or discard this patch.
lib/midcom/core/group.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,8 @@
 block discarded – undo
74 74
             }
75 75
             try {
76 76
                 $this->_storage = new midgard_group($id);
77
-            } catch (mgd_exception $e) {
77
+            }
78
+            catch (mgd_exception $e) {
78 79
                 debug_add('Tried to load a midgard_group, but got error ' . $e->getMessage(), MIDCOM_LOG_ERROR);
79 80
                 throw new midcom_error_midgard($e, $id);
80 81
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      *
57 57
      * Any error will trigger midcom_error.
58 58
      */
59
-    public function __construct(string|int|midgard_group $id)
59
+    public function __construct(string | int | midgard_group $id)
60 60
     {
61 61
         if (is_object($id)) {
62 62
             $this->_storage = $id;
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/feed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         if ($category) {
50 50
             // This is not a predefined category from configuration, check if site maintainer allows us to show it
51
-            if (   !in_array($category, $data['categories'])
51
+            if (!in_array($category, $data['categories'])
52 52
                 && !$this->_config->get('categories_custom_enable')) {
53 53
                 throw new midcom_error('Custom category support is disabled');
54 54
             }
Please login to merge, or discard this patch.