diff --git a/src/Crate/PDO/Exception/InvalidArgumentException.php b/src/Crate/PDO/Exception/InvalidArgumentException.php index b90c463a..5662ad0e 100644 --- a/src/Crate/PDO/Exception/InvalidArgumentException.php +++ b/src/Crate/PDO/Exception/InvalidArgumentException.php @@ -26,7 +26,7 @@ class InvalidArgumentException extends PDOException implements ExceptionInterface { - public function __construct($message = 'Invalid argument', $code = 0, Exception $previous = null) + public function __construct($message = 'Invalid argument', $code = 0, ?Exception $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Crate/PDO/Exception/UnsupportedException.php b/src/Crate/PDO/Exception/UnsupportedException.php index e96c612b..a77cc445 100644 --- a/src/Crate/PDO/Exception/UnsupportedException.php +++ b/src/Crate/PDO/Exception/UnsupportedException.php @@ -28,7 +28,7 @@ class UnsupportedException extends PDOException { - public function __construct($message = 'Unsupported functionality', $code = 0, Exception $previous = null) + public function __construct($message = 'Unsupported functionality', $code = 0, ?Exception $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Crate/PDO/Http/ServerPool.php b/src/Crate/PDO/Http/ServerPool.php index 806b3981..bd83f612 100644 --- a/src/Crate/PDO/Http/ServerPool.php +++ b/src/Crate/PDO/Http/ServerPool.php @@ -72,7 +72,7 @@ final class ServerPool implements ServerInterface * @param array $servers * @param ClientInterface|null $client */ - public function __construct(array $servers, ClientInterface $client = null) + public function __construct(array $servers, ?ClientInterface $client = null) { if (\count($servers) === 0) { $servers = [self::DEFAULT_SERVER]; diff --git a/src/Crate/PDO/PDOStatementImplementationPhp8.php b/src/Crate/PDO/PDOStatementImplementationPhp8.php index 557410e2..9c1c5501 100644 --- a/src/Crate/PDO/PDOStatementImplementationPhp8.php +++ b/src/Crate/PDO/PDOStatementImplementationPhp8.php @@ -37,7 +37,8 @@ trait PDOStatementImplementationPhp8 * * @return bool */ - public function setFetchMode(int $mode, ...$args) + #[\ReturnTypeWillChange] + public function setFetchMode(int $mode, ...$args): bool { return $this->doSetFetchMode($mode, ...$args); } @@ -51,7 +52,7 @@ public function setFetchMode(int $mode, ...$args) * @return mixed[] */ #[\ReturnTypeWillChange] - public function fetchAll(int $mode = null, ...$args) + public function fetchAll(?int $mode = null, ...$args) { return $this->doFetchAll($mode, ...$args); }