| 1 | <?php |
||
| 7 | class TokenUsage |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | private $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Token |
||
| 16 | */ |
||
| 17 | private $token; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var DateTime |
||
| 21 | */ |
||
| 22 | private $createdAt; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private $information = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Token $token |
||
| 31 | * @param array $information |
||
| 32 | * @param DateTime $createdAt |
||
|
|
|||
| 33 | */ |
||
| 34 | 5 | public function __construct(Token $token, array $information, DateTime $createdAt = null) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return int |
||
| 43 | */ |
||
| 44 | public function getId() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return Token |
||
| 51 | */ |
||
| 52 | public function getToken() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return DateTime |
||
| 59 | */ |
||
| 60 | 1 | public function getCreatedAt() |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return array |
||
| 67 | */ |
||
| 68 | 3 | public function getInformation() |
|
| 72 | } |
||
| 73 |
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.