From 1e9cb6bac898ebffea5fed61a322a415009c91a0 Mon Sep 17 00:00:00 2001 From: Beau Simensen Date: Sat, 10 Mar 2012 10:26:03 -0800 Subject: [PATCH] Use factory name instead of generator. --- src/Composer/Repository/Vcs/GitHubDriver.php | 8 ++++---- src/Composer/Repository/Vcs/VcsDriver.php | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index dd7bc1c99..6566d2b22 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -33,15 +33,15 @@ class GitHubDriver extends VcsDriver * @param string $url * @param IOInterface $io * @param ProcessExecutor $process - * @param callable $remoteFilesystemGenerator + * @param callable $remoteFilesystemFactory */ - public function __construct($url, IOInterface $io, ProcessExecutor $process = null, $remoteFilesystemGenerator = null) + public function __construct($url, IOInterface $io, ProcessExecutor $process = null, $remoteFilesystemFactory = null) { preg_match('#^(?:https?|git)://github\.com/([^/]+)/(.+?)(?:\.git)?$#', $url, $match); $this->owner = $match[1]; $this->repository = $match[2]; - parent::__construct($url, $io, $process, $remoteFilesystemGenerator); + parent::__construct($url, $io, $process, $remoteFilesystemFactory); } /** @@ -216,7 +216,7 @@ class GitHubDriver extends VcsDriver $this->generateSshUrl(), $this->io, $this->process, - $this->remoteFilesystemGenerator + $this->remoteFilesystemFactory ); $this->gitDriver->initialize(); return; diff --git a/src/Composer/Repository/Vcs/VcsDriver.php b/src/Composer/Repository/Vcs/VcsDriver.php index 2ecfaebc2..c2f65a7d8 100644 --- a/src/Composer/Repository/Vcs/VcsDriver.php +++ b/src/Composer/Repository/Vcs/VcsDriver.php @@ -27,7 +27,7 @@ abstract class VcsDriver implements VcsDriverInterface protected $url; protected $io; protected $process; - protected $remoteFilesystemGenerator; + protected $remoteFilesystemFactory; /** * Constructor. @@ -35,14 +35,14 @@ abstract class VcsDriver implements VcsDriverInterface * @param string $url The URL * @param IOInterface $io The IO instance * @param ProcessExecutor $process Process instance, injectable for mocking - * @param callable $remoteFilesystemGenerator Generates Remote Filesystem, injectable for mocking + * @param callable $remoteFilesystemFactory Remote Filesystem factory, injectable for mocking */ - public function __construct($url, IOInterface $io, ProcessExecutor $process = null, $remoteFilesystemGenerator = null) + public function __construct($url, IOInterface $io, ProcessExecutor $process = null, $remoteFilesystemFactory = null) { $this->url = $url; $this->io = $io; $this->process = $process ?: new ProcessExecutor; - $this->remoteFilesystemGenerator = $remoteFilesystemGenerator ?: function() use ($io) { + $this->remoteFilesystemFactory = $remoteFilesystemFactory ?: function() use ($io) { return new RemoteFilesystem($io); }; } @@ -85,7 +85,7 @@ abstract class VcsDriver implements VcsDriverInterface */ protected function getContents($url) { - $rfs = call_user_func($this->remoteFilesystemGenerator); + $rfs = call_user_func($this->remoteFilesystemFactory); return $rfs->getContents($this->url, $url, false); }