Passed
Pull Request — master (#204)
by
unknown
23:41
created
src/midcom/console/command/reindex.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,8 @@
 block discarded – undo
74 74
             if (is_a($stat, midcom_services_indexer_client::class)) {
75 75
                 try {
76 76
                     $stat->reindex();
77
-                } catch (RequestException $e) {
77
+                }
78
+                catch (RequestException $e) {
78 79
                     if ($e->hasResponse()) {
79 80
                         $crawler = new Crawler($e->getResponse()->getBody()->getContents());
80 81
                         $body = $crawler->filter('body')->html();
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
@@ -79,7 +79,8 @@
 block discarded – undo
79 79
 
80 80
         try {
81 81
             require OPENPSA_PROJECT_BASEDIR . $file;
82
-        } catch (\midcom_error_forbidden $e) {
82
+        }
83
+        catch (\midcom_error_forbidden $e) {
83 84
             $dialog = $this->getHelperSet()->get('question');
84 85
             $this->login($dialog, $input, $output);
85 86
             require OPENPSA_PROJECT_BASEDIR . $file;
Please login to merge, or discard this patch.
src/midcom/httpkernel/subscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
         foreach ($arguments as $i => $argument) {
101 101
             if ($argument === '__request_data__') {
102 102
                 $context = $event->getRequest()->attributes->get('context');
103
-                $arguments[$i] =& $context->get_custom_key('request_data');
103
+                $arguments[$i] = & $context->get_custom_key('request_data');
104 104
             }
105 105
         }
106 106
         $event->setArguments($arguments);
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/style/ASGARD_ROOT.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 }
6 6
 
7 7
 // Check the user preference and configuration
8
-if (   midgard_admin_asgard_plugin::get_preference('escape_frameset')
9
-    || (   midgard_admin_asgard_plugin::get_preference('escape_frameset') !== '0'
8
+if (midgard_admin_asgard_plugin::get_preference('escape_frameset')
9
+    || (midgard_admin_asgard_plugin::get_preference('escape_frameset') !== '0'
10 10
         && $data['config']->get('escape_frameset'))) {
11 11
     $head->add_jsonload('if(top.frames.length != 0 && top.location.href != this.location.href){top.location.href = this.location.href}');
12 12
 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
                             $edited = (int) $view_metadata->get('revised');
135 135
                             $revision = $view_metadata->get('revision');
136
-                            if (   $revision > 1
136
+                            if ($revision > 1
137 137
                                 && $edited != $created) {
138 138
                                 try {
139 139
                                     $editor = new midcom_db_person($view_metadata->get('revisor'));
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
                             try {
9 9
                                 $creator = new midcom_db_person($view_metadata->get('creator'));
10 10
                                 $creator_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$creator->guid}/\">$creator->name</a>";
11
-                            } catch (midcom_error $e) {
11
+                            }
12
+                            catch (midcom_error $e) {
12 13
                                 $creator_string = $data['l10n']->get('unknown person');
13 14
                             }
14 15
                             $created = (int) $view_metadata->get('created');
@@ -21,7 +22,8 @@  discard block
 block discarded – undo
21 22
                                 try {
22 23
                                     $editor = new midcom_db_person($view_metadata->get('revisor'));
23 24
                                     $editor_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$editor->guid}/\">$editor->name</a>";
24
-                                } catch (midcom_error $e) {
25
+                                }
26
+                                catch (midcom_error $e) {
25 27
                                     $editor_string = $data['l10n']->get('unknown person');
26 28
                                 }
27 29
 
Please login to merge, or discard this patch.
lib/midcom/services/uimessages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
         if (!$this->_message_stack) {
163 163
             return;
164 164
         }
165
-        if (   $show_simple
165
+        if ($show_simple
166 166
             || !midcom::get()->auth->can_user_do('midcom:ajax', null, static::class)) {
167 167
             $this->show_simple();
168 168
             return;
Please login to merge, or discard this patch.
lib/midcom/services/cache/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 
125 125
         $this->_modules[$name] = new $classname();
126 126
         $this->_modules[$name]->initialize();
127
-        $this->$name =& $this->_modules[$name];
127
+        $this->$name = & $this->_modules[$name];
128 128
     }
129 129
 
130 130
     /**
Please login to merge, or discard this patch.
lib/midcom/admin/help/style/midcom_admin_help_mgdschemas.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
         foreach ($properties as $propname => $val) {
17 17
             $description = preg_replace('/ *\n */', "\n", $val['value']);
18
-            if (   $val['link']
18
+            if ($val['link']
19 19
                 && $linked_component = midcom::get()->dbclassloader->get_component_for_class($val['link_name'])) {
20 20
                 $proplink = $data['router']->generate('help', ['component' => $linked_component, 'help_id' => 'mgdschemas']);
21 21
                 $proplink = "<a href='{$proplink}#{$val['link_name']}' title='{$linked_component}/{$val['link_name']}::{$val['link_target']}'>{$val['link_name']}:{$val['link_target']}</a>";
Please login to merge, or discard this patch.
lib/org/openpsa/projects/task.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     public function _on_updated()
111 111
     {
112 112
         // Sync the object's ACL properties into MidCOM ACL system
113
-        if (   !$this->_skip_acl_refresh) {
113
+        if (!$this->_skip_acl_refresh) {
114 114
             if ($this->orgOpenpsaAccesstype && $this->orgOpenpsaOwnerWg) {
115 115
                 debug_add("Synchronizing task ACLs to MidCOM");
116 116
                 $sync = new org_openpsa_core_acl_synchronizer();
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -238,7 +238,8 @@  discard block
 block discarded – undo
238 238
                     $salesproject = org_openpsa_sales_salesproject_dba::get_cached($agreement->salesproject);
239 239
                     $this->customer = $salesproject->customer;
240 240
                 }
241
-            } catch (midcom_error $e) {
241
+            }
242
+            catch (midcom_error $e) {
242 243
             }
243 244
         } else {
244 245
             // No agreement, we can't be invoiceable
@@ -283,7 +284,8 @@  discard block
 block discarded – undo
283 284
         try {
284 285
             $agreement = new org_openpsa_sales_salesproject_deliverable_dba($this->get_agreement());
285 286
             $agreement->update_units($this->id, $hours);
286
-        } catch (midcom_error $e) {
287
+        }
288
+        catch (midcom_error $e) {
287 289
         }
288 290
 
289 291
         if ($update) {
Please login to merge, or discard this patch.
lib/org/openpsa/sales/style/show-deliverable-subscription.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,30 +80,30 @@
 block discarded – undo
80 80
                         <tr>
81 81
                           <td class="title"><?php echo $data['l10n']->get('cost'); ?></td>
82 82
                           <?php
83
-                          if ($data['deliverable']->costType == '%') {
84
-                              ?>
83
+                            if ($data['deliverable']->costType == '%') {
84
+                                ?>
85 85
                               <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td>
86 86
                               <td class="numeric">&nbsp;</td>
87 87
                               <td class="numeric">&nbsp;</td>
88 88
                           <?php
89
-                          } else {
90
-                              ?>
89
+                            } else {
90
+                                ?>
91 91
                               <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td>
92 92
                               <td class="numeric"><?php echo $view['plannedUnits']; ?></td>
93 93
                               <td class="numeric"><?php echo $view['units']; ?></td>
94 94
                           <?php
95
-                          } ?>
95
+                            } ?>
96 96
                               <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td>
97 97
                         </tr>
98 98
                       </tbody>
99 99
                     </table>
100 100
                 <?php if ($data['deliverable']->invoiceByActualUnits) {
101
-                              ?>
101
+                                ?>
102 102
                     <ul>
103 103
                         <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li>
104 104
                     </ul>
105 105
                     <?php
106
-                          } ?>
106
+                            } ?>
107 107
                     </div>
108 108
                 </div>
109 109
                 <div class="field">
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 $state = $data['deliverable']->get_state();
4 4
 $formatter = $data['l10n']->get_formatter();
5 5
 $per_unit = $data['l10n']->get('per unit');
6
-if (   $data['product']
6
+if ($data['product']
7 7
     && $unit_option = org_openpsa_sales_viewer::get_unit_option($data['product']->unit)) {
8 8
     $per_unit = sprintf($data['l10n']->get('per %s'), $unit_option);
9 9
 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         </div>
125 125
         <?php
126 126
         $tabs = [];
127
-        if (   $data['invoices_url']
127
+        if ($data['invoices_url']
128 128
             && $data['deliverable']->invoiced > 0) {
129 129
             $tabs[] = [
130 130
                 'url' => $data['invoices_url'] . "list/deliverable/{$data['deliverable']->guid}/",
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             ];
133 133
         }
134 134
 
135
-        if (   $data['projects_url']
135
+        if ($data['projects_url']
136 136
             && $data['deliverable']->state >= org_openpsa_sales_salesproject_deliverable_dba::STATE_ORDERED
137 137
             && $data['product']
138 138
             && $data['product']->orgOpenpsaObtype == org_openpsa_products_product_dba::TYPE_SERVICE) {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             }
192 192
             echo "    </tbody>\n";
193 193
             echo "</table>\n";
194
-            if (   $at_entries[0]->status == midcom_services_at_entry_dba::SCHEDULED
194
+            if ($at_entries[0]->status == midcom_services_at_entry_dba::SCHEDULED
195 195
                 && midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_invoices_invoice_dba::class)) {
196 196
                 $label = $data['l10n']->get('generate now');
197 197
                 $process_link = $data['router']->generate('deliverable_run_cycle', ['guid' => $data['deliverable']->guid]);
Please login to merge, or discard this patch.