@@ -119,7 +119,9 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function initProfiler() |
121 | 121 | { |
122 | - if( func_get_arg(0) != static::DEBUG )return; |
|
122 | + if( func_get_arg(0) != static::DEBUG ) { |
|
123 | + return; |
|
124 | + } |
|
123 | 125 | $this->profiler->trace( func_get_arg(1) ); |
124 | 126 | } |
125 | 127 | |
@@ -140,7 +142,9 @@ discard block |
||
140 | 142 | public function render( $view, array $data = array() ) |
141 | 143 | { |
142 | 144 | $file = $this->path( sprintf( 'views/%s.php', str_replace( '.php', '', $view ))); |
143 | - if( !file_exists( $file ))return; |
|
145 | + if( !file_exists( $file )) { |
|
146 | + return; |
|
147 | + } |
|
144 | 148 | extract( $data ); |
145 | 149 | include $file; |
146 | 150 | } |
@@ -219,12 +223,14 @@ discard block |
||
219 | 223 | */ |
220 | 224 | protected function getIncludedFiles() |
221 | 225 | { |
222 | - $includes = array_values( array_filter( get_included_files(), function( $include ) { |
|
226 | + $includes = array_values( array_filter( get_included_files(), function( $include ) |
|
227 | + { |
|
223 | 228 | $bool = strpos( $include, '/themes/' ) !== false |
224 | 229 | && strpos( $include, '/functions.php' ) === false; |
225 | 230 | return (bool)apply_filters( 'blackbar/templates/include', $bool, $include ); |
226 | 231 | })); |
227 | - return array_map( function( $key, $value ) { |
|
232 | + return array_map( function( $key, $value ) |
|
233 | + { |
|
228 | 234 | $value = str_replace( trailingslashit( WP_CONTENT_DIR ), '', $value ); |
229 | 235 | return sprintf( '[%s] => %s', $key, $value ); |
230 | 236 | }, array_keys( $includes ), $includes ); |
@@ -257,7 +263,8 @@ discard block |
||
257 | 263 | 'SET', |
258 | 264 | 'WHERE', |
259 | 265 | ); |
260 | - $replace = array_map( function( $value ) { |
|
266 | + $replace = array_map( function( $value ) |
|
267 | + { |
|
261 | 268 | return PHP_EOL.$value; |
262 | 269 | }, $search ); |
263 | 270 | foreach( $wpdb->queries as $query ) { |
@@ -296,7 +303,9 @@ discard block |
||
296 | 303 | */ |
297 | 304 | protected function getTemplates() |
298 | 305 | { |
299 | - if( is_admin() )return; |
|
306 | + if( is_admin() ) { |
|
307 | + return; |
|
308 | + } |
|
300 | 309 | if( class_exists( '\GeminiLabs\Castor\Facades\Development' )) { |
301 | 310 | ob_start(); |
302 | 311 | \GeminiLabs\Castor\Facades\Development::printTemplatePaths(); |