1 | <?php |
||
12 | class Query |
||
13 | { |
||
14 | /** |
||
15 | * @var string $sql |
||
16 | */ |
||
17 | private $sql; |
||
18 | |||
19 | /** |
||
20 | * @var ParameterManagerInterface $parameterManager |
||
21 | */ |
||
22 | private $parameterManager; |
||
23 | |||
24 | /** |
||
25 | * @var ConnectionInterface $connection |
||
26 | */ |
||
27 | private $connection; |
||
28 | |||
29 | /** |
||
30 | * @param string $sql |
||
31 | * @param ParameterManagerInterface $parameterManager |
||
32 | * @param ConnectionInterface $connection |
||
|
|||
33 | */ |
||
34 | 12 | public function __construct( |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 10 | public function getSQL() |
|
51 | |||
52 | /** |
||
53 | * @return StatementInterface |
||
54 | */ |
||
55 | 2 | public function buildStatement() |
|
62 | |||
63 | /** |
||
64 | * @return mixed |
||
65 | */ |
||
66 | 2 | public function fetchScalar() |
|
73 | |||
74 | /** |
||
75 | * @param int|string $name |
||
76 | * @param mixed $value |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | 1 | public function setParameter($name, $value) |
|
86 | } |
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.