1 | <?php |
||
13 | class CommitFile extends Model |
||
14 | { |
||
15 | /** |
||
16 | * The database table used by the model. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $table = 'commit_files'; |
||
21 | |||
22 | /** |
||
23 | * Attributes that should be mass-assignable. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $fillable = ['commit_id', 'sha', 'filename', 'status', 'additions', 'deletions', 'changes', 'raw_url', 'raw', 'phpcs', 'patch', 'phploc_size', 'phploc_lines_of_code', 'phploc_lines_of_code_percent', 'phploc_comment_lines_of_code', 'phploc_comment_lines_of_code_percent', 'phploc_non-comment_lines_of_code', 'phploc_non-comment_lines_of_code_percent', 'phploc_logical_lines_of_code', 'phploc_logical_lines_of_code_percent', 'phploc_namespaces', 'phploc_interfaces', 'phploc_traits', 'phploc_classes', 'phploc_scope_non-static', 'phploc_scope_static', 'phploc_visibility_public', 'phploc_visibility_public_percent', 'phploc_visibility_non-public', 'phploc_visibility_non-public_percent', 'phploc_named_functions', 'phploc_named_functions_percent', 'phploc_anonymous_functions', 'phploc_constants_global', 'phploc_constants_global_percent', 'phploc_constants_class', 'phploc_constants_class_percent', 'deleted_at']; |
||
28 | |||
29 | /** |
||
30 | * The attributes excluded from the model's JSON form. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $hidden = []; |
||
35 | |||
36 | /** |
||
37 | * The attributes that should be casted to native types. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $casts = []; |
||
42 | |||
43 | public function commit() |
||
47 | |||
48 | public function filePhpcs() |
||
52 | |||
53 | public function totalLines() |
||
59 | |||
60 | public function totalPHPCS($type = 'ERROR') |
||
64 | |||
65 | public function getAdditionsAttribute() |
||
69 | |||
70 | public function getChangesAttribute() |
||
74 | |||
75 | public function getDeletionsAttribute() |
||
79 | |||
80 | public function comments() |
||
84 | } |
||
85 |
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.