Skip to content

Commit

Permalink
[File] Fix issues with class references
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed May 7, 2012
1 parent a4af63e commit 443cc02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Zend/File/Transfer/Adapter/AbstractAdapter.php
Expand Up @@ -512,7 +512,7 @@ public function hasValidator($name)
* Retrieve individual validator
*
* @param string $name
* @return Validator\Validator|null
* @return Validator\ValidatorInterface|null
*/
public function getValidator($name)
{
Expand Down Expand Up @@ -862,7 +862,7 @@ public function addFilters(array $filters, $files = null)
*
* @param array $filters Filter to set
* @param string|array $files Files to limit this filter to
* @return AbstractFilter
* @return Filter\AbstractFilter
*/
public function setFilters(array $filters, $files = null)
{
Expand Down Expand Up @@ -901,7 +901,7 @@ public function getFilter($name)
*
* @param string|array $files (Optional) Returns the filter for this files
* @return array List of set filters
* @throws Exception When file not found
* @throws Exception\RuntimeException When file not found
*/
public function getFilters($files = null)
{
Expand Down
10 changes: 6 additions & 4 deletions Zend/File/Transfer/Transfer.php
Expand Up @@ -43,7 +43,7 @@ class Transfer
* @param string $adapter Adapter to use
* @param boolean $direction OPTIONAL False means Download, true means upload
* @param array $options OPTIONAL Options to set for this adapter
* @throws Exception
* @throws Exception\InvalidArgumentException
*/
public function __construct($adapter = 'Http', $direction = false, $options = array())
{
Expand All @@ -57,7 +57,7 @@ public function __construct($adapter = 'Http', $direction = false, $options = ar
* @param boolean $direction OPTIONAL False means Download, true means upload
* @param array $options OPTIONAL Options to set for this adapter
* @return Transfer
* @throws Exception
* @throws Exception\InvalidArgumentException
*/
public function setAdapter($adapter, $direction = false, $options = array())
{
Expand All @@ -72,7 +72,9 @@ public function setAdapter($adapter, $direction = false, $options = array())
$direction = (integer) $direction;
$this->adapter[$direction] = new $adapter($options);
if (!$this->adapter[$direction] instanceof Adapter\AbstractAdapter) {
throw new Exception\InvalidArgumentException('Adapter ' . $adapter . ' does not extend Zend\File\Transfer\Adapter\AbstractAdapter');
throw new Exception\InvalidArgumentException(
'Adapter ' . $adapter . ' does not extend Zend\File\Transfer\Adapter\AbstractAdapter'
);
}

return $this;
Expand All @@ -84,7 +86,7 @@ public function setAdapter($adapter, $direction = false, $options = array())
* @param boolean $direction On null, all directions are returned
* On false, download direction is returned
* On true, upload direction is returned
* @return array|Transfer\Adapter
* @return array|Adapter\AbstractAdapter
*/
public function getAdapter($direction = null)
{
Expand Down

0 comments on commit 443cc02

Please sign in to comment.