| 1 | <?php |
||
| 12 | class DutyToday extends Mailable implements ShouldQueue |
||
| 13 | { |
||
| 14 | use Queueable, SerializesModels; |
||
| 15 | |||
| 16 | public $duty; |
||
| 17 | public $user; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * DutyToday constructor. |
||
| 21 | * |
||
| 22 | * @param Duty $duty |
||
| 23 | * @param User $user |
||
| 24 | */ |
||
| 25 | public function __construct(Duty $duty, User $user) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Build the message. |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | public function build() |
||
| 41 | } |
||
| 42 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.