1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Remove redundant __contruct from VcsDriver implementations and move init code to initialize method

This commit is contained in:
Jerome Tamarelle 2012-04-24 16:58:29 +02:00
parent 017ebabcb5
commit 949728f812
7 changed files with 20 additions and 66 deletions

View file

@ -27,20 +27,14 @@ class GitBitbucketDriver extends VcsDriver implements VcsDriverInterface
protected $rootIdentifier;
protected $infoCache = array();
public function __construct($url, IOInterface $io)
{
preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url, $match);
$this->owner = $match[1];
$this->repository = $match[2];
parent::__construct($url, $io);
}
/**
* {@inheritDoc}
*/
public function initialize()
{
preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $this->url, $match);
$this->owner = $match[1];
$this->repository = $match[2];
}
/**