| 1 | <?php |
||
| 15 | class UserEvent extends Event |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var AdvancedUserInterface |
||
| 19 | */ |
||
| 20 | private $user; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param AdvancedUserInterface $user |
||
| 24 | */ |
||
| 25 | function __construct(AdvancedUserInterface $user) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return AdvancedUserInterface |
||
| 32 | */ |
||
| 33 | public function getUser() |
||
| 37 | } |
||
| 38 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.