1 | <?php |
||
8 | class SearchIndexTask extends \BuildTask { |
||
9 | |||
10 | protected $title = 'Elastic Search Reindex'; |
||
11 | |||
12 | protected $description = 'Searches the elastic search index'; |
||
13 | |||
14 | /** |
||
15 | * @var ElasticaService |
||
16 | */ |
||
17 | private $service; |
||
18 | |||
19 | public function __construct(ElasticaService $service) { |
||
22 | |||
23 | public function run($request) { |
||
59 | |||
60 | } |
||
61 |
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: