1 | <?php |
||
14 | class ProgressBatch extends Model implements Stateful |
||
15 | { |
||
16 | use StatefulTrait; |
||
17 | |||
18 | /** |
||
19 | * The attributes that are mass assignable. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $fillable = ['state', 'accomplished','incidences']; |
||
24 | |||
25 | /** |
||
26 | * Progress States |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $states = [ |
||
31 | 'pending' => ['initial' => true], |
||
32 | 'stopped' , |
||
33 | 'finished' => ['final' => true] |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * Transaction State Transitions |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $transitions = [ |
||
42 | 'stop' => [ |
||
43 | 'from' => ['pending'], |
||
44 | 'to' => 'stopped' |
||
45 | ], |
||
46 | 'resume' => [ |
||
47 | 'from' => ['stopped'], |
||
48 | 'to' => 'pending' |
||
49 | ], |
||
50 | 'finish' => [ |
||
51 | 'from' => ['pending'], |
||
52 | 'to' => 'finished' |
||
53 | ] |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * @return bool |
||
58 | */ |
||
59 | protected function validateFinish() |
||
64 | |||
65 | /** |
||
66 | * Get the progressable associated to this batch. |
||
67 | */ |
||
68 | public function progressable() |
||
72 | |||
73 | } |
||
74 | |||
75 |
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@property
annotation 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.