| 1 | <?php |
||
| 11 | class ModuleItem |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $title; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $url; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $title |
||
| 26 | * @param string $url |
||
|
|
|||
| 27 | */ |
||
| 28 | public function __construct($title, $url = null) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function getTitle() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string|null |
||
| 44 | */ |
||
| 45 | public function getUrl() |
||
| 49 | } |
||
| 50 |
This check looks for
@paramannotations 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.