Completed
Push — master ( 770316...74fc07 )
by Jeroen
09:08 queued 02:44
created

ExportException::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Kunstmaan\AdminListBundle\Exception;
4
5
/**
6
 * class ExportException
7
 */
8
class ExportException extends \RuntimeException
9
{
10
    /** @var mixed */
11
    protected $data;
12
13
    /**
14
     * Construct Exception.
15
     *
16
     * @param string     $message  Message
17
     * @param mixed      $data
18
     * @param int        $code
19
     * @param \Throwable $previous
0 ignored issues
show
Documentation introduced by
Should the type for parameter $previous not be null|\Throwable?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
20
     */
21
    public function __construct($message = '', $data, $code = 0, \Throwable $previous = null)
22
    {
23
        parent::__construct($message, $code, $previous);
24
        $this->data = $data;
25
    }
26
27
    /**
28
     * @return mixed
29
     */
30
    public function getData()
31
    {
32
        return $this->data;
33
    }
34
35
    /**
36
     * @param mixed $data
37
     */
38
    public function setData($data)
39
    {
40
        $this->data = $data;
41
    }
42
}
43