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/phpdoc-mismatch' of https://github.com/micheh/zf2
Browse files Browse the repository at this point in the history
… into hotfix/phpdoc
  • Loading branch information
Show file tree
Hide file tree
Showing 29 changed files with 94 additions and 55 deletions.
14 changes: 9 additions & 5 deletions src/Pattern/CallbackCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function setOptions(PatternOptions $options)
* @param callable $callback A valid callback
* @param array $args Callback arguments
* @return mixed Result
* @throws Exception
* @throws Exception\RuntimeException if invalid cached data
* @throws \Exception
*/
public function call($callback, array $args = array())
{
Expand Down Expand Up @@ -100,7 +101,8 @@ public function call($callback, array $args = array())
* @param string $function Function name to call
* @param array $args Function arguments
* @return mixed
* @throws Exception
* @throws Exception\RuntimeException
* @throws \Exception
*/
public function __call($function, array $args)
{
Expand All @@ -114,7 +116,8 @@ public function __call($function, array $args)
* @param callable $callback A valid callback
* @param array $args Callback arguments
* @return string
* @throws Exception
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
*/
public function generateKey($callback, array $args = array())
{
Expand All @@ -127,8 +130,9 @@ public function generateKey($callback, array $args = array())
*
* @param callable $callback A valid callback
* @param array $args Callback arguments
* @throws Exception\RuntimeException if callback not serializable
* @throws Exception\InvalidArgumentException if invalid callback
* @return string
* @throws Exception
*/
protected function generateCallbackKey($callback, array $args)
{
Expand Down Expand Up @@ -173,8 +177,8 @@ protected function generateCallbackKey($callback, array $args)
* Generate a unique key of the argument part.
*
* @param array $args
* @throws Exception\RuntimeException
* @return string
* @throws Exception
*/
protected function generateArgumentsKey(array $args)
{
Expand Down
7 changes: 6 additions & 1 deletion src/Pattern/CaptureCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function start($pageId = null)
*
* @param string $content
* @param null|string $pageId
* @throws Exception\RuntimeException
* @throws Exception\LogicException
*/
public function set($content, $pageId = null)
{
Expand All @@ -74,6 +74,7 @@ public function set($content, $pageId = null)
*
* @param null|string $pageId
* @return bool|string
* @throws Exception\LogicException
* @throws Exception\RuntimeException
*/
public function get($pageId = null)
Expand Down Expand Up @@ -108,6 +109,7 @@ public function get($pageId = null)
* Checks if a cache with given id exists
*
* @param null|string $pageId
* @throws Exception\LogicException
* @return boolean
*/
public function has($pageId = null)
Expand All @@ -132,6 +134,7 @@ public function has($pageId = null)
* Remove from cache
*
* @param null|string $pageId
* @throws Exception\LogicException
* @throws Exception\RuntimeException
* @return boolean
*/
Expand Down Expand Up @@ -169,6 +172,7 @@ public function remove($pageId = null)
* Clear cached pages matching glob pattern
*
* @param string $pattern
* @throws Exception\LogicException
*/
public function clearByGlob($pattern = '**')
{
Expand All @@ -191,6 +195,7 @@ public function clearByGlob($pattern = '**')
/**
* Determine the page to save from the request
*
* @throws Exception\RuntimeException
* @return string
*/
protected function detectPageId()
Expand Down
10 changes: 6 additions & 4 deletions src/Pattern/ClassCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function setOptions(PatternOptions $options)
* @param string $method Method name to call
* @param array $args Method arguments
* @return mixed
* @throws Exception
* @throws Exception\RuntimeException
* @throws \Exception
*/
public function call($method, array $args = array())
{
Expand Down Expand Up @@ -78,7 +79,7 @@ public function call($method, array $args = array())
* @param string $method The method
* @param array $args Callback arguments
* @return string
* @throws Exception
* @throws Exception\RuntimeException
*/
public function generateKey($method, array $args = array())
{
Expand All @@ -95,7 +96,7 @@ public function generateKey($method, array $args = array())
* @param callable $callback A valid callback
* @param array $args Callback arguments
* @return string
* @throws Exception
* @throws Exception\RuntimeException
*/
protected function generateCallbackKey($callback, array $args)
{
Expand All @@ -110,7 +111,8 @@ protected function generateCallbackKey($callback, array $args)
* @param string $method Method name to call
* @param array $args Method arguments
* @return mixed
* @throws Exception
* @throws Exception\RuntimeException
* @throws \Exception
*/
public function __call($method, array $args)
{
Expand Down
10 changes: 6 additions & 4 deletions src/Pattern/ObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function setOptions(PatternOptions $options)
* @param string $method Method name to call
* @param array $args Method arguments
* @return mixed
* @throws Exception
* @throws Exception\RuntimeException
* @throws \Exception
*/
public function call($method, array $args = array())
{
Expand Down Expand Up @@ -158,7 +159,7 @@ public function call($method, array $args = array())
* @param string $method The method
* @param array $args Callback arguments
* @return string
* @throws Exception
* @throws Exception\RuntimeException
*/
public function generateKey($method, array $args = array())
{
Expand All @@ -175,7 +176,7 @@ public function generateKey($method, array $args = array())
* @param callable $callback A valid callback
* @param array $args Callback arguments
* @return string
* @throws Exception
* @throws Exception\RuntimeException
*/
protected function generateCallbackKey($callback, array $args = array())
{
Expand All @@ -190,7 +191,8 @@ protected function generateCallbackKey($callback, array $args = array())
* @param string $method Method name to call
* @param array $args Method arguments
* @return mixed
* @throws Exception
* @throws Exception\RuntimeException
* @throws \Exception
*/
public function __call($method, array $args)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Pattern/OutputCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public function setOptions(PatternOptions $options)
* else start buffering output until end() is called or the script ends.
*
* @param string $key Key
* @throws Exception\MissingKeyException if key is missing
* @return boolean
* @throws Exception
*/
public function start($key)
{
Expand All @@ -76,8 +76,8 @@ public function start($key)
* Stops buffering output, write buffered data to cache using the given key on start()
* and displays the buffer.
*
* @throws Exception\RuntimeException if output cache not started or buffering not active
* @return boolean TRUE on success, FALSE on failure writing to cache
* @throws Exception
*/
public function end()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pattern/PatternInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface PatternInterface
* Set pattern options
*
* @param PatternOptions $options
* @return Pattern
* @return PatternInterface
*/
public function setOptions(PatternOptions $options);

Expand Down
16 changes: 12 additions & 4 deletions src/Pattern/PatternOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\Cache\Pattern;

use Traversable;
use Zend\Cache\Exception;
use Zend\Cache\StorageFactory;
use Zend\Cache\Storage\StorageInterface as Storage;
Expand Down Expand Up @@ -151,7 +152,7 @@ class PatternOptions extends AbstractOptions
* Constructor
*
* @param array|Traversable|null $options
* @return AbstractOptions
* @return PatternOptions
* @throws Exception\InvalidArgumentException
*/
public function __construct($options = null)
Expand Down Expand Up @@ -234,6 +235,7 @@ public function getCacheOutput()
* - ClassCache
*
* @param string $class
* @throws Exception\InvalidArgumentException
* @return PatternOptions
*/
public function setClass($class)
Expand Down Expand Up @@ -318,6 +320,7 @@ public function getClassNonCacheMethods()
* Set directory permission
*
* @param false|int $dirPermission
* @throws Exception\InvalidArgumentException
* @return PatternOptions
*/
public function setDirPermission($dirPermission)
Expand Down Expand Up @@ -358,6 +361,7 @@ public function getDirPermission()
* - CaptureCache
*
* @param false|int $umask
* @throws Exception\InvalidArgumentException
* @return PatternOptions
*/
public function setUmask($umask)
Expand Down Expand Up @@ -429,6 +433,7 @@ public function getFileLocking()
* Set file permission
*
* @param false|int $filePermission
* @throws Exception\InvalidArgumentException
* @return PatternOptions
*/
public function setFilePermission($filePermission)
Expand Down Expand Up @@ -491,7 +496,8 @@ public function getIndexFilename()
/**
* Set object to cache
*
* @param mixed $value
* @param mixed $object
* @throws Exception\InvalidArgumentException
* @return $this
*/
public function setObject($object)
Expand Down Expand Up @@ -574,7 +580,7 @@ public function getObjectCacheMethods()
* Used by:
* - ObjectCache
*
* @param mixed $value
* @param mixed $objectKey
* @return $this
*/
public function setObjectKey($objectKey)
Expand Down Expand Up @@ -633,6 +639,7 @@ public function getObjectNonCacheMethods()
* - CaptureCache
*
* @param string $publicDir
* @throws Exception\InvalidArgumentException
* @return PatternOptions
*/
public function setPublicDir($publicDir)
Expand Down Expand Up @@ -742,7 +749,8 @@ protected function normalizeObjectMethods(array $methods)
* Create a storage object from a given specification
*
* @param array|string|Storage $storage
* @return StorageAdapter
* @throws Exception\InvalidArgumentException
* @return Storage
*/
protected function storageFactory($storage)
{
Expand Down
2 changes: 1 addition & 1 deletion src/PatternFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PatternFactory
* @param string|Pattern\PatternInterface $patternName
* @param array|Traversable|Pattern\PatternOptions $options
* @return Pattern\PatternInterface
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
*/
public static function factory($patternName, $options = array())
{
Expand Down
6 changes: 3 additions & 3 deletions src/Storage/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Zend\Cache\Storage\PostEvent;
use Zend\Cache\Storage\StorageInterface;
use Zend\EventManager\EventManager;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\EventsCapableInterface;

/**
Expand Down Expand Up @@ -537,7 +538,7 @@ public function hasItems(array $keys)
/**
* Internal method to test multiple items.
*
* @param array $keys
* @param array $normalizedKeys
* @return array Array of found keys
* @throws Exception\ExceptionInterface
*/
Expand Down Expand Up @@ -749,7 +750,6 @@ public function setItems(array $keyValuePairs)
* Internal method to store multiple items.
*
* @param array $normalizedKeyValuePairs
* @param array $normalizedOptions
* @return array Array of not stored keys
* @throws Exception\ExceptionInterface
*/
Expand Down Expand Up @@ -1233,7 +1233,7 @@ public function removeItems(array $keys)
/**
* Internal method to remove multiple items.
*
* @param array $keys
* @param array $normalizedKeys
* @return array Array of not removed keys
* @throws Exception\ExceptionInterface
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Storage/Adapter/AbstractZendServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ protected function internalGetItems(array & $normalizedKeys)
* Internal method to test if an item exists.
*
* @param string $normalizedKey
* @param array $normalizedOptions
* @return boolean
* @throws Exception\ExceptionInterface
*/
Expand All @@ -101,7 +100,7 @@ protected function internalHasItem(& $normalizedKey)
/**
* Internal method to test multiple items.
*
* @param array $keys
* @param array $normalizedKeys
* @return array Array of found keys
* @throws Exception\ExceptionInterface
*/
Expand Down
1 change: 1 addition & 0 deletions src/Storage/Adapter/AdapterOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function setAdapter(StorageInterface $adapter = null)
* Set key pattern
*
* @param null|string $keyPattern
* @throws Exception\InvalidArgumentException
* @return AdapterOptions
*/
public function setKeyPattern($keyPattern)
Expand Down
6 changes: 3 additions & 3 deletions src/Storage/Adapter/Apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function flush()
/**
* Remove items by given namespace
*
* @param string $prefix
* @param string $namespace
* @return boolean
*/
public function clearByNamespace($namespace)
Expand Down Expand Up @@ -265,7 +265,7 @@ protected function internalHasItem(& $normalizedKey)
/**
* Internal method to test multiple items.
*
* @param array $keys
* @param array $normalizedKeys
* @return array Array of found keys
* @throws Exception\ExceptionInterface
*/
Expand Down Expand Up @@ -523,7 +523,7 @@ protected function internalRemoveItem(& $normalizedKey)
/**
* Internal method to remove multiple items.
*
* @param array $keys
* @param array $normalizedKeys
* @return array Array of not removed keys
* @throws Exception\ExceptionInterface
*/
Expand Down
Loading

0 comments on commit 5431207

Please sign in to comment.