Completed
Pull Request — master (#329)
by Vojtěch
09:52
created

EmptyValueException::__sleep()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 11 and the first side effect is on line 44.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
3
namespace Kdyby\Doctrine\Exception;
4
5
use Doctrine;
6
7
/**
8
 * @author Filip Procházka <[email protected]>
9
 * @deprecated
10
 */
11
class EmptyValueException extends DBALException
0 ignored issues
show
Deprecated Code introduced by
The class Kdyby\Doctrine\Exception\DBALException has been deprecated.

This class, trait or interface has been deprecated.

Loading history...
12
{
13
14
    /**
15
     * @var string|NULL
16
     */
17
    public $column;
18
19
20
    /**
21
     * @param \Exception|\Throwable     $previous
22
     * @param string|NULL               $column
23
     * @param string                    $query
24
     * @param array                     $params
25
     * @param \Doctrine\DBAL\Connection $connection
26
     */
27
    public function __construct($previous, $column = NULL, $query = NULL, $params = [], Doctrine\DBAL\Connection $connection = NULL)
28
    {
29
        parent::__construct($previous, $query, $params, $connection);
30
        $this->column = $column;
31
    }
32
33
34
    /**
35
     * @return array
36
     */
37
    public function __sleep()
38
    {
39
        return array_merge(parent::__sleep(), ['column']);
40
    }
41
42
}
43
44
class_alias(EmptyValueException::class, 'Kdyby\Doctrine\EmptyValueException');
45