These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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
|
|||
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 |
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.