1 | <?php |
||
14 | class Commit extends Model |
||
15 | { |
||
16 | /** |
||
17 | * The database table used by the model. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $table = 'commits'; |
||
22 | |||
23 | /** |
||
24 | * Attributes that should be mass-assignable. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $fillable = ['product_backlog_id', 'branch_id', 'user_id', 'issue_id', 'sha', 'url', 'message', 'html_url', 'date', 'tree_sha', 'tree_url', 'deleted_at']; |
||
29 | |||
30 | /** |
||
31 | * The attributes excluded from the model's JSON form. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $hidden = []; |
||
36 | |||
37 | /** |
||
38 | * The attributes that should be casted to native types. |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $casts = []; |
||
43 | |||
44 | protected $morphClass = 'commit'; |
||
45 | |||
46 | public function branch() |
||
50 | |||
51 | public function issue() |
||
55 | |||
56 | public function repository() |
||
60 | |||
61 | public function user() |
||
65 | |||
66 | public function pullRequestsHasCommits() |
||
70 | |||
71 | public function files() |
||
75 | |||
76 | public function totalLines() |
||
84 | |||
85 | public function totalAdditions() |
||
93 | |||
94 | public function totalChanges() |
||
102 | |||
103 | public function totalDeletions() |
||
111 | |||
112 | public function totalPHPCS($type = 'ERROR') |
||
120 | |||
121 | public function getDateforhumansAttribute() |
||
125 | |||
126 | public function comments() |
||
130 | } |
||
131 |
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.