Passed
Push — master ( c19ae9...cb86bb )
by Andreas
18:22
created
lib/midcom/admin/rcs/style/midcom-admin-rcs-history.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         echo "                    <td><a href='" . $data['router']->generate('preview', ['guid' => $guid, 'revision' => $number]) . "'>{$revision['version']}</a></td>\n";
33 33
         echo "                    <td>" . $formatter->datetime($revision['date']) . "</td>\n";
34 34
 
35
-        if (   $revision['user']
35
+        if ($revision['user']
36 36
             && $user = midcom::get()->auth->get_user($revision['user'])) {
37 37
             $person_label = $user->get_storage()->name;
38 38
             echo "                    <td>{$person_label}</td>\n";
Please login to merge, or discard this patch.
src/midcom/datamanager/template/plaintext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     public function form_widget_simple(FormView $view, array $data)
19 19
     {
20
-        if (   !empty($data['value'])
20
+        if (!empty($data['value'])
21 21
             || is_numeric($data['value'])) {
22 22
             return $data['value'];
23 23
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/template/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
     public function form_widget_simple(FormView $view, array $data)
145 145
     {
146
-        if (   !empty($data['value'])
146
+        if (!empty($data['value'])
147 147
             || is_numeric($data['value'])) {
148 148
             return $this->escape($data['value']);
149 149
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/backend.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@  discard block
 block discarded – undo
45 45
                     $object = self::_load_backend($backend, $params);
46 46
                     debug_add('Using backend ' . $backend);
47 47
                     return $object;
48
-                } catch (midcom_error $e) {
48
+                }
49
+                catch (midcom_error $e) {
49 50
                     debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage());
50 51
                 }
51 52
             }
@@ -80,7 +81,8 @@  discard block
 block discarded – undo
80 81
             $ret = $this->mail($message);
81 82
             $this->error = null;
82 83
             return $ret;
83
-        } catch (Exception $e) {
84
+        }
85
+        catch (Exception $e) {
84 86
             $this->error = $e->getMessage();
85 87
             return false;
86 88
         }
Please login to merge, or discard this patch.
src/midcom/console/command/cacheinvalidate.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
     {
34 34
         try {
35 35
             midcom::get()->cache->invalidate_all();
36
-        } catch (\Throwable $e) {
36
+        }
37
+        catch (\Throwable $e) {
37 38
             $output->writeln($e->getMessage());
38 39
         }
39 40
         $fs = new Filesystem;
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
@@ -64,7 +64,8 @@
 block discarded – undo
64 64
         try {
65 65
             $this->__object = $this->__midcom_class_name__::get_cached($this->__identifier);
66 66
             return true;
67
-        } catch (midcom_error $e) {
67
+        }
68
+        catch (midcom_error $e) {
68 69
             $e->log();
69 70
         }
70 71
         return false;
Please login to merge, or discard this patch.
src/midcom/console/command/reindex.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,8 @@
 block discarded – undo
73 73
             if (is_a($stat, midcom_services_indexer_client::class)) {
74 74
                 try {
75 75
                     $stat->reindex();
76
-                } catch (RequestException $e) {
76
+                }
77
+                catch (RequestException $e) {
77 78
                     if ($e->hasResponse()) {
78 79
                         $crawler = new Crawler($e->getResponse()->getBody()->getContents());
79 80
                         $body = $crawler->filterXPath('//body')->html();
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/sender/backend/email.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
         $address = addslashes($address);
167 167
         return preg_replace_callback(
168 168
             '/href="(http:\/\/.*?)"/i',
169
-            function ($match) use ($address) {
169
+            function($match) use ($address) {
170 170
                 return 'href="' . str_replace("URL", rawurlencode($match[1]), $address) . '"';
171 171
             },
172 172
             $html);
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,13 +148,13 @@
 block discarded – undo
148 148
     }
149 149
 
150 150
     /**
151
-    * Inserts a link detector to the given HTML source. All outgoing
152
-    * HTTP links in the source HTML are replaced with the given
153
-    * link detector address so that the token "URL" is replaced with
154
-    * encoded form of the original link. It is expected that the link detector
155
-    * address points to a script that records the passed link and
156
-    * forwards the client to the real link target.
157
-    */
151
+     * Inserts a link detector to the given HTML source. All outgoing
152
+     * HTTP links in the source HTML are replaced with the given
153
+     * link detector address so that the token "URL" is replaced with
154
+     * encoded form of the original link. It is expected that the link detector
155
+     * address points to a script that records the passed link and
156
+     * forwards the client to the real link target.
157
+     */
158 158
     private function _insert_link_detector(string $html, string $address) : string
159 159
     {
160 160
         $address = addslashes($address);
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/style/ASGARD_ROOT.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,8 @@  discard block
 block discarded – undo
122 122
                             try {
123 123
                                 $creator = new midcom_db_person($view_metadata->get('creator'));
124 124
                                 $creator_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$creator->guid}/\">$creator->name</a>";
125
-                            } catch (midcom_error $e) {
125
+                            }
126
+                            catch (midcom_error $e) {
126 127
                                 $creator_string = $l10n->get('unknown person');
127 128
                             }
128 129
                             $created = (int) $view_metadata->get('created');
@@ -135,7 +136,8 @@  discard block
 block discarded – undo
135 136
                                 try {
136 137
                                     $editor = new midcom_db_person($view_metadata->get('revisor'));
137 138
                                     $editor_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$editor->guid}/\">$editor->name</a>";
138
-                                } catch (midcom_error $e) {
139
+                                }
140
+                                catch (midcom_error $e) {
139 141
                                     $editor_string = $l10n->get('unknown person');
140 142
                                 }
141 143
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 
128 128
                             $edited = (int) $view_metadata->get('revised');
129 129
                             $revision = $view_metadata->get('revision');
130
-                            if (   $revision > 0
130
+                            if ($revision > 0
131 131
                                 && $edited != $created) {
132 132
                                 try {
133 133
                                     $editor = new midcom_db_person($view_metadata->get('revisor'));
Please login to merge, or discard this patch.