mirror of
https://github.com/predis/predis.git
synced 2026-09-13 20:07:28 +00:00
Add missing @return annotations (#1265)
* Add missing `@return` annotations * formatting * formatting * Update ProcessorChain.php * Update Handler.php --------- Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ use IteratorAggregate;
|
||||
use OutOfBoundsException;
|
||||
use Predis\Connection\NodeConnectionInterface;
|
||||
use ReturnTypeWillChange;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Slot map for redis-cluster.
|
||||
@@ -198,7 +199,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
|
||||
/**
|
||||
* Returns an iterator over the slot map.
|
||||
*
|
||||
* @return ArrayIterator
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
|
||||
@@ -138,7 +138,7 @@ abstract class CursorBasedIterator implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
@@ -148,7 +148,7 @@ abstract class CursorBasedIterator implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return mixed
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function current()
|
||||
@@ -157,7 +157,7 @@ abstract class CursorBasedIterator implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function key()
|
||||
@@ -166,7 +166,7 @@ abstract class CursorBasedIterator implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next()
|
||||
@@ -186,7 +186,7 @@ abstract class CursorBasedIterator implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function valid()
|
||||
|
||||
@@ -128,7 +128,7 @@ class ListKey implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
@@ -138,7 +138,7 @@ class ListKey implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return mixed
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function current()
|
||||
@@ -147,7 +147,7 @@ class ListKey implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function key()
|
||||
@@ -156,7 +156,7 @@ class ListKey implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next()
|
||||
@@ -173,7 +173,7 @@ class ListKey implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function valid()
|
||||
|
||||
@@ -93,7 +93,8 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param int $index
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetExists($index)
|
||||
@@ -102,7 +103,8 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param int $index
|
||||
* @return ProcessorInterface
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet($index)
|
||||
@@ -111,7 +113,9 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param int $index
|
||||
* @param ProcessorInterface $processor
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetSet($index, $processor)
|
||||
@@ -126,7 +130,8 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param int $index
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetUnset($index)
|
||||
|
||||
@@ -21,6 +21,7 @@ use Predis\Command\CommandInterface;
|
||||
use Predis\Connection\NodeConnectionInterface;
|
||||
use Predis\NotSupportedException;
|
||||
use ReturnTypeWillChange;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Abstraction for a cluster of aggregate connections to various Redis servers
|
||||
@@ -200,7 +201,7 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function count()
|
||||
@@ -209,7 +210,7 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return Traversable<string, NodeConnectionInterface>
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
|
||||
@@ -31,6 +31,7 @@ use Predis\Response\ErrorInterface as ErrorResponseInterface;
|
||||
use Predis\Response\ServerException;
|
||||
use ReturnTypeWillChange;
|
||||
use Throwable;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Abstraction for a Redis-backed cluster of nodes (Redis >= 3.0.0).
|
||||
@@ -589,7 +590,7 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function count()
|
||||
@@ -598,7 +599,7 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return Traversable<string, NodeConnectionInterface>
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
|
||||
@@ -90,7 +90,7 @@ class Consumer implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
@@ -110,7 +110,7 @@ class Consumer implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function key()
|
||||
@@ -119,7 +119,7 @@ class Consumer implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next()
|
||||
|
||||
@@ -151,7 +151,7 @@ abstract class AbstractConsumer implements Iterator
|
||||
abstract protected function writeRequest($method, $arguments);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
@@ -172,7 +172,7 @@ abstract class AbstractConsumer implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function key()
|
||||
@@ -181,7 +181,7 @@ abstract class AbstractConsumer implements Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next()
|
||||
|
||||
@@ -34,7 +34,7 @@ abstract class MultiBulkIterator implements Iterator, Countable, ResponseInterfa
|
||||
protected $size;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
@@ -43,7 +43,7 @@ abstract class MultiBulkIterator implements Iterator, Countable, ResponseInterfa
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return mixed
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function current()
|
||||
@@ -52,7 +52,7 @@ abstract class MultiBulkIterator implements Iterator, Countable, ResponseInterfa
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function key()
|
||||
@@ -61,7 +61,7 @@ abstract class MultiBulkIterator implements Iterator, Countable, ResponseInterfa
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return void
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next()
|
||||
@@ -72,7 +72,7 @@ abstract class MultiBulkIterator implements Iterator, Countable, ResponseInterfa
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function valid()
|
||||
|
||||
@@ -63,7 +63,7 @@ class MultiBulkTuple extends MultiBulk implements OuterIterator
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return MultiBulk
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getInnerIterator()
|
||||
|
||||
+13
-6
@@ -53,7 +53,9 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param string $save_path
|
||||
* @param string $session_id
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function open($save_path, $session_id)
|
||||
@@ -63,7 +65,7 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function close()
|
||||
@@ -73,7 +75,8 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param int $maxlifetime
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function gc($maxlifetime)
|
||||
@@ -83,7 +86,8 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param string $session_id
|
||||
* @return string
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function read($session_id)
|
||||
@@ -96,7 +100,9 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param string $session_id
|
||||
* @param string $session_data
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function write($session_id, $session_data)
|
||||
@@ -107,7 +113,8 @@ class Handler implements SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param string $session_id
|
||||
* @return bool
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function destroy($session_id)
|
||||
|
||||
Reference in New Issue
Block a user