1
0
Fork 0

Fixed CS and unused variables

pull/104/head
Per Bernhardt 2011-11-10 13:10:05 +01:00
parent ee4d4ee3fa
commit 3e5fd85768
2 changed files with 24 additions and 23 deletions

View File

@ -19,6 +19,7 @@ use Composer\Package\PackageInterface;
*/
class HgDownloader implements DownloaderInterface
{
/**
* {@inheritDoc}
*/

View File

@ -121,7 +121,7 @@ class HgDriver implements VcsDriverInterface
{
if (null === $this->tags) {
exec(sprintf('cd %s && hg tags --color never', escapeshellarg($this->tmpDir)), $output);
foreach ($output as $key => $tag) {
foreach ($output as $tag) {
preg_match('(^([^\s]+)[\s]+[\d+]:(.*)$)', $tag, $match);
$tags[$match[1]] = $match[2];
}
@ -141,7 +141,7 @@ class HgDriver implements VcsDriverInterface
$branches = array();
exec(sprintf('cd %s && hg branches --color never', escapeshellarg($this->tmpDir)), $output);
foreach ($output as $key => $branch) {
foreach ($output as $branch) {
preg_match('(^([^\s]+)[\s]+[\d+]:(.*)$)', $branch, $match);
$branches[$match[1]] = $match[2];
}