Passed
Push — master ( 805652...eccbd5 )
by Andreas
26:13
created
lib/net/nehmer/comments/midcom/interfaces.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
47 47
         if ($node_id) {
48 48
             try {
49 49
                 $comments_topic = new midcom_db_topic($node_id);
50
-            } catch (midcom_error $e) {
50
+            }
51
+            catch (midcom_error $e) {
51 52
                 return null;
52 53
             }
53 54
 
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/index.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -409,7 +409,8 @@
 block discarded – undo
409 409
             foreach ($this->_articles as $article_counter => $article) {
410 410
                 try {
411 411
                     $data['datamanager']->set_storage($article);
412
-                } catch (midcom_error $e) {
412
+                }
413
+                catch (midcom_error $e) {
413 414
                     $e->log();
414 415
                     continue;
415 416
                 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         midcom::get()->head->set_pagetitle($this->_request_data['page_title']);
92 92
 
93 93
         // Activate correct leaf
94
-        if (   $this->_config->get('show_navigation_pseudo_leaves')
94
+        if ($this->_config->get('show_navigation_pseudo_leaves')
95 95
             && in_array($this->category, $this->_request_data['categories'])) {
96 96
             $this->set_active_leaf($this->_topic->id . '_CAT_' . $this->category);
97 97
         }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             ]);
49 49
         }
50 50
 
51
-        if (   $this->_article->topic === $this->_topic->id
51
+        if ($this->_article->topic === $this->_topic->id
52 52
             && $this->_article->can_do('midgard:delete')) {
53 53
             $delete = $this->get_workflow('delete', ['object' => $this->_article]);
54 54
             $buttons[] = $delete->get_button("delete/{$this->_article->guid}/");
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         if ($this->_config->get('comments_enable')) {
84 84
             if ($node = net_nehmer_comments_interface::get_node($this->_topic, $this->_config->get('comments_topic'))) {
85 85
                 $this->_request_data['comments_url'] = $node[MIDCOM_NAV_RELATIVEURL] . "comment/{$this->_article->guid}";
86
-                if (   $this->_topic->can_do('midgard:update')
86
+                if ($this->_topic->can_do('midgard:update')
87 87
                     && $this->_topic->can_do('net.nehmer.comments:moderation')) {
88 88
                     net_nehmer_comments_viewer::add_head_elements();
89 89
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/importer/csv.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
         foreach (array_filter($csv_line) as $field => $value) {
56 56
             // Process the row accordingly
57 57
             $field_matching = $this->_settings['fields'][$field];
58
-            if (   $field_matching
58
+            if ($field_matching
59 59
                 && strstr($field_matching, ':')) {
60 60
                 [$schemadb, $schema_field] = explode(':', $field_matching);
61 61
 
62
-                if (   !array_key_exists($schemadb, $this->_schemadbs)
62
+                if (!array_key_exists($schemadb, $this->_schemadbs)
63 63
                     || !$this->_schemadbs[$schemadb]->get('default')->has_field($schema_field)) {
64 64
                     // Invalid matching, skip
65 65
                     continue;
Please login to merge, or discard this patch.
lib/midcom/helper/imagefilter.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -386,7 +386,8 @@
 block discarded – undo
386 386
                 debug_add("EXIF information missing or without orientation tag. Skipping.", MIDCOM_LOG_INFO);
387 387
                 return;
388 388
             }
389
-        } catch (Exception $e) {
389
+        }
390
+        catch (Exception $e) {
390 391
             debug_add("Could not read EXIF data: " . $e->getMessage() . ", skipping.", MIDCOM_LOG_WARN);
391 392
             return;
392 393
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             debug_add("The File {$filename} is not writable.", MIDCOM_LOG_ERROR);
188 188
             return false;
189 189
         }
190
-        if (   !empty($this->_filename)
190
+        if (!empty($this->_filename)
191 191
             && $this->_filename !== $filename) {
192 192
             $this->_tmpfiles[] = $this->_filename;
193 193
         }
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         $tmpfile = null;
393 393
         $imagesize = getimagesize($this->_filename);
394 394
 
395
-        if (   $imagesize[2] == IMAGETYPE_JPEG
395
+        if ($imagesize[2] == IMAGETYPE_JPEG
396 396
             && $this->_jpegtran_available()) {
397 397
             /* jpegtran */
398 398
             $operations = [
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
         $imagesize = getimagesize($this->_filename);
461 461
 
462 462
         // Try lossless jpegtran rotation if possible
463
-        if (   $imagesize[2] == IMAGETYPE_JPEG
463
+        if ($imagesize[2] == IMAGETYPE_JPEG
464 464
             && ($rotate % 90 == 0)
465 465
             && $this->_jpegtran_available()) {
466 466
             $tmpfile = $this->_get_tempfile();
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      */
591 591
     public function fill($x = null, $y = null, $color = null, string $gravity = 'center')
592 592
     {
593
-        if (   empty($x)
593
+        if (empty($x)
594 594
             || empty($y)
595 595
             || empty($color)) {
596 596
             //This is a bit silly, but here for backwards compatibility...
Please login to merge, or discard this patch.
lib/midcom/services/rcs/main.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
             $backend->update($message);
66 66
             return true;
67
-        } catch (midcom_error $e) {
67
+        }
68
+        catch (midcom_error $e) {
68 69
             debug_add('RCS: Could not save file!');
69 70
             $e->log();
70 71
             return false;
Please login to merge, or discard this patch.
lib/midcom/services/rcs/backend/rcs.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,11 @@
 block discarded – undo
50 50
         $filepath = $this->generate_filename();
51 51
         try {
52 52
             $this->exec('co -q -f -r' . escapeshellarg(trim($revision)) . " {$filepath} 2>/dev/null");
53
-        } catch (midcom_error $e) {
53
+        }
54
+        catch (midcom_error $e) {
54 55
             $e->log();
55
-        } finally {
56
+        }
57
+        finally {
56 58
             if (!file_exists($filepath)) {
57 59
                 return [];
58 60
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 $revisions[$history['revision']] = $history;
92 92
 
93 93
                 $i += 3;
94
-                while (   $i < $total
94
+                while ($i < $total
95 95
                         && !str_starts_with($lines[$i], '----')
96 96
                         && !str_starts_with($lines[$i], '=====')) {
97 97
                     $i++;
Please login to merge, or discard this patch.
lib/midcom/helper/misc.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,8 @@
 block discarded – undo
55 55
     {
56 56
         try {
57 57
             return eval("return [{$data}\n];");
58
-        } catch (ParseError $e) {
58
+        }
59
+        catch (ParseError $e) {
59 60
             throw new midcom_error('Failed to parse config data: ' . $e->getMessage() . ' in ' . $path . ' line ' . $e->getLine());
60 61
         }
61 62
     }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/captchaType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
     public function buildForm(FormBuilderInterface $builder, array $options)
44 44
     {
45 45
         $session_key = md5($builder->getForm()->getName() . '_session_key');
46
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($session_key) {
46
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($session_key) {
47 47
             $value = $event->getForm()->getData();
48 48
             $session = new midcom_services_session('midcom_datamanager_captcha');
49 49
 
50
-            if (   !$session->exists($session_key)
50
+            if (!$session->exists($session_key)
51 51
                 || $value != $session->get($session_key)) {
52 52
                 $event->getForm()->addError(new FormError($this->l10n->get('captcha validation failed')));
53 53
             }
Please login to merge, or discard this patch.