Passed
Push — master ( bdb120...ac8235 )
by Andreas
10:30
created
lib/org/openpsa/directmarketing/link/log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     public function _on_creating() : bool
27 27
     {
28
-        if (   !$this->referrer
28
+        if (!$this->referrer
29 29
             && !empty($_SERVER['HTTP_REFERER'])) {
30 30
             $this->referrer = $_SERVER['HTTP_REFERER'];
31 31
         }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/salesproject.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             }
120 120
         }
121 121
         $profit = $value - $cost;
122
-        if (   $this->value != $value
122
+        if ($this->value != $value
123 123
             || $this->profit != $profit) {
124 124
             $this->value = $value;
125 125
             $this->profit = $value - $cost;
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 
185 185
     public function _on_updating() : bool
186 186
     {
187
-        if (   $this->state != self::STATE_ACTIVE
187
+        if ($this->state != self::STATE_ACTIVE
188 188
             && !$this->end) {
189 189
             //Not active anymore and end not set, set it to now
190 190
             $this->end = time();
191 191
         }
192
-        if (   $this->end
192
+        if ($this->end
193 193
             && $this->state == self::STATE_ACTIVE) {
194 194
             //Returned to active state, clear the end marker.
195 195
             $this->end = 0;
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/invoice/item.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function _on_creating() : bool
27 27
     {
28
-        if (   $this->invoice
28
+        if ($this->invoice
29 29
             && $this->position == 0) {
30 30
             $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice);
31 31
             $this->position = count($invoice->get_invoice_items()) + 1;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             } catch (midcom_error $e) {
76 76
             }
77 77
         }
78
-        if (   $url == ''
78
+        if ($url == ''
79 79
             && $sales_url) {
80 80
             try {
81 81
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 $invoice = new org_openpsa_invoices_invoice_dba($this->invoice);
98 98
                 $old_sum = $invoice->sum;
99 99
                 self::update_invoice($invoice);
100
-                if (   $old_sum != $invoice->sum
100
+                if ($old_sum != $invoice->sum
101 101
                     && !empty($this->deliverable)) {
102 102
                     $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable);
103 103
                     self::update_deliverable($deliverable);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         if ($invoiced != $deliverable->invoiced) {
137 137
             $deliverable->invoiced = $invoiced;
138
-            if (   $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
138
+            if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
139 139
                 && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) {
140 140
                 $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED;
141 141
             }
Please login to merge, or discard this patch.
lib/net/nemein/tag/tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function _on_creating() : bool
42 42
     {
43
-        return (   $this->validate_tag($this->tag)
43
+        return ($this->validate_tag($this->tag)
44 44
                 && $this->_check_duplicates() == 0);
45 45
     }
46 46
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function _on_updating() : bool
71 71
     {
72
-        return (   $this->validate_tag($this->tag)
72
+        return ($this->validate_tag($this->tag)
73 73
                 && $this->_check_duplicates() == 0);
74 74
     }
75 75
 
Please login to merge, or discard this patch.
lib/net/nemein/wiki/wikipage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function _on_creating() : bool
30 30
     {
31
-        if (   $this->title == ''
31
+        if ($this->title == ''
32 32
             || !$this->topic) {
33 33
             // We must have wikiword and topic at this stage
34 34
             return false;
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $this->save_attachment_list();
57 57
         }
58 58
 
59
-        if (   array_intersect_key(array_flip(['description', 'title', 'score']), $this->value)
59
+        if (array_intersect_key(array_flip(['description', 'title', 'score']), $this->value)
60 60
             && $main = $this->get_main()) {
61 61
             $needs_update = false;
62 62
             if (array_key_exists('description', $this->value)) {
Please login to merge, or discard this patch.
lib/midcom/services/cache/module/content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $this->_uncached = $config->get('cache_module_content_uncached');
164 164
         $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy');
165 165
         $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated');
166
-        $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime');
167
-        $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated');
166
+        $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime');
167
+        $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated');
168 168
 
169 169
         if ($this->_headers_strategy == 'no-cache') {
170 170
             // we can't call no_cache() here, because it would try to call back to this class via the global getter
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public function write_meta_cache(string $content_id, Request $request, Response $response)
533 533
     {
534
-        if (   $this->_uncached
534
+        if ($this->_uncached
535 535
             || $this->_no_cache) {
536 536
             return;
537 537
         }
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 
594 594
     public function store_dl_content(int $context, string $dl_cache_data, Request $request)
595 595
     {
596
-        if (   $this->_no_cache
596
+        if ($this->_no_cache
597 597
             || $this->_uncached) {
598 598
             return;
599 599
         }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
         /* TODO: Doublecheck the way this is handled, now we just don't send it
629 629
          * if headers_strategy implies caching */
630
-        if (   !$response->headers->has('Content-Length')
630
+        if (!$response->headers->has('Content-Length')
631 631
             && !in_array($this->_headers_strategy, ['public', 'private'])) {
632 632
             $response->headers->set("Content-Length", strlen($response->getContent()));
633 633
         }
Please login to merge, or discard this patch.
lib/midcom/core/collector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
             if ($counter <= $this->_offset) {
143 143
                 continue;
144 144
             }
145
-            if (   $this->_limit
145
+            if ($this->_limit
146 146
                 && $counter > ($this->_offset + $this->_limit)) {
147 147
                 break;
148 148
             }
Please login to merge, or discard this patch.
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.