Passed
Push — master ( eb3d65...8de60e )
by Andreas
18:09
created
lib/midcom/services/cache/module/nap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             // Get parent from DB and compare to catch moves
55 55
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
56 56
                 $parent_entry = $this->get_guid($parent->guid);
57
-                if (   $parent_entry
57
+                if ($parent_entry
58 58
                     && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) {
59 59
                     $this->backend->deleteItem($parent_entry[MIDCOM_NAV_ID] . '-leaves');
60 60
                 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $parent_id = $napobject[MIDCOM_NAV_NODEID];
70 70
             $parent_entry = $this->get_node($parent_id);
71 71
 
72
-            if (   $parent_entry
72
+            if ($parent_entry
73 73
                 && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) {
74 74
                 unset($parent_entry[MIDCOM_NAV_SUBNODES]);
75 75
                 $this->put_node($parent_id, $parent_entry);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
80 80
                 $parent_entry_from_object = $this->get_guid($parent->guid);
81 81
 
82
-                if (    !empty($parent_entry_from_object[MIDCOM_NAV_ID])
82
+                if (!empty($parent_entry_from_object[MIDCOM_NAV_ID])
83 83
                      && !empty($parent_entry[MIDCOM_NAV_ID])
84 84
                      && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) {
85 85
                     unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $nav = new midcom_helper_nav;
106 106
             if ($object instanceof midcom_db_topic) {
107 107
                 $napobject = $nav->get_node($object->id);
108
-            } elseif (   ($node = $nav->find_closest_topic($object))
108
+            } elseif (($node = $nav->find_closest_topic($object))
109 109
                       && $nodeobject = $nav->get_node($node->id)) {
110 110
                 $napobject = $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id);
111 111
             }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/salesproject/deliverable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $this->calculate_price(false);
80 80
 
81
-        if (   $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
81
+        if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
82 82
             && $this->continuous) {
83 83
             $this->end = 0;
84 84
         } elseif ($this->end < $this->start) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $calculator->run($this);
167 167
         $cost = $calculator->get_cost();
168 168
         $price = $calculator->get_price();
169
-        if (   $price != $this->price
169
+        if ($price != $this->price
170 170
             || $cost != $this->cost) {
171 171
             $this->price = $price;
172 172
             $this->cost = $cost;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $units = $agreement_hours['invoiceable'];
214 214
         $uninvoiceableUnits = $agreement_hours['reported'] - ($agreement_hours['invoiceable'] + $agreement_hours['invoiced']);
215 215
 
216
-        if (   $units != $this->units
216
+        if ($units != $this->units
217 217
             || $uninvoiceableUnits != $this->uninvoiceableUnits) {
218 218
             debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits);
219 219
             $this->units = $units;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
     public function invoice() : bool
269 269
     {
270
-        if (   $this->state >= self::STATE_INVOICED
270
+        if ($this->state >= self::STATE_INVOICED
271 271
             || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) {
272 272
             return false;
273 273
         }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('org.openpsa.sales', 'org.openpsa.sales'), sprintf(midcom::get()->i18n->get_string('marked deliverable "%s" delivered', 'org.openpsa.sales'), $this->title));
371 371
 
372 372
             // Check if we need to create task or ship goods
373
-            if (   $update_deliveries
373
+            if ($update_deliveries
374 374
                 && $product->orgOpenpsaObtype === org_openpsa_products_product_dba::TYPE_SERVICE) {
375 375
                 // Change status of tasks connected to the deliverable
376 376
                 $qb = org_openpsa_projects_task_dba::new_query_builder();
Please login to merge, or discard this patch.