Skip to content

Commit 340142f

Browse files
author
Yoav Kadosh
committed
Merge pull request #1 from askupasoftware/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents f937e18 + d464ee6 commit 340142f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ public static function get_instance()
5454
*/
5555
public function init()
5656
{
57-
add_action( 'wp_print_styles', array( $this, 'print_compiled_style' ) );
57+
add_action('wp_print_styles', array($this, 'print_compiled_style'));
5858
}
5959

6060
/**
6161
* Add a style path to the pool of styles to be compiled
6262
*
6363
* @param type $path The absolute path to the dynamic style
6464
*/
65-
public function enqueue_style( $path )
65+
public function enqueue_style($path)
6666
{
6767
$this->styles[] = $path;
6868
}
@@ -73,12 +73,12 @@ public function enqueue_style( $path )
7373
public function print_compiled_style()
7474
{
7575
ob_start();
76-
foreach( $this->styles as $style )
76+
foreach ($this->styles as $style)
7777
{
7878
include $style;
7979
echo "\n";
8080
}
81-
$css = $this->parse_css( ob_get_clean() );
81+
$css = $this->parse_css(ob_get_clean());
8282
include 'style.phtml';
8383
}
8484

@@ -93,10 +93,10 @@ public function print_compiled_style()
9393
* @return string The compiled CSS after converting the variables to their
9494
* corresponding values
9595
*/
96-
public function parse_css( $css )
96+
public function parse_css($css)
9797
{
9898
return preg_replace_callback('#\$([\w]+)#', function($matches) {
99-
return apply_filters( 'wp_dynamic_css_get_variable_value', $matches[1]);
99+
return apply_filters('wp_dynamic_css_get_variable_value', $matches[1]);
100100
}, $css);
101101
}
102102
}

0 commit comments

Comments
 (0)