Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2 from Mecanik/Issue#1
Browse files Browse the repository at this point in the history
Added static in method implementation
  • Loading branch information
jruvinski authored Jan 12, 2020
2 parents 812881e + 65d27e5 commit 4608319
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Engine/ZF3TurboCSSEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct()
{
}

public function minify_css_callback($matches)
public static function minify_css_callback($matches)
{
//print_r($matches);

Expand All @@ -37,7 +37,7 @@ public function minify_css_callback($matches)
return "{$openStyleTag}{$css}</style>";
}

protected function removeComments($data)
protected static function removeComments($data)
{
if (false !== strpos($data, '/*')) {
$data = str_replace("/*","_COMSTART",$data);
Expand All @@ -48,7 +48,7 @@ protected function removeComments($data)
return $data;
}

protected function removeCdata($data)
protected static function removeCdata($data)
{
if (false !== strpos($data, '<![CDATA[')) {
$data = str_replace('//<![CDATA[', '', $data);
Expand All @@ -62,7 +62,7 @@ protected function removeCdata($data)
return $data;
}

protected function removeSpaces($data)
protected static function removeSpaces($data)
{
$data = preg_replace("/\s+/u", " ", $data);
$data = str_replace(' ', '', $data);
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/ZF3TurboHTMLEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct()
{
}

public function remove_comments_callback($matches)
public static function remove_comments_callback($matches)
{
return (0 === strpos($matches[1], '[') || false !== strpos($matches[1], '<![')) ? $matches[0] : '';
}
Expand Down
6 changes: 3 additions & 3 deletions src/Engine/ZF3TurboJSEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct()
{
}

public function minify_js_callback($matches)
public static function minify_js_callback($matches)
{

$openScriptTag = "<script{$matches[2]}";
Expand All @@ -32,14 +32,14 @@ public function minify_js_callback($matches)
return "{$openScriptTag}{$js}</script>";
}

protected function removeComments($data)
protected static function removeComments($data)
{
$data = preg_replace('/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\\\|\')\/\/.*))/u', '', $data);

return $data;
}

protected function removeSpaces($data)
protected static function removeSpaces($data)
{
// remove whitespace from start - end
$data = trim($data);
Expand Down

0 comments on commit 4608319

Please sign in to comment.