1 | <?php |
||
21 | class Query |
||
22 | { |
||
23 | /** |
||
24 | * @var string $sql |
||
25 | */ |
||
26 | private $sql; |
||
27 | |||
28 | /** |
||
29 | * @var ParameterManagerInterface $parameterManager |
||
30 | */ |
||
31 | private $parameterManager; |
||
32 | |||
33 | /** |
||
34 | * @var ConnectionInterface $connection |
||
35 | */ |
||
36 | private $connection; |
||
37 | |||
38 | /** |
||
39 | * @param string $sql |
||
40 | * @param ParameterManagerInterface $parameterManager |
||
41 | * @param ConnectionInterface $connection |
||
|
|||
42 | */ |
||
43 | 16 | public function __construct( |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 11 | public function getSQL() |
|
60 | |||
61 | /** |
||
62 | * @return ConnectionInterface |
||
63 | */ |
||
64 | 2 | public function getConnection() |
|
68 | |||
69 | /** |
||
70 | * @return StatementInterface |
||
71 | */ |
||
72 | 4 | public function buildStatement() |
|
79 | |||
80 | /** |
||
81 | * @return mixed |
||
82 | */ |
||
83 | 3 | public function fetchScalar() |
|
90 | |||
91 | /** |
||
92 | * @param int|string $name |
||
93 | * @param mixed $value |
||
94 | * |
||
95 | * @return $this |
||
96 | */ |
||
97 | 2 | public function setParameter($name, $value) |
|
103 | } |
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.