1 | <?php namespace Anomaly\Streams\Platform\Model\Command; |
||
13 | class CascadeRestore |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * The eloquent model. |
||
18 | * |
||
19 | * @var EloquentModel |
||
20 | */ |
||
21 | protected $model; |
||
22 | |||
23 | /** |
||
24 | * Create a new CascadeRestore instance. |
||
25 | * |
||
26 | * @param EloquentModel $model |
||
27 | */ |
||
28 | public function __construct(EloquentModel $model) |
||
32 | |||
33 | /** |
||
34 | * Handle the command. |
||
35 | */ |
||
36 | public function handle() |
||
60 | } |
||
61 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: