@@ -168,11 +168,13 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | protected function getIncludedFiles(): array |
| 170 | 170 | { |
| 171 | - $files = array_values(array_filter(get_included_files(), function ($file) { |
|
| 171 | + $files = array_values(array_filter(get_included_files(), function ($file) |
|
| 172 | + { |
|
| 172 | 173 | $bool = false !== strpos($file, '/themes/') && false === strpos($file, '/functions.php'); |
| 173 | 174 | return (bool) apply_filters('blackbar/templates/file', $bool, $file); |
| 174 | 175 | })); |
| 175 | - return array_map(function ($key, $value) { |
|
| 176 | + return array_map(function ($key, $value) |
|
| 177 | + { |
|
| 176 | 178 | $value = str_replace(trailingslashit(WP_CONTENT_DIR), '', $value); |
| 177 | 179 | return sprintf('[%s] => %s', $key, $value); |
| 178 | 180 | }, array_keys($files), $files); |
@@ -196,7 +198,8 @@ discard block |
||
| 196 | 198 | 'AND', 'FROM', 'GROUP BY', 'INNER JOIN', 'LEFT JOIN', 'LIMIT', |
| 197 | 199 | 'ON DUPLICATE KEY UPDATE', 'ORDER BY', 'OFFSET', ' SET', 'WHERE', |
| 198 | 200 | ]; |
| 199 | - $replace = array_map(function ($value) { |
|
| 201 | + $replace = array_map(function ($value) |
|
| 202 | + { |
|
| 200 | 203 | return PHP_EOL.$value; |
| 201 | 204 | }, $search); |
| 202 | 205 | foreach ($wpdb->queries as $query) { |
@@ -37,7 +37,8 @@ discard block |
||
| 37 | 37 | if (array_key_exists($errno, static::MAPPED_ERROR_CODES)) { |
| 38 | 38 | $errname = ucfirst($errno); |
| 39 | 39 | $errno = static::MAPPED_ERROR_CODES[$errno]; |
| 40 | - } elseif (array_key_exists($errno, static::ERROR_CODES)) { |
|
| 40 | + } |
|
| 41 | + elseif (array_key_exists($errno, static::ERROR_CODES)) { |
|
| 41 | 42 | $errname = static::ERROR_CODES[$errno]; |
| 42 | 43 | } |
| 43 | 44 | $this->entries[] = [ |
@@ -55,7 +56,8 @@ discard block |
||
| 55 | 56 | { |
| 56 | 57 | if ($value instanceof DateTime) { |
| 57 | 58 | $value = $value->format('Y-m-d H:i:s'); |
| 58 | - } elseif (is_object($value) || is_array($value)) { |
|
| 59 | + } |
|
| 60 | + elseif (is_object($value) || is_array($value)) { |
|
| 59 | 61 | $value = print_r(json_decode(json_encode($value)), true); |
| 60 | 62 | } |
| 61 | 63 | return esc_html((string) $value); |