Code cleanup in builder

This commit is contained in:
Chris 2017-01-10 17:13:10 +01:00
parent 213997b0d0
commit 9037c31599

View File

@ -58,13 +58,12 @@ class PharBuilder
printf("\r\e[K%d/%d %s", $i, $t, $tp); printf("\r\e[K%d/%d %s", $i, $t, $tp);
} }
$size_tot += filesize($file->src);
if (fnmatch("*.php",$file->src) && (!$verbatim)) { if (fnmatch("*.php",$file->src) && (!$verbatim)) {
$min = php_strip_whitespace($file->src); $min = php_strip_whitespace($file->src);
$size_tot += filesize($file->src);
$size_min += strlen($min); $size_min += strlen($min);
$phar->addFromString($file->dest?:$file->src, $min); $phar->addFromString($file->dest?:$file->src, $min);
} else { } else {
$size_tot += filesize($file->src);
$size_min += filesize($file->src); $size_min += filesize($file->src);
$phar->addFile($file->src, $file->dest); $phar->addFile($file->src, $file->dest);
} }