protected function addFile(Phar $phar, SplFileInfo $file, $strip = true)
{
$path = strtr(str_replace(dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR, '', $file->getRealPath()), '\\', '/');
$content = $file->getContents();
if ($strip) {
$content = $this->stripWhitespace($content);
} elseif ('LICENSE' === $file->getBasename()) {
$content = "\n" . $content . "\n";
}
if ($path === 'src/Composer/Composer.php') {
$content = str_replace('@package_version@', $this->version, $content);
$content = str_replace('@release_date@', $this->versionDate, $content);
}
$phar->addFromString($path, $content);
return $this;
}