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 | 14 | public function __construct( |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 10 | public function getSQL() |
|
60 | |||
61 | /** |
||
62 | * @return StatementInterface |
||
63 | */ |
||
64 | 4 | public function buildStatement() |
|
71 | |||
72 | /** |
||
73 | * @return mixed |
||
74 | */ |
||
75 | 3 | public function fetchScalar() |
|
82 | |||
83 | /** |
||
84 | * @param int|string $name |
||
85 | * @param mixed $value |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | 2 | public function setParameter($name, $value) |
|
95 | } |
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.