1 | <?php |
||
17 | class Identifier { |
||
18 | private $parts; |
||
19 | |||
20 | /** |
||
21 | * Identifier constructor. |
||
22 | * @param string ...$identifier |
||
23 | */ |
||
|
|||
24 | 5 | public function __construct(...$identifier) { |
|
34 | |||
35 | /** |
||
36 | * Convert the identifier to a simple string. |
||
37 | * |
||
38 | * @return string Returns the identifier as a string. |
||
39 | */ |
||
40 | public function __toString() { |
||
43 | |||
44 | /** |
||
45 | * Escape the identifier. |
||
46 | * |
||
47 | * @param Db $db The database used to escape the identifier. |
||
48 | * @return string Returns the full escaped identifier. |
||
49 | */ |
||
50 | 5 | public function escape(Db $db) { |
|
53 | } |
||
54 |
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.