@@ -59,7 +59,8 @@ |
||
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 | } |
@@ -49,7 +49,8 @@ |
||
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 | } |
@@ -94,7 +94,8 @@ |
||
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; |
@@ -142,7 +142,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -74,7 +74,8 @@ |
||
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 | } |
@@ -56,7 +56,7 @@ |
||
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; |
@@ -48,7 +48,7 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $this->_topic->require_do('midgard:create'); |
30 | 30 | |
31 | 31 | $schemadb = $data['schemadb']; |
32 | - if ( $this->_config->get('simple_name_handling') |
|
32 | + if ($this->_config->get('simple_name_handling') |
|
33 | 33 | && !midcom::get()->auth->can_user_do('midcom:urlname')) { |
34 | 34 | foreach ($schemadb->all() as $schema) { |
35 | 35 | $schema->get_field('name')['readonly'] = true; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | $item->title = $data['article']->title; |
19 | 19 | |
20 | -if ( $data['config']->get('link_to_external_url') |
|
20 | +if ($data['config']->get('link_to_external_url') |
|
21 | 21 | && !empty($data['article']->url)) { |
22 | 22 | $item->link = $data['article']->url; |
23 | 23 | } else { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $item->description .= '<div class="abstract">' . $view['abstract'] . '</div>'; |
34 | 34 | } |
35 | 35 | |
36 | -if ( array_key_exists('image', $view) |
|
36 | +if (array_key_exists('image', $view) |
|
37 | 37 | && $data['config']->get('rss_use_image')) { |
38 | 38 | $item->description .= "\n<div class=\"image\">" . $view['image'] . '</div>'; |
39 | 39 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $data['query'] = new org_openpsa_reports_query_dba($guid); |
76 | 76 | $data['query']->require_do('midgard:update'); |
77 | 77 | } else { |
78 | - $data['query']= new org_openpsa_reports_query_dba(); |
|
78 | + $data['query'] = new org_openpsa_reports_query_dba(); |
|
79 | 79 | $data['query']->component = $this->_component; |
80 | 80 | } |
81 | 81 |