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

Removed last password/username from IOInterface

This commit is contained in:
Jordi Boggiano 2012-05-06 17:17:36 +02:00
parent 6967ec16b3
commit c754f96677
7 changed files with 4 additions and 130 deletions

View file

@ -22,6 +22,7 @@ use Symfony\Component\Console\Helper\HelperSet;
* The Input/Output helper.
*
* @author François Pluchino <francois.pluchino@opendisplay.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ConsoleIO implements IOInterface
{
@ -29,8 +30,6 @@ class ConsoleIO implements IOInterface
protected $output;
protected $helperSet;
protected $authorizations = array();
protected $lastUsername;
protected $lastPassword;
protected $lastMessage;
/**
@ -179,22 +178,6 @@ class ConsoleIO implements IOInterface
return $this->ask($question);
}
/**
* {@inheritDoc}
*/
public function getLastUsername()
{
return $this->lastUsername;
}
/**
* {@inheritDoc}
*/
public function getLastPassword()
{
return $this->lastPassword;
}
/**
* {@inheritDoc}
*/
@ -209,6 +192,7 @@ class ConsoleIO implements IOInterface
public function hasAuthorization($repositoryName)
{
$auths = $this->getAuthorizations();
return isset($auths[$repositoryName]);
}
@ -218,6 +202,7 @@ class ConsoleIO implements IOInterface
public function getAuthorization($repositoryName)
{
$auths = $this->getAuthorizations();
return isset($auths[$repositoryName]) ? $auths[$repositoryName] : array('username' => null, 'password' => null);
}
@ -226,11 +211,6 @@ class ConsoleIO implements IOInterface
*/
public function setAuthorization($repositoryName, $username, $password = null)
{
$auths = $this->getAuthorizations();
$auths[$repositoryName] = array('username' => $username, 'password' => $password);
$this->authorizations = $auths;
$this->lastUsername = $username;
$this->lastPassword = $password;
$this->authorizations[$repositoryName] = array('username' => $username, 'password' => $password);
}
}