@@ -50,7 +50,8 @@ |
||
50 | 50 | try { |
51 | 51 | \midgard_object_class::get_object_by_guid($priv->objectguid); |
52 | 52 | $seen_parents[$priv->objectguid] = true; |
53 | - } catch (\Exception $e) { |
|
53 | + } |
|
54 | + catch (\Exception $e) { |
|
54 | 55 | $seen_parents[$priv->objectguid] = false; |
55 | 56 | } |
56 | 57 | } |
@@ -110,7 +110,8 @@ discard block |
||
110 | 110 | try { |
111 | 111 | $this->process_classes($rules['classes'], $rules['type']); |
112 | 112 | return true; |
113 | - } catch (midcom_error $e) { |
|
113 | + } |
|
114 | + catch (midcom_error $e) { |
|
114 | 115 | $e->log(); |
115 | 116 | return false; |
116 | 117 | } |
@@ -225,7 +226,8 @@ discard block |
||
225 | 226 | $guid = $mc_parameter->get_subkey($parameter_key, 'parentguid'); |
226 | 227 | try { |
227 | 228 | $parent = midcom::get()->dbfactory->get_object_by_guid($guid); |
228 | - } catch (midcom_error $e) { |
|
229 | + } |
|
230 | + catch (midcom_error $e) { |
|
229 | 231 | $e->log(); |
230 | 232 | continue; |
231 | 233 | } |
@@ -161,7 +161,8 @@ discard block |
||
161 | 161 | $response = $this->handle($request); |
162 | 162 | $response->send(); |
163 | 163 | $this->terminate($request, $response); |
164 | - } catch (Error $e) { |
|
164 | + } |
|
165 | + catch (Error $e) { |
|
165 | 166 | $this->getHttpKernel()->terminateWithException($e); |
166 | 167 | } |
167 | 168 | } |
@@ -218,11 +219,13 @@ discard block |
||
218 | 219 | $this->skip_page_style = true; |
219 | 220 | try { |
220 | 221 | $response = $this->handle($request, HttpKernelInterface::SUB_REQUEST, false); |
221 | - } catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
222 | + } |
|
223 | + catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
222 | 224 | $e->log(); |
223 | 225 | midcom_core_context::leave(); |
224 | 226 | return; |
225 | - } finally { |
|
227 | + } |
|
228 | + finally { |
|
226 | 229 | $this->skip_page_style = $backup; |
227 | 230 | } |
228 | 231 |
@@ -44,7 +44,8 @@ |
||
44 | 44 | { |
45 | 45 | try { |
46 | 46 | $this->cache->invalidate_all(); |
47 | - } catch (\Throwable $e) { |
|
47 | + } |
|
48 | + catch (\Throwable $e) { |
|
48 | 49 | $output->writeln($e->getMessage()); |
49 | 50 | } |
50 | 51 |
@@ -27,7 +27,8 @@ |
||
27 | 27 | { |
28 | 28 | try { |
29 | 29 | return parent::load_object($guid); |
30 | - } catch (midcom_error_midgard $e) { |
|
30 | + } |
|
31 | + catch (midcom_error_midgard $e) { |
|
31 | 32 | $mgd_exception = $e->getPrevious(); |
32 | 33 | if ( $mgd_exception |
33 | 34 | && $mgd_exception->getCode() == mgd_exception::OBJECT_DELETED) { |
@@ -54,7 +54,8 @@ discard block |
||
54 | 54 | $field['type_config']['options'] = [0 => '', $customer->id => $customer->official]; |
55 | 55 | |
56 | 56 | $defaults['customer'] = $customer->id; |
57 | - } catch (midcom_error $e) { |
|
57 | + } |
|
58 | + catch (midcom_error $e) { |
|
58 | 59 | $customer = new org_openpsa_contacts_person_dba($guid); |
59 | 60 | $defaults['customerContact'] = $customer->id; |
60 | 61 | $field['type_config']['options'] = $this->list_groups([$customer->id => true]); |
@@ -126,7 +127,8 @@ discard block |
||
126 | 127 | try { |
127 | 128 | $company = new org_openpsa_contacts_group_dba($company_id); |
128 | 129 | $ret[$company->id] = $company->get_label(); |
129 | - } catch (midcom_error $e) { |
|
130 | + } |
|
131 | + catch (midcom_error $e) { |
|
130 | 132 | $e->log(); |
131 | 133 | } |
132 | 134 | } |
@@ -37,7 +37,8 @@ |
||
37 | 37 | { |
38 | 38 | try { |
39 | 39 | $this->db = connection::get_em()->getConnection()->getNativeConnection(); |
40 | - } catch (\Exception $e) { |
|
40 | + } |
|
41 | + catch (\Exception $e) { |
|
41 | 42 | $this->db = $this->create_connection($input, $output); |
42 | 43 | } |
43 | 44 |
@@ -107,7 +107,8 @@ |
||
107 | 107 | && $nodeobject = $nav->get_node($node->id)) { |
108 | 108 | return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
109 | 109 | } |
110 | - } catch (midcom_error $e) { |
|
110 | + } |
|
111 | + catch (midcom_error $e) { |
|
111 | 112 | $e->log(); |
112 | 113 | } |
113 | 114 | return null; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $result = $this->is_username_available($fields); |
48 | 48 | |
49 | 49 | $accounthelper = new org_openpsa_user_accounthelper(); |
50 | - if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])){ |
|
50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])) { |
|
51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
52 | 52 | } |
53 | 53 | |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | $user = new midcom_db_person($fields["person"]); |
153 | 153 | |
154 | 154 | $accounthelper = new org_openpsa_user_accounthelper($user); |
155 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
155 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
156 | 156 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
157 | 157 | } |
158 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
158 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
159 | 159 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
160 | 160 | } |
161 | 161 | return $result ?: true; |