Passed
Pull Request — master (#8)
by
unknown
10:23 queued 07:53
created
views/panels/console.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,10 +6,13 @@
 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 ($entries as $entry) : ?>
11 12
 		<tr>
12
-			<td class="glbb-small"><?= $entry['name']; ?></td>
13
+			<td class="glbb-small"><?= $entry['name'];
14
+}
15
+?></td>
13 16
 			<td><pre><?= $entry['message']; ?></pre></td>
14 17
 		</tr>
15 18
 		<?php endforeach; ?>
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
@@ -6,14 +6,17 @@
 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 ($actions->getMeasure() as $hook => $flow) : ?>
11 12
 		<tr>
12 13
 			<td class="glbb-smalls"><?php 
13 14
 			// glsr_log($flow); 
14 15
 			?></td>
15 16
 		</tr>
16
-		<?php endforeach; ?>
17
+		<?php endforeach;
18
+}
19
+?>
17 20
 		<?php endif; ?>
18 21
 	</tbody>
19 22
 </table>
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 type="text" name="glbb_query_filter" id="glbb_query_filter" placeholder="<?= __('Find queries containing', 'blackbar'); ?>">
14
+	<input type="text" name="glbb_query_filter" id="glbb_query_filter" placeholder="<?= __('Find queries containing', 'blackbar');
15
+}
16
+?>">
14 17
 	<input 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
@@ -6,10 +6,13 @@
 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 ($profiler->getMeasure() as $timer) : ?>
11 12
 		<tr>
12
-			<td><?= $profiler->getNameString($timer); ?></td>
13
+			<td><?= $profiler->getNameString($timer);
14
+}
15
+?></td>
13 16
 			<td class="glbb-medium"><?= $profiler->getTimeString($timer); ?></td>
14 17
 			<td class="glbb-medium"><?= $profiler->getMemoryString($timer); ?></td>
15 18
 		</tr>
Please login to merge, or discard this patch.
autoload.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@
 block discarded – undo
5 5
 /*
6 6
  * PSR-4 autoloader
7 7
  */
8
-spl_autoload_register(function ($class) {
8
+spl_autoload_register(function ($class)
9
+{
9 10
     $namespaces = [
10 11
         'GeminiLabs\\BlackBar\\' => __DIR__.'/src/',
11 12
         'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/',
Please login to merge, or discard this patch.
compatibility.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,8 @@  discard block
 block discarded – undo
6 6
  * @return array
7 7
  * @see https://docs.gravityforms.com/gform_noconflict_scripts/
8 8
  */
9
-add_filter('gform_noconflict_scripts', function (array $scripts) {
9
+add_filter('gform_noconflict_scripts', function (array $scripts)
10
+{
10 11
     $scripts[] = 'blackbar';
11 12
     return $scripts;
12 13
 });
@@ -15,7 +16,8 @@  discard block
 block discarded – undo
15 16
  * @return array
16 17
  * @see https://docs.gravityforms.com/gform_noconflict_styles/
17 18
  */
18
-add_filter('gform_noconflict_styles', function (array $styles) {
19
+add_filter('gform_noconflict_styles', function (array $styles)
20
+{
19 21
     $styles[] = 'blackbar';
20 22
     $styles[] = 'blackbar-syntax';
21 23
     return $styles;
Please login to merge, or discard this patch.
src/Application.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@  discard block
 block discarded – undo
38 38
         $hash = md5($errno.$errstr.$errfile.$errline);
39 39
         if (array_key_exists($hash, $this->errors)) {
40 40
             ++$this->errors[$hash]['count'];
41
-        } else {
41
+        }
42
+        else {
42 43
             $this->errors[$hash] = array(
43 44
                 'errno' => $errno,
44 45
                 'message' => $errstr,
@@ -60,7 +61,8 @@  discard block
 block discarded – undo
60 61
         add_filter('all', array($controller, 'initProfiler'));
61 62
         add_filter('all', array($controller, 'measureSlowActions'));
62 63
         add_action('plugins_loaded', array($controller, 'registerLanguages'));
63
-        add_action('init', function () use ($controller) {
64
+        add_action('init', function () use ($controller)
65
+        {
64 66
             if (!apply_filters('blackbar/enabled', true)) {
65 67
                 return;
66 68
             }
Please login to merge, or discard this patch.
src/Controller.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,12 +191,14 @@  discard block
 block discarded – undo
191 191
      */
192 192
     protected function getIncludedFiles()
193 193
     {
194
-        $files = array_values(array_filter(get_included_files(), function ($file) {
194
+        $files = array_values(array_filter(get_included_files(), function ($file)
195
+        {
195 196
             $bool = false !== strpos($file, '/themes/')
196 197
                 && false === strpos($file, '/functions.php');
197 198
             return (bool) apply_filters('blackbar/templates/file', $bool, $file);
198 199
         }));
199
-        return array_map(function ($key, $value) {
200
+        return array_map(function ($key, $value)
201
+        {
200 202
             $value = str_replace(trailingslashit(WP_CONTENT_DIR), '', $value);
201 203
             return sprintf('[%s] => %s', $key, $value);
202 204
         }, array_keys($files), $files);
@@ -226,7 +228,8 @@  discard block
 block discarded – undo
226 228
             'AND', 'FROM', 'GROUP BY', 'INNER JOIN', 'LIMIT', 'ON DUPLICATE KEY UPDATE',
227 229
             'ORDER BY', 'SET', 'WHERE',
228 230
         );
229
-        $replace = array_map(function ($value) {
231
+        $replace = array_map(function ($value)
232
+        {
230 233
             return PHP_EOL.$value;
231 234
         }, $search);
232 235
         foreach ($wpdb->queries as $query) {
Please login to merge, or discard this patch.
src/SlowActions.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,11 @@
 block discarded – undo
74 74
                         $object = get_class($object);
75 75
                     }
76 76
                     $this->flow[$action]['callbacks'][$priority][] = sprintf('%s::%s', $object, $method);
77
-                } elseif (is_object($callback['function'])) {
77
+                }
78
+                elseif (is_object($callback['function'])) {
78 79
                     $this->flow[$action]['callbacks'][$priority][] = get_class($callback['function']);
79
-                } else {
80
+                }
81
+                else {
80 82
                     $this->flow[$action]['callbacks'][$priority][] = $callback['function'];
81 83
                 }
82 84
                 ++$this->flow[$action]['callbacks_count'];
Please login to merge, or discard this patch.