1 | <?php |
||
23 | class UserMailable |
||
24 | { |
||
25 | /** |
||
26 | * The receiver or receivers. |
||
27 | * |
||
28 | * @var array|UserEmail |
||
29 | */ |
||
30 | private $to; |
||
31 | |||
32 | /** |
||
33 | * The from address. |
||
34 | * |
||
35 | * @var UserEmail |
||
36 | */ |
||
37 | private $from; |
||
38 | |||
39 | /** |
||
40 | * The subject. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | private $subject; |
||
45 | |||
46 | /** |
||
47 | * The body in plain text. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private $bodyText; |
||
52 | |||
53 | /** |
||
54 | * The body in HTML. |
||
55 | * |
||
56 | * @var string|null |
||
57 | */ |
||
58 | private $bodyHtml; |
||
59 | |||
60 | /** |
||
61 | * Constructor. |
||
62 | * |
||
63 | * @param array|UserEmail $to The receiver or receivers |
||
64 | * @param UserEmail $from The from address |
||
65 | * @param string $aSubject The subject |
||
66 | * @param string $aBodyText The body in plain text |
||
67 | * @param string $aBodyHtml The body in HTML, can be null |
||
|
|||
68 | */ |
||
69 | public function __construct($to, UserEmail $from, $aSubject, $aBodyText, $aBodyHtml = null) |
||
90 | |||
91 | /** |
||
92 | * Gets the receiver or receivers. |
||
93 | * |
||
94 | * @return array|UserEmail |
||
95 | */ |
||
96 | public function to() |
||
100 | |||
101 | /** |
||
102 | * Gets the from address. |
||
103 | * |
||
104 | * @return UserEmail |
||
105 | */ |
||
106 | public function from() |
||
110 | |||
111 | /** |
||
112 | * Gets the subject. |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | public function subject() |
||
120 | |||
121 | /** |
||
122 | * Gets the body in plain text. |
||
123 | * |
||
124 | * @return string |
||
125 | */ |
||
126 | public function bodyText() |
||
130 | |||
131 | /** |
||
132 | * Gets the body in HTML. |
||
133 | * |
||
134 | * @return string|null |
||
135 | */ |
||
136 | public function bodyHtml() |
||
140 | } |
||
141 |
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.