| 1 | <?php |
||
| 9 | class PingCommand extends Command |
||
| 10 | { |
||
| 11 | /** @var string */ |
||
| 12 | protected $description = "Queue a \"Ping\" event for testing"; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param \Wandu\Q\Queue $queue |
||
| 16 | * @param \Wandu\Event\Dispatcher $dispatcher |
||
| 17 | */ |
||
| 18 | public function __construct(Queue $queue, Dispatcher $dispatcher) |
||
| 23 | |||
| 24 | function execute() |
||
| 29 | } |
||
| 30 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: