Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 52 deletions.
5 changes: 3 additions & 2 deletions src/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -101,7 +101,8 @@ public function writeLine($text = "", $color = null, $bgColor = null)
} elseif ($width == $consoleWidth) {
$this->write($text, $color, $bgColor);
} else {
$this->write($text . "\n", $color, $bgColor);
$this->write($text, $color, $bgColor);
$this->write("\n");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Posix.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -43,8 +43,8 @@ class Posix extends AbstractAdapter
*/
protected static $ansiColorMap = array(
'fg' => array(
Color::NORMAL => '22;39m',
Color::RESET => '22;39m',
Color::NORMAL => '22;39',
Color::RESET => '22;39',

Color::BLACK => '0;30',
Color::RED => '0;31',
Expand All @@ -65,8 +65,8 @@ class Posix extends AbstractAdapter
Color::LIGHT_WHITE => '1;37',
),
'bg' => array(
Color::NORMAL => '0;49m',
Color::RESET => '0;49m',
Color::NORMAL => '0;49',
Color::RESET => '0;49',

Color::BLACK => '40',
Color::RED => '41',
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Virtual.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Windows.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -59,7 +59,7 @@ public function getWidth()
}

if (count($this->probeResult) && (int) $this->probeResult[0]) {
$width = (int)$this->probeResult[0];
$width = (int) $this->probeResult[0];
} else {
$width = parent::getWidth();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/WindowsAnsicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/Ascii.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/AsciiExtended.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/CharsetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/DECSG.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/Utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Charset/Utf8Heavy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ColorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
16 changes: 11 additions & 5 deletions src/Getopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -193,7 +193,7 @@ class Getopt
/**
* State of the options: parsed or not yet parsed?
*
* @var boolean
* @var bool
*/
protected $parsed = false;

Expand Down Expand Up @@ -255,7 +255,7 @@ public function __get($key)
* Test whether a given option has been seen.
*
* @param string $key
* @return boolean
* @return bool
*/
public function __isset($key)
{
Expand Down Expand Up @@ -565,6 +565,9 @@ public function getUsageMessage()
$maxLen = 20;
$lines = array();
foreach ($this->rules as $rule) {
if (isset($rule['isFreeformFlag'])) {
continue;
}
$flags = array();
if (is_array($rule['alias'])) {
foreach ($rule['alias'] as $flag) {
Expand Down Expand Up @@ -634,7 +637,7 @@ public function setAliases($aliasMap)
/**
* Define help messages for options.
*
* The parameter $help_map is an associative array
* The parameter $helpMap is an associative array
* mapping option name (short or long) to the help string.
*
* @param array $helpMap
Expand Down Expand Up @@ -763,7 +766,10 @@ protected function _parseSingleOption($flag, &$argv)
// Magic methods in future will use this mark as real flag value
$this->ruleMap[$flag] = $flag;
$realFlag = $flag;
$this->rules[$realFlag] = array('param' => 'optional');
$this->rules[$realFlag] = array(
'param' => 'optional',
'isFreeformFlag' => true
);
} else {
$realFlag = $this->ruleMap[$flag];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Prompt/AbstractPrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Prompt/Char.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -137,15 +137,15 @@ public function show()
}

/**
* @param boolean $allowEmpty
* @param bool $allowEmpty
*/
public function setAllowEmpty($allowEmpty)
{
$this->allowEmpty = $allowEmpty;
}

/**
* @return boolean
* @return bool
*/
public function getAllowEmpty()
{
Expand Down Expand Up @@ -185,31 +185,31 @@ public function getAllowedChars()
}

/**
* @param boolean $ignoreCase
* @param bool $ignoreCase
*/
public function setIgnoreCase($ignoreCase)
{
$this->ignoreCase = $ignoreCase;
}

/**
* @return boolean
* @return bool
*/
public function getIgnoreCase()
{
return $this->ignoreCase;
}

/**
* @param boolean $echo
* @param bool $echo
*/
public function setEcho($echo)
{
$this->echo = $echo;
}

/**
* @return boolean
* @return bool
*/
public function getEcho()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Prompt/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Prompt/Line.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Console
*/
Expand Down Expand Up @@ -70,15 +70,15 @@ public function show()
}

/**
* @param boolean $allowEmpty
* @param bool $allowEmpty
*/
public function setAllowEmpty($allowEmpty)
{
$this->allowEmpty = $allowEmpty;
}

/**
* @return boolean
* @return bool
*/
public function getAllowEmpty()
{
Expand Down
Loading

0 comments on commit 48bc01e

Please sign in to comment.