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

Commit

Permalink
Merge branch 'feature/exceptions'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
8 changes: 3 additions & 5 deletions src/Exception/InvalidArgumentException.php
Expand Up @@ -26,8 +26,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException
extends \InvalidArgumentException
implements ExceptionInterface
{
}
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{}
7 changes: 2 additions & 5 deletions src/Exception/RuntimeException.php
Expand Up @@ -26,8 +26,5 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException
extends \RuntimeException
implements ExceptionInterface
{
}
class RuntimeException extends \RuntimeException implements ExceptionInterface
{}
4 changes: 2 additions & 2 deletions src/Processor/Constant.php
Expand Up @@ -22,8 +22,8 @@

use Zend\Config\Config,
Zend\Config\Exception\InvalidArgumentException,
\Traversable,
\ArrayObject;
Traversable,
ArrayObject;

/**
* @category Zend
Expand Down
13 changes: 6 additions & 7 deletions src/Processor/Filter.php
Expand Up @@ -23,8 +23,8 @@
use Zend\Config\Config,
Zend\Config\Exception,
Zend\Filter\FilterInterface as ZendFilter,
\Traversable,
\ArrayObject;
Traversable,
ArrayObject;

/**
* @category Zend
Expand All @@ -35,31 +35,30 @@
class Filter implements ProcessorInterface
{
/**
* @var \Zend\Filter\FilterInterface
* @var ZendFilter
*/
protected $filter;

/**
* Filter all config values using the supplied Zend\Filter
*
* @param \Zend\Filter\FilterInterface $filter
* @return \Zend\Config\Processor\Filter
* @param ZendFilter $filter
*/
public function __construct(ZendFilter $filter)
{
$this->setFilter($filter);
}

/**
* @return \Zend\Filter\FilterInterface
* @return ZendFilter
*/
public function getFilter()
{
return $this->filter;
}

/**
* @param \Zend\Filter\FilterInterface $filter
* @param ZendFilter $filter
*/
public function setFilter(ZendFilter $filter)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Processor/ProcessorInterface.php
Expand Up @@ -34,7 +34,7 @@ interface ProcessorInterface
* Process the whole Config structure and recursively parse all its values.
*
* @param Config $value
* @return \Zend\Config\Config
* @return Config
*/
public function process(Config $value);

Expand Down
4 changes: 2 additions & 2 deletions src/Processor/Token.php
Expand Up @@ -22,8 +22,8 @@

use Zend\Config\Config,
Zend\Config\Exception,
\Traversable,
\ArrayObject;
Traversable,
ArrayObject;

/**
* @category Zend
Expand Down
23 changes: 15 additions & 8 deletions src/Processor/Translator.php
Expand Up @@ -24,8 +24,8 @@
Zend\Config\Exception\InvalidArgumentException,
Zend\Translator\Translator as ZendTranslator,
Zend\Locale\Locale,
\Traversable,
\ArrayObject;
Traversable,
ArrayObject;

/**
* @category Zend
Expand All @@ -36,12 +36,12 @@
class Translator implements ProcessorInterface
{
/**
* @var \Zend\Translator\Translator
* @var ZendTranslator
*/
protected $translator;

/**
* @var \Zend\Locale\Locale|string|null
* @var Locale|string|null
*/
protected $locale = null;

Expand All @@ -60,37 +60,44 @@ public function __construct(ZendTranslator $translator, $locale = null)
}

/**
* @return \Zend\Translator\Translator
* @return ZendTranslator
*/
public function getTranslator()
{
return $this->translator;
}

/**
* @param \Zend\Translator\Translator $translator
* @param ZendTranslator $translator
*/
public function setTranslator(ZendTranslator $translator)
{
$this->translator = $translator;
}

/**
* @return \Zend\Locale\Locale|string|null
* @return Locale|string|null
*/
public function getLocale()
{
return $this->locale;
}

/**
* @param \Zend\Locale\Locale|string|null $locale
* @param Locale|string|null $locale
*/
public function setLocale($locale)
{
$this->locale = $locale;
}

/**
* Process
*
* @param Config $config
* @return Config
* @throws InvalidArgumentException
*/
public function process(Config $config)
{
if ($config->isReadOnly()) {
Expand Down

0 comments on commit 3f00a85

Please sign in to comment.