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' into rfc/escaper
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 33 deletions.
8 changes: 2 additions & 6 deletions src/Exception.php → src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Console;
namespace Zend\Console\Exception;

/**
* @uses Zend\Exception
* @category Zend
* @package Zend_Console
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Exception
interface ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Console\Exception
implements ExceptionInterface
{

}
5 changes: 1 addition & 4 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Console\Exception;

/**
Expand All @@ -31,7 +28,7 @@
*/
class RuntimeException
extends \RuntimeException
implements \Zend\Console\Exception
implements ExceptionInterface
{
/**
* Usage
Expand Down
33 changes: 14 additions & 19 deletions src/Getopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Console;

/**
Expand Down Expand Up @@ -99,8 +96,6 @@
*
* @todo Feature request to implement callbacks.
* e.g. if -a is specified, run function 'handleOptionA'().
* @uses \Zend\Console\GetoptException
* @uses \Zend\Json\Json
*/
class Getopt
{
Expand Down Expand Up @@ -331,8 +326,8 @@ public function __unset($key)
* These are appended to those defined when the constructor was called.
*
* @param array $argv
* @throws \Zend\Console\Getopt\Exception When not given an array as parameter
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @throws \Zend\Console\Exception\ExceptionInterface When not given an array as parameter
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function addArguments($argv)
{
Expand All @@ -349,8 +344,8 @@ public function addArguments($argv)
* These replace any currently defined.
*
* @param array $argv
* @throws \Zend\Console\Getopt\Exception When not given an array as parameter
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @throws \Zend\Console\Exception\ExceptionInterface When not given an array as parameter
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function setArguments($argv)
{
Expand All @@ -368,7 +363,7 @@ public function setArguments($argv)
* the behavior of Zend_Console_Getopt.
*
* @param array $getoptConfig
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function setOptions($getoptConfig)
{
Expand All @@ -387,7 +382,7 @@ public function setOptions($getoptConfig)
*
* @param string $configKey
* @param string $configValue
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function setOption($configKey, $configValue)
{
Expand All @@ -402,7 +397,7 @@ public function setOption($configKey, $configValue)
* These are appended to the rules defined when the constructor was called.
*
* @param array $rules
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function addRules($rules)
{
Expand Down Expand Up @@ -616,8 +611,8 @@ public function getUsageMessage()
* mapping option name (short or long) to an alias.
*
* @param array $aliasMap
* @throws \Zend\Console\Getopt\Exception
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @throws \Zend\Console\Exception\ExceptionInterface
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function setAliases($aliasMap)
{
Expand Down Expand Up @@ -648,7 +643,7 @@ public function setAliases($aliasMap)
* mapping option name (short or long) to the help string.
*
* @param array $helpMap
* @return \Zend\Console\Getopt\Getopt Provides a fluent interface
* @return \Zend\Console\Getopt Provides a fluent interface
*/
public function setHelp($helpMap)
{
Expand All @@ -670,7 +665,7 @@ public function setHelp($helpMap)
* Also find option parameters, and remaining arguments after
* all options have been parsed.
*
* @return \Zend\Console\Getopt\Getopt|null Provides a fluent interface
* @return \Zend\Console\Getopt|null Provides a fluent interface
*/
public function parse()
{
Expand Down Expand Up @@ -748,7 +743,7 @@ protected function _parseShortOptionCluster(&$argv)
*
* @param string $flag
* @param mixed $argv
* @throws \Zend\Console\Getopt\Exception
* @throws \Zend\Console\Exception\ExceptionInterface
* @return void
*/
protected function _parseSingleOption($flag, &$argv)
Expand Down Expand Up @@ -885,7 +880,7 @@ protected function _setBooleanFlagValue($flag)
*
* @param string $flag
* @param string $param
* @throws \Zend\Console\Getopt\Exception
* @throws \Zend\Console\Exception\ExceptionInterface
* @return bool
*/
protected function _checkParameterType($flag, $param)
Expand Down Expand Up @@ -954,7 +949,7 @@ protected function _addRulesModeGnu($rules)
* Define legal options using the Zend-style format.
*
* @param array $rules
* @throws \Zend\Console\Getopt\Exception
* @throws \Zend\Console\Exception\ExceptionInterface
* @return void
*/
protected function _addRulesModeZend($rules)
Expand Down
3 changes: 0 additions & 3 deletions test/GetoptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace ZendTest\Console;
use Zend\Console\Getopt,
Zend\Console\GetoptException;
Expand Down

0 comments on commit 017f6f1

Please sign in to comment.