Mark exceptions as immutable

parent 4cff5bc6
......@@ -5,11 +5,6 @@
<code>int</code>
</InvalidParamDefault>
</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">
<UndefinedFunction occurrences="14">
<code>sasql_pconnect($dsn)</code>
......
......@@ -6,6 +6,8 @@ use Exception;
/**
* Abstract base implementation of the {@link DriverException} interface.
*
* @psalm-immutable
*/
abstract class AbstractDriverException extends Exception implements DriverException
{
......
......@@ -9,6 +9,8 @@ use Throwable;
*
* Driver exceptions provide the SQLSTATE of the driver
* and the driver specific error code at the time the error occurred.
*
* @psalm-immutable
*/
interface DriverException extends Throwable
{
......
......@@ -6,6 +6,8 @@ use Doctrine\DBAL\Driver\AbstractDriverException;
/**
* Exception thrown in case the mysqli driver errors.
*
* @psalm-immutable
*/
class MysqliException extends AbstractDriverException
{
......
......@@ -4,6 +4,9 @@ namespace Doctrine\DBAL\Driver\OCI8;
use Doctrine\DBAL\Driver\AbstractDriverException;
/**
* @psalm-immutable
*/
class OCI8Exception extends AbstractDriverException
{
/**
......
......@@ -4,6 +4,8 @@ namespace Doctrine\DBAL\Driver;
/**
* Tiny wrapper for PDOException instances to implement the {@link DriverException} interface.
*
* @psalm-immutable
*/
class PDOException extends \PDOException implements DriverException
{
......
......@@ -12,6 +12,8 @@ use function sasql_stmt_error;
/**
* SAP Sybase SQL Anywhere driver exception.
*
* @psalm-immutable
*/
class SQLAnywhereException extends AbstractDriverException
{
......
......@@ -7,6 +7,9 @@ use const SQLSRV_ERR_ERRORS;
use function rtrim;
use function sqlsrv_errors;
/**
* @psalm-immutable
*/
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