Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raulfraile committed Dec 8, 2014
1 parent ff994b1 commit 1deeb84
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ app/config/parameters.ini
app/config/parameters.yml

# Composer
composer.phar
composer.phar
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ before_script:

script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then phpunit --verbose; fi;'
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ~/.phpenv/versions/$(phpenv version-name)/bin/phpunit; fi;'
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ~/.phpenv/versions/$(phpenv version-name)/bin/phpunit; fi;'
2 changes: 1 addition & 1 deletion examples/format_chooser.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
->addFilesWithDifferentExtensions('http://get.symfony.com/Symfony_Standard_Vendors_2.5.3', ['zip', 'tgz'])
->getPreferredFile();

echo $preferredFile . \PHP_EOL;
echo $preferredFile . \PHP_EOL;
2 changes: 1 addition & 1 deletion src/Extractor/Util/ProcessExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ public static function escape($argument)
{
return ProcessUtils::escapeArgument($argument);
}
}
}
18 changes: 1 addition & 17 deletions src/Method/Extension/PharData.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public function extract($file, $target, Format\FormatInterface $format)
$this->checkSupport($format);

try {
$pharFormat = $this->getPharFormat($format);
$archive = new \PharData($file/*, null, null, $pharFormat*/);
$archive = new \PharData($file);
$archive->extractTo($target, null, true);
} catch (\Exception $e) {
return false;
Expand All @@ -40,21 +39,6 @@ public function extract($file, $target, Format\FormatInterface $format)
return true;
}

/**
* Gets the format of the phar file.
* @param FormatInterface $format
*
* @return int|null
*/
protected function getPharFormat(Format\FormatInterface $format)
{
if ($format instanceof Format\Tar || $format instanceof Format\TarBz2 || $format instanceof Format\TarGz) {
return \Phar::TAR;
}

return null;
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 1deeb84

Please sign in to comment.