1
0
Fork 0

Fix whitespaces and add strict return code checking

pull/154/head
Matthias Pigulla 2011-12-12 10:57:57 +01:00
parent 8ab60b7030
commit ebbc807de0
3 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ class ComposerRepository extends ArrayRepository
public function __construct(array $config) public function __construct(array $config)
{ {
if (!preg_match('{^\w+://}', $config['url'])) { if (!preg_match('{^\w+://}', $config['url'])) {
// assume http as the default protocol // assume http as the default protocol
$config['url'] = 'http://'.$config['url']; $config['url'] = 'http://'.$config['url'];
} }
$config['url'] = rtrim($config['url'], '/'); $config['url'] = rtrim($config['url'], '/');

View File

@ -181,6 +181,6 @@ class HgDriver implements VcsDriverInterface
} }
exec(sprintf('hg identify %s', escapeshellarg($url)), $ignored, $exit); exec(sprintf('hg identify %s', escapeshellarg($url)), $ignored, $exit);
return $exit == 0; return $exit === 0;
} }
} }

View File

@ -179,6 +179,6 @@ class SvnDriver implements VcsDriverInterface
} }
exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), $ignored, $exit); exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), $ignored, $exit);
return $exit == 0; return $exit === 0;
} }
} }