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

Commit

Permalink
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 34 deletions.
1 change: 0 additions & 1 deletion src/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public function __invoke($value)
}

/**
*
* @param mixed $options
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractUnicode.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class AbstractUnicode extends AbstractFilter
* Set the input encoding for the given string
*
* @param string|null $encoding
* @return StringToLower
* @return AbstractUnicode
* @throws Exception\InvalidArgumentException
* @throws Exception\ExtensionNotLoadedException
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct($typeOrOptions = null, $casting = true, $translation
*
* @param int|array $type
* @throws Exception\InvalidArgumentException
* @return bool
* @return Boolean
*/
public function setType($type = null)
{
Expand Down Expand Up @@ -137,7 +137,7 @@ public function getType()
* @param bool $flag When true this filter works like cast
* When false it recognises only true and false
* and all other values are returned as is
* @return bool
* @return Boolean
*/
public function setCasting($flag = true)
{
Expand All @@ -158,7 +158,7 @@ public function getCasting()
/**
* @param array|Traversable $translations
* @throws Exception\InvalidArgumentException
* @return bool
* @return Boolean
*/
public function setTranslations($translations)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($callbackOrOptions, $callbackParams = array())
*
* @param callable $callback
* @throws Exception\InvalidArgumentException
* @return self
* @return Callback
*/
public function setCallback($callback)
{
Expand Down Expand Up @@ -79,7 +79,7 @@ public function setCallbackParams($params)
/**
* Get parameters for the callback
*
* @return mixed
* @return array
*/
public function getCallbackParams()
{
Expand Down
6 changes: 3 additions & 3 deletions src/DateTimeFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct($options = null)
* Set the format string accepted by date() to use when formatting a string
*
* @param string $format
* @return \Zend\Filter\DateTimeFormatter
* @return DateTimeFormatter
*/
public function setFormat($format)
{
Expand Down Expand Up @@ -66,8 +66,8 @@ public function filter($value)
/**
* Normalize the provided value to a formatted string
*
* @param string|int|DateTime $value
* @returns string
* @param string|int|DateTime $value
* @return string
*/
protected function normalizeDateTime($value)
{
Expand Down
5 changes: 3 additions & 2 deletions src/File/RenameUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function filter($value)
/**
* @param string $sourceFile Source file path
* @param string $targetFile Target file path
* @throws \Zend\Filter\Exception\RuntimeException
* @throws Exception\RuntimeException
* @return bool
*/
protected function moveUploadedFile($sourceFile, $targetFile)
Expand All @@ -218,7 +218,7 @@ protected function moveUploadedFile($sourceFile, $targetFile)

/**
* @param string $targetFile Target file path
* @throws \Zend\Filter\Exception\InvalidArgumentException
* @throws Exception\InvalidArgumentException
*/
protected function checkFileExists($targetFile)
{
Expand Down Expand Up @@ -281,6 +281,7 @@ protected function getFinalTarget($uploadData)
}

/**
* @param string $source
* @param string $filename
* @return string
*/
Expand Down
6 changes: 6 additions & 0 deletions src/FilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class FilterChain extends AbstractFilter implements Countable
/**
* Initialize filter chain
*
* @param null|array|Traversable $options
*/
public function __construct($options = null)
{
Expand All @@ -44,6 +45,11 @@ public function __construct($options = null)
}
}

/**
* @param array|Traversable $options
* @return FilterChain
* @throws Exception\InvalidArgumentException
*/
public function setOptions($options)
{
if (!is_array($options) && !$options instanceof \Traversable) {
Expand Down
44 changes: 22 additions & 22 deletions src/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function setOptions($options)
* Set Whether or not the inflector should throw an exception when a replacement
* identifier is still found within an inflected target.
*
* @param bool $throwTargetExceptionsOn
* @param bool $throwTargetExceptionsOn
* @return Inflector
*/
public function setThrowTargetExceptionsOn($throwTargetExceptionsOn)
Expand All @@ -169,7 +169,7 @@ public function isThrowTargetExceptionsOn()
/**
* Set the Target Replacement Identifier, by default ':'
*
* @param string $targetReplacementIdentifier
* @param string $targetReplacementIdentifier
* @return Inflector
*/
public function setTargetReplacementIdentifier($targetReplacementIdentifier)
Expand All @@ -195,7 +195,7 @@ public function getTargetReplacementIdentifier()
* Set a Target
* ex: 'scripts/:controller/:action.:suffix'
*
* @param string
* @param string $target
* @return Inflector
*/
public function setTarget($target)
Expand All @@ -217,7 +217,7 @@ public function getTarget()
/**
* Set Target Reference
*
* @param reference $target
* @param reference $target
* @return Inflector
*/
public function setTargetReference(&$target)
Expand All @@ -227,21 +227,21 @@ public function setTargetReference(&$target)
}

/**
* SetRules() is the same as calling addRules() with the exception that it
* Is the same as calling addRules() with the exception that it
* clears the rules before adding them.
*
* @param array $rules
* @param array $rules
* @return Inflector
*/
public function setRules(Array $rules)
public function setRules(array $rules)
{
$this->clearRules();
$this->addRules($rules);
return $this;
}

/**
* AddRules(): multi-call to setting filter rules.
* Multi-call to setting filter rules.
*
* If prefixed with a ":" (colon), a filter rule will be added. If not
* prefixed, a static replacement will be added.
Expand All @@ -253,10 +253,10 @@ public function setRules(Array $rules)
* 'suffix' => 'phtml'
* );
*
* @param array
* @param array $rules
* @return Inflector
*/
public function addRules(Array $rules)
public function addRules(array $rules)
{
$keys = array_keys($rules);
foreach ($keys as $spec) {
Expand Down Expand Up @@ -293,10 +293,10 @@ public function getRules($spec = null)
}

/**
* getRule() returns a rule set by setFilterRule(), a numeric index must be provided
* Returns a rule set by setFilterRule(), a numeric index must be provided
*
* @param string $spec
* @param int $index
* @param string $spec
* @param int $index
* @return FilterInterface|false
*/
public function getRule($spec, $index)
Expand All @@ -311,7 +311,7 @@ public function getRule($spec, $index)
}

/**
* ClearRules() clears the rules currently in the inflector
* Clears the rules currently in the inflector
*
* @return Inflector
*/
Expand All @@ -325,8 +325,8 @@ public function clearRules()
* Set a filtering rule for a spec. $ruleSet can be a string, Filter object
* or an array of strings or filter objects.
*
* @param string $spec
* @param array|string|\Zend\Filter\FilterInterface $ruleSet
* @param string $spec
* @param array|string|\Zend\Filter\FilterInterface $ruleSet
* @return Inflector
*/
public function setFilterRule($spec, $ruleSet)
Expand All @@ -339,8 +339,8 @@ public function setFilterRule($spec, $ruleSet)
/**
* Add a filter rule for a spec
*
* @param mixed $spec
* @param mixed $ruleSet
* @param mixed $spec
* @param mixed $ruleSet
* @return Inflector
*/
public function addFilterRule($spec, $ruleSet)
Expand Down Expand Up @@ -370,8 +370,8 @@ public function addFilterRule($spec, $ruleSet)
/**
* Set a static rule for a spec. This is a single string value
*
* @param string $name
* @param string $value
* @param string $name
* @param string $value
* @return Inflector
*/
public function setStaticRule($name, $value)
Expand All @@ -388,8 +388,8 @@ public function setStaticRule($name, $value)
* in to be referenced when its time to build the output string from the
* target.
*
* @param string $name
* @param mixed $reference
* @param string $name
* @param mixed $reference
* @return Inflector
*/
public function setStaticRuleReference($name, &$reference)
Expand Down

0 comments on commit e7bbdd5

Please sign in to comment.