Passed
Push — master ( e26094...28949d )
by Paul
02:50
created
plugin/Modules/Templates.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,12 +30,15 @@
 block discarded – undo
30 30
             && class_exists('\GeminiLabs\Castor\Helpers\Development')
31 31
             && method_exists('\GeminiLabs\Castor\Helpers\Development', 'templatePaths')) { // @phpstan-ignore-line
32 32
             $this->entries = \GeminiLabs\Castor\Facades\Development::templatePaths();
33
-        } else {
34
-            $files = array_values(array_filter(get_included_files(), function ($file) {
33
+        }
34
+        else {
35
+            $files = array_values(array_filter(get_included_files(), function ($file)
36
+            {
35 37
                 $bool = false !== strpos($file, '/themes/') && false === strpos($file, '/functions.php');
36 38
                 return (bool) apply_filters('blackbar/templates/file', $bool, $file);
37 39
             }));
38
-            $this->entries = array_map(function ($file) {
40
+            $this->entries = array_map(function ($file)
41
+            {
39 42
                 return str_replace(trailingslashit(WP_CONTENT_DIR), '', $file);
40 43
             }, $files);
41 44
         }
Please login to merge, or discard this patch.
plugin/Modules/Console.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,7 +87,8 @@  discard block
 block discarded – undo
87 87
         if ($errorCount > 0) {
88 88
             $class = 'glbb-error';
89 89
             $label = sprintf('%s (%d, %d!)', $label, $entryCount, $errorCount);
90
-        } elseif ($entryCount > 0) {
90
+        }
91
+        elseif ($entryCount > 0) {
91 92
             $label = sprintf('%s (%d)', $label, $entryCount);
92 93
         }
93 94
         return sprintf('<span class="%s">%s</span>', $class, $label);
@@ -106,7 +107,8 @@  discard block
 block discarded – undo
106 107
             if (array_key_exists((int) $errno, static::ERROR_CODES)) {
107 108
                 $errname = static::ERROR_CODES[$errno];
108 109
             }
109
-        } else {
110
+        }
111
+        else {
110 112
             // entry likely stored by filter hook
111 113
             $errname = 'Debug';
112 114
             if (array_key_exists($errno, static::MAPPED_ERROR_CODES)) {
@@ -118,7 +120,8 @@  discard block
 block discarded – undo
118 120
         $hash = md5($errno.$errname.$message.$location);
119 121
         if (array_key_exists($hash, $this->entries)) {
120 122
             ++$this->entries[$hash]['count'];
121
-        } else {
123
+        }
124
+        else {
122 125
             $this->entries[$hash] = [
123 126
                 'count' => 0,
124 127
                 'errname' => $errname,
@@ -132,9 +135,11 @@  discard block
 block discarded – undo
132 135
     {
133 136
         if ($message instanceof \DateTime) {
134 137
             $message = $message->format('Y-m-d H:i:s');
135
-        } elseif (is_object($message) || is_array($message)) {
138
+        }
139
+        elseif (is_object($message) || is_array($message)) {
136 140
             $message = print_r(json_decode(json_encode($message)), true);
137
-        } else {
141
+        }
142
+        else {
138 143
             $message = esc_html(trim((string) $message));
139 144
         }
140 145
         $location = trim($location);
Please login to merge, or discard this patch.
plugin/Modules/Actions.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,9 +58,11 @@
 block discarded – undo
58 58
                         // }
59 59
                     }
60 60
                     $this->hooks[$action]['callbacks'][$priority][] = sprintf('%s::%s', $object, $method);
61
-                } elseif (is_object($callback['function'])) {
61
+                }
62
+                elseif (is_object($callback['function'])) {
62 63
                     $this->hooks[$action]['callbacks'][$priority][] = get_class($callback['function']);
63
-                } else {
64
+                }
65
+                else {
64 66
                     $this->hooks[$action]['callbacks'][$priority][] = $callback['function'];
65 67
                 }
66 68
                 ++$this->hooks[$action]['callbacks_count'];
Please login to merge, or discard this patch.
views/panels/queries.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,12 @@
 block discarded – undo
8 8
             </tr>
9 9
         </tbody>
10 10
     </table>
11
-<?php else : ?>
11
+<?php else {
12
+	: ?>
12 13
     <form method="get" class="glbb-queries-filter">
13
-        <input class="glbb-input" type="text" name="glbb_query_filter" id="glbb_query_filter" placeholder="<?= __('Find Queries Containing', 'blackbar'); ?>">
14
+        <input class="glbb-input" type="text" name="glbb_query_filter" id="glbb_query_filter" placeholder="<?= __('Find Queries Containing', 'blackbar');
15
+}
16
+?>">
14 17
         <input class="glbb-input glbb-input-small" type="text" name="glbb_query_min_time" id="glbb_query_min_time" placeholder="<?= __('Minimum Execution Time', 'blackbar'); ?>">
15 18
     </form>
16 19
     <table class="glbb-queries-table">
Please login to merge, or discard this patch.
views/panels/profiler.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,8 @@  discard block
 block discarded – undo
7 7
                 <td><?= __('No entries found.', 'blackbar'); ?></td>
8 8
             </tr>
9 9
         </tbody>
10
-    <?php else : ?>
10
+    <?php else {
11
+	: ?>
11 12
         <thead>
12 13
             <tr>
13 14
                 <th>Message</th>
@@ -18,7 +19,9 @@  discard block
 block discarded – undo
18 19
         <tbody>
19 20
             <?php foreach ($profiler->entries() as $entry) : ?>
20 21
                 <tr>
21
-                    <td><?= esc_html($entry['name']); ?></td>
22
+                    <td><?= esc_html($entry['name']);
23
+}
24
+?></td>
22 25
                     <td style="text-align: right;"><?= esc_html(sprintf('%.2f', $entry['time'])); ?> ms</td>
23 26
                     <td style="text-align: right;"><?= esc_html($entry['memory']); ?> KB</td>
24 27
                 </tr>
Please login to merge, or discard this patch.
views/panels/actions.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,12 @@
 block discarded – undo
8 8
             </tr>
9 9
         </tbody>
10 10
     </table>
11
-<?php else : ?>
11
+<?php else {
12
+	: ?>
12 13
     <form method="get" class="glbb-actions-filter">
13
-        <input class="glbb-input" type="text" name="glbb_actions_callback" id="glbb_actions_callback" placeholder="<?= __('Find Callbacks Containing', 'blackbar'); ?>">
14
+        <input class="glbb-input" type="text" name="glbb_actions_callback" id="glbb_actions_callback" placeholder="<?= __('Find Callbacks Containing', 'blackbar');
15
+}
16
+?>">
14 17
         <input class="glbb-input glbb-input-small" type="text" name="glbb_actions_min_time" id="glbb_actions_min_time" placeholder="<?= __('Minimum Total Time', 'blackbar'); ?>">
15 18
     </form>
16 19
     <table style="top:-10px;">
Please login to merge, or discard this patch.
views/panels/console.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,11 +6,14 @@
 block discarded – undo
6 6
             <tr>
7 7
                 <td><?= __('No entries found.', 'blackbar'); ?></td>
8 8
             </tr>
9
-        <?php else : ?>
9
+        <?php else {
10
+	: ?>
10 11
             <?php foreach ($console->entries() as $entry) : ?>
11 12
                 <tr>
12 13
                     <td class="glbb-small">
13
-                        <span class="glbb-info glbb-<?= $entry['errname']; ?>">
14
+                        <span class="glbb-info glbb-<?= $entry['errname'];
15
+}
16
+?>">
14 17
                             <?= esc_html($entry['name']); ?>
15 18
                         </span>
16 19
                     </td>
Please login to merge, or discard this patch.