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

Commit

Permalink
Add consistency to method chaining DocBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tdutrion committed Nov 11, 2016
1 parent df4631a commit fcf93a8
Show file tree
Hide file tree
Showing 28 changed files with 135 additions and 100 deletions.
2 changes: 1 addition & 1 deletion src/Pattern/AbstractPattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class AbstractPattern implements PatternInterface
* Set pattern options
*
* @param PatternOptions $options
* @return AbstractPattern
* @return AbstractPattern Provides a fluent interface
* @throws Exception\InvalidArgumentException
*/
public function setOptions(PatternOptions $options)
Expand Down
2 changes: 1 addition & 1 deletion src/Pattern/CallbackCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CallbackCache extends AbstractPattern
* Set options
*
* @param PatternOptions $options
* @return CallbackCache
* @return CallbackCache Provides a fluent interface
* @throws Exception\InvalidArgumentException if missing storage option
*/
public function setOptions(PatternOptions $options)
Expand Down
2 changes: 1 addition & 1 deletion src/Pattern/ClassCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ClassCache extends CallbackCache
* Set options
*
* @param PatternOptions $options
* @return ClassCache
* @return ClassCache Provides a fluent interface
* @throws Exception\InvalidArgumentException if missing 'class' or 'storage' options
*/
public function setOptions(PatternOptions $options)
Expand Down
2 changes: 1 addition & 1 deletion src/Pattern/OutputCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OutputCache extends AbstractPattern
* Set options
*
* @param PatternOptions $options
* @return OutputCache
* @return OutputCache Provides a fluent interface
* @throws Exception\InvalidArgumentException
*/
public function setOptions(PatternOptions $options)
Expand Down
34 changes: 17 additions & 17 deletions src/Pattern/PatternOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function __construct($options = null)
* - ObjectCache
*
* @param bool $cacheByDefault
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setCacheByDefault($cacheByDefault)
{
Expand Down Expand Up @@ -199,7 +199,7 @@ public function getCacheByDefault()
* - ObjectCache
*
* @param bool $cacheOutput
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setCacheOutput($cacheOutput)
{
Expand Down Expand Up @@ -230,7 +230,7 @@ public function getCacheOutput()
*
* @param string $class
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setClass($class)
{
Expand Down Expand Up @@ -261,7 +261,7 @@ public function getClass()
* - ClassCache
*
* @param array $classCacheMethods
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setClassCacheMethods(array $classCacheMethods)
{
Expand Down Expand Up @@ -289,7 +289,7 @@ public function getClassCacheMethods()
* - ClassCache
*
* @param array $classNonCacheMethods
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setClassNonCacheMethods(array $classNonCacheMethods)
{
Expand All @@ -315,7 +315,7 @@ public function getClassNonCacheMethods()
*
* @param false|int $dirPermission
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setDirPermission($dirPermission)
{
Expand Down Expand Up @@ -356,7 +356,7 @@ public function getDirPermission()
*
* @param false|int $umask
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setUmask($umask)
{
Expand Down Expand Up @@ -402,7 +402,7 @@ public function getUmask()
* - CaptureCache
*
* @param bool $fileLocking
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setFileLocking($fileLocking)
{
Expand All @@ -428,7 +428,7 @@ public function getFileLocking()
*
* @param false|int $filePermission
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setFilePermission($filePermission)
{
Expand Down Expand Up @@ -469,7 +469,7 @@ public function getFilePermission()
* Set value for index filename
*
* @param string $indexFilename
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setIndexFilename($indexFilename)
{
Expand All @@ -492,7 +492,7 @@ public function getIndexFilename()
*
* @param mixed $object
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setObject($object)
{
Expand Down Expand Up @@ -522,7 +522,7 @@ public function getObject()
* - ObjectCache
*
* @param bool $objectCacheMagicProperties
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setObjectCacheMagicProperties($objectCacheMagicProperties)
{
Expand All @@ -547,7 +547,7 @@ public function getObjectCacheMagicProperties()
* Set list of object methods for which to cache return values
*
* @param array $objectCacheMethods
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
* @throws Exception\InvalidArgumentException
*/
public function setObjectCacheMethods(array $objectCacheMethods)
Expand Down Expand Up @@ -575,7 +575,7 @@ public function getObjectCacheMethods()
* - ObjectCache
*
* @param null|string $objectKey The object key or NULL to use the objects class name
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setObjectKey($objectKey)
{
Expand Down Expand Up @@ -607,7 +607,7 @@ public function getObjectKey()
* Set list of object methods for which NOT to cache return values
*
* @param array $objectNonCacheMethods
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
* @throws Exception\InvalidArgumentException
*/
public function setObjectNonCacheMethods(array $objectNonCacheMethods)
Expand All @@ -634,7 +634,7 @@ public function getObjectNonCacheMethods()
*
* @param string $publicDir
* @throws Exception\InvalidArgumentException
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setPublicDir($publicDir)
{
Expand Down Expand Up @@ -681,7 +681,7 @@ public function getPublicDir()
* - OutputCache
*
* @param string|array|Storage $storage
* @return PatternOptions
* @return PatternOptions Provides a fluent interface
*/
public function setStorage($storage)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Storage/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function __destruct()
* Set options.
*
* @param array|Traversable|AdapterOptions $options
* @return AbstractAdapter
* @return AbstractAdapter Provides a fluent interface
* @see getOptions()
*/
public function setOptions($options)
Expand Down Expand Up @@ -153,7 +153,7 @@ public function getOptions()
* @see setWritable()
* @see setReadable()
* @param bool $flag
* @return AbstractAdapter
* @return AbstractAdapter Provides a fluent interface
*/
public function setCaching($flag)
{
Expand Down Expand Up @@ -268,8 +268,8 @@ public function hasPlugin(Plugin\PluginInterface $plugin)
* Register a plugin
*
* @param Plugin\PluginInterface $plugin
* @param int $priority
* @return AbstractAdapter Fluent interface
* @param int $priority
* @return AbstractAdapter Provides a fluent interface
* @throws Exception\LogicException
*/
public function addPlugin(Plugin\PluginInterface $plugin, $priority = 1)
Expand All @@ -292,7 +292,7 @@ public function addPlugin(Plugin\PluginInterface $plugin, $priority = 1)
* Unregister an already registered plugin
*
* @param Plugin\PluginInterface $plugin
* @return AbstractAdapter Fluent interface
* @return AbstractAdapter Provides a fluent interface
* @throws Exception\LogicException
*/
public function removePlugin(Plugin\PluginInterface $plugin)
Expand Down
12 changes: 6 additions & 6 deletions src/Storage/Adapter/AdapterOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AdapterOptions extends AbstractOptions
* Adapter using this instance
*
* @param StorageInterface|null $adapter
* @return AdapterOptions
* @return AdapterOptions Provides a fluent interface
*/
public function setAdapter(StorageInterface $adapter = null)
{
Expand All @@ -89,7 +89,7 @@ public function setAdapter(StorageInterface $adapter = null)
*
* @param string $keyPattern
* @throws Exception\InvalidArgumentException
* @return AdapterOptions
* @return AdapterOptions Provides a fluent interface
*/
public function setKeyPattern($keyPattern)
{
Expand Down Expand Up @@ -130,7 +130,7 @@ public function getKeyPattern()
* Set namespace.
*
* @param string $namespace
* @return AdapterOptions
* @return AdapterOptions Provides a fluent interface
*/
public function setNamespace($namespace)
{
Expand All @@ -157,7 +157,7 @@ public function getNamespace()
* Enable/Disable reading data from cache.
*
* @param bool $readable
* @return AbstractAdapter
* @return AdapterOptions Provides a fluent interface
*/
public function setReadable($readable)
{
Expand All @@ -183,7 +183,7 @@ public function getReadable()
* Set time to live.
*
* @param int|float $ttl
* @return AdapterOptions
* @return AdapterOptions Provides a fluent interface
*/
public function setTtl($ttl)
{
Expand All @@ -209,7 +209,7 @@ public function getTtl()
* Enable/Disable writing data to cache.
*
* @param bool $writable
* @return AdapterOptions
* @return AdapterOptions Provides a fluent interface
*/
public function setWritable($writable)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/ApcIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getMode()
* Set iterator mode
*
* @param int $mode
* @return ApcIterator Fluent interface
* @return ApcIterator Provides a fluent interface
*/
public function setMode($mode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/ApcOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ApcOptions extends AdapterOptions
* Set namespace separator
*
* @param string $namespaceSeparator
* @return ApcOptions
* @return ApcOptions Provides a fluent interface
*/
public function setNamespaceSeparator($namespaceSeparator)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/ApcuIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getMode()
* Set iterator mode
*
* @param int $mode
* @return ApcuIterator Fluent interface
* @return ApcuIterator Provides a fluent interface
*/
public function setMode($mode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/ApcuOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ApcuOptions extends AdapterOptions
* Set namespace separator
*
* @param string $namespaceSeparator
* @return ApcuOptions
* @return ApcuOptions Provides a fluent interface
*/
public function setNamespaceSeparator($namespaceSeparator)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/BlackHole.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct($options = null)
* Set options.
*
* @param array|\Traversable|AdapterOptions $options
* @return StorageInterface Fluent interface
* @return BlackHole Provides a fluent interface
*/
public function setOptions($options)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/DbaIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getMode()
* Set iterator mode
*
* @param int $mode
* @return ApcIterator Fluent interface
* @return DbaIterator Provides a fluent interface
*/
public function setMode($mode)
{
Expand Down
12 changes: 9 additions & 3 deletions src/Storage/Adapter/DbaOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DbaOptions extends AdapterOptions
* Set namespace separator
*
* @param string $namespaceSeparator
* @return DbaOptions
* @return DbaOptions Provides a fluent interface
*/
public function setNamespaceSeparator($namespaceSeparator)
{
Expand All @@ -72,7 +72,7 @@ public function getNamespaceSeparator()
* Set pathname to database file
*
* @param string $pathname
* @return DbaOptions
* @return DbaOptions Provides a fluent interface
*/
public function setPathname($pathname)
{
Expand All @@ -95,7 +95,7 @@ public function getPathname()
*
*
* @param string $mode
* @return \Zend\Cache\Storage\Adapter\DbaOptions
* @return DbaOptions Provides a fluent interface
*/
public function setMode($mode)
{
Expand All @@ -109,6 +109,12 @@ public function getMode()
return $this->mode;
}

/**
*
*
* @param string $handler
* @return DbaOptions Provides a fluent interface
*/
public function setHandler($handler)
{
$handler = (string) $handler;
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/FilesystemIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getMode()
* Set iterator mode
*
* @param int $mode
* @return FilesystemIterator Fluent interface
* @return FilesystemIterator Provides a fluent interface
*/
public function setMode($mode)
{
Expand Down
Loading

0 comments on commit fcf93a8

Please sign in to comment.