@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | public function __construct( Utility $utility ) |
14 | 14 | { |
15 | - $this->utility = $utility; |
|
15 | + $this->utility = $utility; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function capture() |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | public function printFiltersFor( $hook = '' ) |
46 | 46 | { |
47 | 47 | global $wp_filter; |
48 | - if( empty( $hook ) || !isset( $wp_filter[$hook] ))return; |
|
49 | - $this->printF( $wp_filter[ $hook ] ); |
|
48 | + if( empty( $hook ) || !isset( $wp_filter[$hook] ) )return; |
|
49 | + $this->printF( $wp_filter[$hook] ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function printTemplatePaths() |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | $templates = array_map( function( $key, $value ) { |
56 | 56 | return sprintf( '[%s] => %s', $key, $value ); |
57 | 57 | }, array_keys( $this->templatePaths ), $this->templatePaths ); |
58 | - $this->printF( implode( "\n", $templates )); |
|
58 | + $this->printF( implode( "\n", $templates ) ); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function storeTemplatePath( $template ) |
62 | 62 | { |
63 | - if( is_string( $template )) { |
|
64 | - $this->templatePaths[] = $this->utility->trimLeft( $template, trailingslashit( WP_CONTENT_DIR )); |
|
63 | + if( is_string( $template ) ) { |
|
64 | + $this->templatePaths[] = $this->utility->trimLeft( $template, trailingslashit( WP_CONTENT_DIR ) ); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | if( $args == 1 ) { |
73 | 73 | printf( '<div class="print__r"><pre>%s</pre></div>', |
74 | - htmlspecialchars( print_r( func_get_arg(0), true ), ENT_QUOTES, 'UTF-8' ) |
|
74 | + htmlspecialchars( print_r( func_get_arg( 0 ), true ), ENT_QUOTES, 'UTF-8' ) |
|
75 | 75 | ); |
76 | 76 | } |
77 | 77 | else if( $args > 1 ) { |
@@ -4,8 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | use GeminiLabs\Castor\Helpers\Utility; |
6 | 6 | |
7 | -class Development |
|
8 | -{ |
|
7 | +class Development { |
|
9 | 8 | public $templatePaths = []; |
10 | 9 | |
11 | 10 | protected $utility; |
@@ -45,13 +44,17 @@ discard block |
||
45 | 44 | public function printFiltersFor( $hook = '' ) |
46 | 45 | { |
47 | 46 | global $wp_filter; |
48 | - if( empty( $hook ) || !isset( $wp_filter[$hook] ))return; |
|
47 | + if( empty( $hook ) || !isset( $wp_filter[$hook] )) { |
|
48 | + return; |
|
49 | + } |
|
49 | 50 | $this->printF( $wp_filter[ $hook ] ); |
50 | 51 | } |
51 | 52 | |
52 | 53 | public function printTemplatePaths() |
53 | 54 | { |
54 | - if( !$this->isDev() )return; |
|
55 | + if( !$this->isDev() ) { |
|
56 | + return; |
|
57 | + } |
|
55 | 58 | $templates = array_map( function( $key, $value ) { |
56 | 59 | return sprintf( '[%s] => %s', $key, $value ); |
57 | 60 | }, array_keys( $this->templatePaths ), $this->templatePaths ); |