From 4e1186f845ff77d6daf989e131e6b906c3e25af5 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sun, 27 Jul 2014 21:55:16 +0200 Subject: [PATCH] [phpdoc] Fix undefined classes. --- src/Connection/Aggregate/PredisCluster.php | 2 +- .../PHPUnit/ArrayHasSameValuesConstraint.php | 2 +- tests/PHPUnit/PredisProfileTestCase.php | 2 +- tests/PHPUnit/PredisTestCase.php | 28 +++++++++---------- tests/PHPUnit/RedisCommandConstraint.php | 4 +-- tests/Predis/ClientTest.php | 4 +-- .../Collection/Iterator/ListKeyTest.php | 4 +-- tests/Predis/Command/RawCommandTest.php | 4 +-- .../Configuration/ClusterOptionTest.php | 4 +-- .../Configuration/ReplicationOptionTest.php | 2 +- .../Aggregate/MasterSlaveReplicationTest.php | 8 +++--- tests/Predis/Connection/FactoryTest.php | 8 +++--- tests/Predis/Connection/ParametersTest.php | 2 +- .../PhpiredisSocketConnectionTest.php | 2 +- .../PhpiredisStreamConnectionTest.php | 2 +- .../Connection/StreamConnectionTest.php | 2 +- tests/Predis/Profile/FactoryTest.php | 2 +- .../Response/Iterator/MultiBulkTupleTest.php | 4 +-- tests/Predis/Transaction/MultiExecTest.php | 6 ++-- 19 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/Connection/Aggregate/PredisCluster.php b/src/Connection/Aggregate/PredisCluster.php index e87f6270..d61bcbbc 100644 --- a/src/Connection/Aggregate/PredisCluster.php +++ b/src/Connection/Aggregate/PredisCluster.php @@ -168,7 +168,7 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable * Returns the underlying command hash strategy used to hash commands by * using keys found in their arguments. * - * @return ClusterStrategyInterface + * @return StrategyInterface */ public function getClusterStrategy() { diff --git a/tests/PHPUnit/ArrayHasSameValuesConstraint.php b/tests/PHPUnit/ArrayHasSameValuesConstraint.php index 13035bb6..9391e780 100644 --- a/tests/PHPUnit/ArrayHasSameValuesConstraint.php +++ b/tests/PHPUnit/ArrayHasSameValuesConstraint.php @@ -12,7 +12,7 @@ /** * Constraint that accepts arrays with the same elements but different order. */ -class ArrayHasSameValuesConstraint extends PHPUnit_Framework_Constraint +class ArrayHasSameValuesConstraint extends \PHPUnit_Framework_Constraint { protected $array; diff --git a/tests/PHPUnit/PredisProfileTestCase.php b/tests/PHPUnit/PredisProfileTestCase.php index 9e34fbbc..af1690c5 100644 --- a/tests/PHPUnit/PredisProfileTestCase.php +++ b/tests/PHPUnit/PredisProfileTestCase.php @@ -149,7 +149,7 @@ abstract class PredisProfileTestCase extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage The class 'stdClass' is not a valid command class. */ public function testDefineInvalidCommand() diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php index f3f1c253..4b8c86a2 100644 --- a/tests/PHPUnit/PredisTestCase.php +++ b/tests/PHPUnit/PredisTestCase.php @@ -17,7 +17,7 @@ use Predis\Profile; /** * Base test case class for the Predis test suite. */ -abstract class PredisTestCase extends PHPUnit_Framework_TestCase +abstract class PredisTestCase extends \PHPUnit_Framework_TestCase { protected $redisServerVersion = null; @@ -25,8 +25,8 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase * Verifies that a Redis command is a valid Predis\Command\CommandInterface * instance with the specified ID and command arguments. * - * @param string|CommandInterface $command Expected command or command ID. - * @param array $arguments Expected command arguments. + * @param string|Command\CommandInterface $command Expected command or command ID. + * @param array $arguments Expected command arguments. * @return RedisCommandConstraint */ public function isRedisCommand($command = null, array $arguments = null) @@ -40,9 +40,9 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase * not check for identity when passing a Predis\Command\CommandInterface * instance for $expected. * - * @param array|string|CommandInterface $expected Expected command. - * @param mixed $actual Actual command. - * @param string $message Optional assertion message. + * @param array|string|Command\CommandInterface $expected Expected command. + * @param mixed $actual Actual command. + * @param string $message Optional assertion message. */ public function assertRedisCommand($expected, $actual, $message = '') { @@ -195,11 +195,11 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase } /** - * @param string $expectedVersion Expected redis version. - * @param string $operator Comparison operator. - * @param callable $callback Callback for matching version. + * @param string $expectedVersion Expected redis version. + * @param string $operator Comparison operator. + * @param callable $callback Callback for matching version. * @return string - * @throws PHPUnit_Framework_SkippedTestError When expected redis version is not met + * @throws \PHPUnit_Framework_SkippedTestError When expected redis version is not met */ protected function executeOnRedisVersion($expectedVersion, $operator, $callback) { @@ -214,11 +214,11 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase } /** - * @param string $expectedVersion Expected redis version. - * @param string $operator Comparison operator. - * @param callable $callback Callback for matching version. + * @param string $expectedVersion Expected redis version. + * @param string $operator Comparison operator. + * @param callable $callback Callback for matching version. * @return string - * @throws PHPUnit_Framework_SkippedTestError When expected redis version is not met + * @throws \PHPUnit_Framework_SkippedTestError When expected redis version is not met */ protected function executeOnProfileVersion($expectedVersion, $operator, $callback) { diff --git a/tests/PHPUnit/RedisCommandConstraint.php b/tests/PHPUnit/RedisCommandConstraint.php index 7bf6bc70..a0b7c87a 100644 --- a/tests/PHPUnit/RedisCommandConstraint.php +++ b/tests/PHPUnit/RedisCommandConstraint.php @@ -14,7 +14,7 @@ use Predis\Command\CommandInterface; /** * Constraint that verifies a redis command. */ -class RedisCommandConstraint extends PHPUnit_Framework_Constraint +class RedisCommandConstraint extends \PHPUnit_Framework_Constraint { protected $commandID; protected $arguments; @@ -80,7 +80,7 @@ class RedisCommandConstraint extends PHPUnit_Framework_Constraint if ($this->arguments) { $string .= " and the following arguments:\n\n"; - $string .= PHPUnit_Util_Type::export($this->arguments); + $string .= \PHPUnit_Util_Type::export($this->arguments); } return $string; diff --git a/tests/Predis/ClientTest.php b/tests/Predis/ClientTest.php index fa6b9717..e81bcbbc 100644 --- a/tests/Predis/ClientTest.php +++ b/tests/Predis/ClientTest.php @@ -213,7 +213,7 @@ class ClientTest extends PredisTestCase /** * @group disconnected - * @expectedException UnexpectedValueException + * @expectedException \UnexpectedValueException * @expectedExceptionMessage The callable connection initializer returned an invalid type. */ public function testConstructorWithCallableConnectionInitializerThrowsExceptionOnInvalidReturnType() @@ -293,7 +293,7 @@ class ClientTest extends PredisTestCase /** * @group disconnected - * @expectedException UnexpectedValueException + * @expectedException \UnexpectedValueException * @expectedExceptionMessage The callable connection initializer returned an invalid type. */ public function testConstructorWithArrayAndOptionAggregateThrowsExceptionOnInvalidReturnType() diff --git a/tests/Predis/Collection/Iterator/ListKeyTest.php b/tests/Predis/Collection/Iterator/ListKeyTest.php index 227602d5..1d92ccce 100644 --- a/tests/Predis/Collection/Iterator/ListKeyTest.php +++ b/tests/Predis/Collection/Iterator/ListKeyTest.php @@ -110,7 +110,7 @@ class ListKeyTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage The $count argument must be a positive integer. */ public function testThrowsExceptionOnConstructorWithNonIntegerCountParameter() @@ -125,7 +125,7 @@ class ListKeyTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage The $count argument must be a positive integer. */ public function testThrowsExceptionOnConstructorWithNegativeCountParameter() diff --git a/tests/Predis/Command/RawCommandTest.php b/tests/Predis/Command/RawCommandTest.php index 3094d2ee..589ac4c1 100644 --- a/tests/Predis/Command/RawCommandTest.php +++ b/tests/Predis/Command/RawCommandTest.php @@ -60,7 +60,7 @@ class RawCommandTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage The arguments array must contain at least the command ID. */ public function testExceptionOnMissingCommandID() @@ -74,7 +74,7 @@ class RawCommandTest extends PredisTestCase * argument is missing, PHP emits an E_WARNING. * * @group disconnected - * @expectedException PHPUnit_Framework_Error_Warning + * @expectedException \PHPUnit_Framework_Error_Warning */ public function testPHPWarningOnMissingCommandIDWithStaticCreate() { diff --git a/tests/Predis/Configuration/ClusterOptionTest.php b/tests/Predis/Configuration/ClusterOptionTest.php index 8e4b5dbd..908fa911 100644 --- a/tests/Predis/Configuration/ClusterOptionTest.php +++ b/tests/Predis/Configuration/ClusterOptionTest.php @@ -65,7 +65,7 @@ class ClusterOptionTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testThrowsExceptionOnInvalidInstanceType() { @@ -78,7 +78,7 @@ class ClusterOptionTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testThrowsExceptionOnInvalidShortNameString() { diff --git a/tests/Predis/Configuration/ReplicationOptionTest.php b/tests/Predis/Configuration/ReplicationOptionTest.php index e3863c1d..8148d335 100644 --- a/tests/Predis/Configuration/ReplicationOptionTest.php +++ b/tests/Predis/Configuration/ReplicationOptionTest.php @@ -55,7 +55,7 @@ class ReplicationOptionTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testThrowsExceptionOnInvalidInstanceType() { diff --git a/tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php b/tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php index 22a87f0d..b8dac930 100644 --- a/tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php +++ b/tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php @@ -65,7 +65,7 @@ class MasterSlaveReplicationTest extends PredisTestCase /** * @group disconnected - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Replication needs one master and at least one slave. */ public function testThrowsExceptionOnEmptyReplication() @@ -76,7 +76,7 @@ class MasterSlaveReplicationTest extends PredisTestCase /** * @group disconnected - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Replication needs one master and at least one slave. */ public function testThrowsExceptionOnMissingMaster() @@ -89,7 +89,7 @@ class MasterSlaveReplicationTest extends PredisTestCase /** * @group disconnected - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Replication needs one master and at least one slave. */ public function testThrowsExceptionOnMissingSlave() @@ -200,7 +200,7 @@ class MasterSlaveReplicationTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid connection or connection not found. */ public function testThrowsErrorWhenSwitchingToUnknownConnection() diff --git a/tests/Predis/Connection/FactoryTest.php b/tests/Predis/Connection/FactoryTest.php index 1ef644a7..a6cfce39 100644 --- a/tests/Predis/Connection/FactoryTest.php +++ b/tests/Predis/Connection/FactoryTest.php @@ -154,7 +154,7 @@ class FactoryTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expecteExceptionMessage Unknown connection scheme: 'unknown'. */ public function testCreateUndefinedConnection() @@ -210,7 +210,7 @@ class FactoryTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException */ public function testDefineConnectionWithInvalidArgument() { @@ -220,7 +220,7 @@ class FactoryTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expecteExceptionMessage Unknown connection scheme: 'tcp'. */ public function testUndefineDefinedConnection() @@ -244,7 +244,7 @@ class FactoryTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expecteExceptionMessage Unknown connection scheme: 'redis'. */ public function testDefineAndUndefineConnection() diff --git a/tests/Predis/Connection/ParametersTest.php b/tests/Predis/Connection/ParametersTest.php index 7f179771..8a9f8e95 100644 --- a/tests/Predis/Connection/ParametersTest.php +++ b/tests/Predis/Connection/ParametersTest.php @@ -224,7 +224,7 @@ class ParametersTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid parameters URI: tcp://invalid:uri */ public function testParsingURIThrowOnInvalidURI() diff --git a/tests/Predis/Connection/PhpiredisSocketConnectionTest.php b/tests/Predis/Connection/PhpiredisSocketConnectionTest.php index d39e6aaa..744434ca 100644 --- a/tests/Predis/Connection/PhpiredisSocketConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisSocketConnectionTest.php @@ -39,7 +39,7 @@ class PhpiredisSocketConnectionTest extends PredisConnectionTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid scheme: 'udp'. */ public function testThrowsExceptionOnInvalidScheme() diff --git a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php index a3f55036..19527686 100644 --- a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php @@ -39,7 +39,7 @@ class PhpiredisStreamConnectionTest extends PredisConnectionTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid scheme: 'udp'. */ public function testThrowsExceptionOnInvalidScheme() diff --git a/tests/Predis/Connection/StreamConnectionTest.php b/tests/Predis/Connection/StreamConnectionTest.php index ca9f5d87..9421f77f 100644 --- a/tests/Predis/Connection/StreamConnectionTest.php +++ b/tests/Predis/Connection/StreamConnectionTest.php @@ -39,7 +39,7 @@ class StreamConnectionTest extends PredisConnectionTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid scheme: 'udp'. */ public function testThrowsExceptionOnInvalidScheme() diff --git a/tests/Predis/Profile/FactoryTest.php b/tests/Predis/Profile/FactoryTest.php index 1c2f2865..26e9548b 100644 --- a/tests/Predis/Profile/FactoryTest.php +++ b/tests/Predis/Profile/FactoryTest.php @@ -85,7 +85,7 @@ class FactoryTest extends PredisTestCase /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage The class 'stdClass' is not a valid profile class. */ public function testDefineInvalidProfile() diff --git a/tests/Predis/Response/Iterator/MultiBulkTupleTest.php b/tests/Predis/Response/Iterator/MultiBulkTupleTest.php index 2ab2d8a5..05825882 100644 --- a/tests/Predis/Response/Iterator/MultiBulkTupleTest.php +++ b/tests/Predis/Response/Iterator/MultiBulkTupleTest.php @@ -23,7 +23,7 @@ class MultiBulkTupleTest extends PredisTestCase { /** * @group disconnected - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Cannot initialize a tuple iterator using an already initiated iterator. */ public function testInitiatedMultiBulkIteratorsAreNotValid() @@ -37,7 +37,7 @@ class MultiBulkTupleTest extends PredisTestCase /** * @group disconnected - * @expectedException UnexpectedValueException + * @expectedException \UnexpectedValueException * @expectedExceptionMessage Invalid response size for a tuple iterator. */ public function testMultiBulkWithOddSizesAreInvalid() diff --git a/tests/Predis/Transaction/MultiExecTest.php b/tests/Predis/Transaction/MultiExecTest.php index 99ea3958..453b3a7f 100644 --- a/tests/Predis/Transaction/MultiExecTest.php +++ b/tests/Predis/Transaction/MultiExecTest.php @@ -933,9 +933,9 @@ class MultiExecTest extends PredisTestCase * Returns a client instance connected to the specified Redis * server instance to perform integration tests. * - * @param array Additional connection parameters. - * @param array Additional client options. - * @return Client client instance. + * @param array $parameters Additional connection parameters. + * @param array $options Additional client options. + * @return Client */ protected function getClient(array $parameters = array(), array $options = array()) {