Mark exceptions as immutable

parent 4cff5bc6
...@@ -5,11 +5,6 @@ ...@@ -5,11 +5,6 @@
<code>int</code> <code>int</code>
</InvalidParamDefault> </InvalidParamDefault>
</file> </file>
<file src="lib/Doctrine/DBAL/Driver/DriverException.php">
<MissingImmutableAnnotation occurrences="1">
<code>public function getMessage();</code>
</MissingImmutableAnnotation>
</file>
<file src="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php"> <file src="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php">
<UndefinedFunction occurrences="14"> <UndefinedFunction occurrences="14">
<code>sasql_pconnect($dsn)</code> <code>sasql_pconnect($dsn)</code>
......
...@@ -6,6 +6,8 @@ use Exception; ...@@ -6,6 +6,8 @@ use Exception;
/** /**
* Abstract base implementation of the {@link DriverException} interface. * Abstract base implementation of the {@link DriverException} interface.
*
* @psalm-immutable
*/ */
abstract class AbstractDriverException extends Exception implements DriverException abstract class AbstractDriverException extends Exception implements DriverException
{ {
......
...@@ -9,6 +9,8 @@ use Throwable; ...@@ -9,6 +9,8 @@ use Throwable;
* *
* Driver exceptions provide the SQLSTATE of the driver * Driver exceptions provide the SQLSTATE of the driver
* and the driver specific error code at the time the error occurred. * and the driver specific error code at the time the error occurred.
*
* @psalm-immutable
*/ */
interface DriverException extends Throwable interface DriverException extends Throwable
{ {
......
...@@ -6,6 +6,8 @@ use Doctrine\DBAL\Driver\AbstractDriverException; ...@@ -6,6 +6,8 @@ use Doctrine\DBAL\Driver\AbstractDriverException;
/** /**
* Exception thrown in case the mysqli driver errors. * Exception thrown in case the mysqli driver errors.
*
* @psalm-immutable
*/ */
class MysqliException extends AbstractDriverException class MysqliException extends AbstractDriverException
{ {
......
...@@ -4,6 +4,9 @@ namespace Doctrine\DBAL\Driver\OCI8; ...@@ -4,6 +4,9 @@ namespace Doctrine\DBAL\Driver\OCI8;
use Doctrine\DBAL\Driver\AbstractDriverException; use Doctrine\DBAL\Driver\AbstractDriverException;
/**
* @psalm-immutable
*/
class OCI8Exception extends AbstractDriverException class OCI8Exception extends AbstractDriverException
{ {
/** /**
......
...@@ -4,6 +4,8 @@ namespace Doctrine\DBAL\Driver; ...@@ -4,6 +4,8 @@ namespace Doctrine\DBAL\Driver;
/** /**
* Tiny wrapper for PDOException instances to implement the {@link DriverException} interface. * Tiny wrapper for PDOException instances to implement the {@link DriverException} interface.
*
* @psalm-immutable
*/ */
class PDOException extends \PDOException implements DriverException class PDOException extends \PDOException implements DriverException
{ {
......
...@@ -12,6 +12,8 @@ use function sasql_stmt_error; ...@@ -12,6 +12,8 @@ use function sasql_stmt_error;
/** /**
* SAP Sybase SQL Anywhere driver exception. * SAP Sybase SQL Anywhere driver exception.
*
* @psalm-immutable
*/ */
class SQLAnywhereException extends AbstractDriverException class SQLAnywhereException extends AbstractDriverException
{ {
......
...@@ -7,6 +7,9 @@ use const SQLSRV_ERR_ERRORS; ...@@ -7,6 +7,9 @@ use const SQLSRV_ERR_ERRORS;
use function rtrim; use function rtrim;
use function sqlsrv_errors; use function sqlsrv_errors;
/**
* @psalm-immutable
*/
class SQLSrvException extends AbstractDriverException class SQLSrvException extends AbstractDriverException
{ {
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment