From a8aef7e2036dfa4d834e0e410acb64e7397ccf74 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 17 Feb 2012 12:19:29 +0100 Subject: [PATCH] Text tweaks --- src/Composer/Util/RemoteFilesystem.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index eedba8e64..c782ea83e 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -120,7 +120,7 @@ class RemoteFilesystem } if (false === $result) { - throw new \RuntimeException("the '$fileUrl' file could not be downloaded"); + throw new \RuntimeException("The '$fileUrl' file could not be downloaded"); } } @@ -141,7 +141,7 @@ class RemoteFilesystem case STREAM_NOTIFY_FAILURE: // for private repository returning 404 error when the authorization is incorrect $auth = $this->io->getAuthorization($this->originUrl); - $ps = $this->firstCall && 404 === $messageCode && null === $auth['username']; + $attemptAuthentication = $this->firstCall && 404 === $messageCode && null === $auth['username']; if (404 === $messageCode && !$this->firstCall) { throw new \RuntimeException("The '" . $this->fileUrl . "' URL not found"); @@ -150,18 +150,18 @@ class RemoteFilesystem $this->firstCall = false; // get authorization informations - if (401 === $messageCode || $ps) { + if (401 === $messageCode || $attemptAuthentication) { if (!$this->io->isInteractive()) { $mess = "The '" . $this->fileUrl . "' URL was not found"; - if (401 === $code || $ps) { - $mess = "The '" . $this->fileUrl . "' URL required the authorization.\nYou must be using the interactive console"; + if (401 === $code || $attemptAuthentication) { + $mess = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console"; } throw new \RuntimeException($mess); } - $this->io->overwrite(' Authorization required ('.parse_url($this->fileUrl, PHP_URL_HOST).'):'); + $this->io->overwrite(' Authentication required ('.parse_url($this->fileUrl, PHP_URL_HOST).'):'); $username = $this->io->ask(' Username: '); $password = $this->io->askAndHideAnswer(' Password: '); $this->io->setAuthorization($this->originUrl, $username, $password);