Skip to content

Commit

Permalink
- Avoiding a useless else() call. (Subs-CachePHP.php)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nao committed Feb 26, 2017
1 parent dc13cf0 commit 47060c5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions core/app/Subs-CachePHP.php
Expand Up @@ -48,14 +48,7 @@ function minify_php($file, $remove_whitespace = false)
break;

$look_for = $php[$pos];
if ($look_for === '/')
{
if ($php[$pos + 1] === '/') // Remove //
$look_for = array("\r", "\n", "\r\n");
else // Remove /* ... */
$look_for = '*/';
}
else
if ($look_for !== '/')
{
$next = find_next($php, $pos + 1, $look_for);
if ($next === false) // Shouldn't be happening.
Expand All @@ -67,6 +60,11 @@ function minify_php($file, $remove_whitespace = false)
continue;
}

if ($php[$pos + 1] === '/') // Remove //
$look_for = array("\r", "\n", "\r\n");
else // Remove /* ... */
$look_for = '*/';

$end = find_next($php, $pos + 1, $look_for);
if ($end === false)
break;
Expand Down

0 comments on commit 47060c5

Please sign in to comment.