Passed
Push — master ( 5b7834...b80d67 )
by Andreas
18:18
created
src/midcom/datamanager/schemadb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
             if ($path === '') {
66 66
                 // Infinite loop, set an UI message and stop executing
67
-                if (   !isset($schema['extends']['name'])
67
+                if (!isset($schema['extends']['name'])
68 68
                     || $schema['extends']['name'] === $schema_name) {
69 69
                     throw new midcom_error('schema ' . $schema_name . ' extends itself');
70 70
                 }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     private function _process_category_constraint(org_openpsa_qbpager $qb)
77 77
     {
78
-        if (   !in_array($this->category, $this->_request_data['categories'])
78
+        if (!in_array($this->category, $this->_request_data['categories'])
79 79
             && !$this->_config->get('categories_custom_enable')) {
80 80
             throw new midcom_error('Custom categories are not allowed');
81 81
             // TODO: Check here if there are actually items in this cat?
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         midcom::get()->head->set_pagetitle($this->_request_data['page_title']);
89 89
 
90 90
         // Activate correct leaf
91
-        if (   $this->_config->get('show_navigation_pseudo_leaves')
91
+        if ($this->_config->get('show_navigation_pseudo_leaves')
92 92
             && in_array($this->category, $this->_request_data['categories'])) {
93 93
             $this->set_active_leaf($this->_topic->id . '_CAT_' . $this->category);
94 94
         }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/feed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
         if ($handler_id == 'feed-category-rss2') {
53 53
             // This is not a predefined category from configuration, check if site maintainer allows us to show it
54
-            if (   !in_array($args[0], $data['categories'])
54
+            if (!in_array($args[0], $data['categories'])
55 55
                 && !$this->_config->get('categories_custom_enable')) {
56 56
                 throw new midcom_error('Custom category support is disabled');
57 57
             }
Please login to merge, or discard this patch.
lib/midcom/services/cache/module/content.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
         $this->_uncached = $config->get('cache_module_content_uncached');
172 172
         $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy');
173 173
         $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated');
174
-        $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime');
175
-        $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated');
174
+        $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime');
175
+        $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated');
176 176
 
177 177
         if ($this->_headers_strategy == 'no-cache') {
178 178
             // we can't call no_cache() here, because it would try to call back to this class via the global getter
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function expires(int $timestamp)
457 457
     {
458
-        if (   $this->_expires === null
458
+        if ($this->_expires === null
459 459
             || $this->_expires > $timestamp) {
460 460
             $this->_expires = $timestamp;
461 461
         }
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
      */
568 568
     public function write_meta_cache(string $content_id, Request $request, Response $response)
569 569
     {
570
-        if (   $this->_uncached
570
+        if ($this->_uncached
571 571
             || $this->_no_cache) {
572 572
             return;
573 573
         }
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 
637 637
     public function store_dl_content(int $context, string $dl_cache_data, Request $request)
638 638
     {
639
-        if (   $this->_no_cache
639
+        if ($this->_no_cache
640 640
             || $this->_uncached) {
641 641
             return;
642 642
         }
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 
677 677
         /* TODO: Doublecheck the way this is handled, now we just don't send it
678 678
          * if headers_strategy implies caching */
679
-        if (   !$response->headers->has('Content-Length')
679
+        if (!$response->headers->has('Content-Length')
680 680
             && !in_array($this->_headers_strategy, ['public', 'private'])) {
681 681
             $response->headers->set("Content-Length", strlen($response->getContent()));
682 682
         }
Please login to merge, or discard this patch.
lib/midcom/helper/nav/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         while ($parent = $object->get_parent()) {
337 337
             // Verify that this topic is within the current sites tree, if it is not,
338 338
             // we ignore it.
339
-            if (   is_a($parent, midcom_db_topic::class)
339
+            if (is_a($parent, midcom_db_topic::class)
340 340
                 && $this->is_node_in_tree($parent->id, $this->get_root_node())) {
341 341
                 return $parent;
342 342
             }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                     $entry = "<span class=\"{$current_class}\">{$entry}</span>";
391 391
                 }
392 392
             } else {
393
-                if (   !empty($data['napobject'][MIDCOM_NAV_GUID])
393
+                if (!empty($data['napobject'][MIDCOM_NAV_GUID])
394 394
                     && in_array($data['napobject'][MIDCOM_NAV_GUID], $skip_guids)) {
395 395
                     continue;
396 396
                 }
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                     $id = "custom-{$key}";
505 505
 
506 506
                     $url = "{$prefix}{$entry[MIDCOM_NAV_URL]}";
507
-                    if (   str_starts_with($entry[MIDCOM_NAV_URL], '/')
507
+                    if (str_starts_with($entry[MIDCOM_NAV_URL], '/')
508 508
                         || preg_match('|^https?://|', $entry[MIDCOM_NAV_URL])) {
509 509
                         $url = $entry[MIDCOM_NAV_URL];
510 510
                     }
Please login to merge, or discard this patch.
lib/midcom/helper/imagepopup/handler/upload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $temp = array_shift($_FILES);
21 21
 
22 22
         // Verify file extension
23
-        if (   is_uploaded_file($temp['tmp_name'])
23
+        if (is_uploaded_file($temp['tmp_name'])
24 24
             && !in_array(strtolower(pathinfo($temp['name'], PATHINFO_EXTENSION)), ["gif", "jpg", "png"])) {
25 25
             throw new midcom_error('Invalid extension.');
26 26
         }
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
         }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         }
362 362
 
363 363
         // Check if we need to create task or ship goods
364
-        if (   $update_deliveries
364
+        if ($update_deliveries
365 365
             && $product->orgOpenpsaObtype === org_openpsa_products_product_dba::TYPE_SERVICE) {
366 366
             // Change status of tasks connected to the deliverable
367 367
             $qb = org_openpsa_projects_task_dba::new_query_builder();
Please login to merge, or discard this patch.