mirror of
https://github.com/predis/predis.git
synced 2026-10-10 13:57:22 +00:00
[tests] Start improving test suite.
- Make use of more typehints for function parameters - Make use of typehints for function return values - Use @var where needed to give proper hints to IDEs and avoid warnings - Replace MockObject::setMethods() with addMethods() and onlyMethods() - Rewording of some phpdocs
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Predis\Protocol;
|
||||
|
||||
require_once __DIR__.'/../CommunicationExceptionTest.php';
|
||||
|
||||
use Predis\CommunicationException;
|
||||
use Predis\CommunicationExceptionTest;
|
||||
use Predis\Connection\NodeConnectionInterface;
|
||||
|
||||
@@ -24,8 +25,12 @@ class ProtocolExceptionTest extends CommunicationExceptionTest
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getException(NodeConnectionInterface $connection, $message, $code = 0, \Exception $inner = null)
|
||||
{
|
||||
protected function getException(
|
||||
NodeConnectionInterface $connection,
|
||||
string $message,
|
||||
int $code = 0,
|
||||
\Exception $inner = null
|
||||
): CommunicationException {
|
||||
return new ProtocolException($connection, $message, $code, $inner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user