| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Payroll extends Model |
||
| 9 | { |
||
| 10 | use SoftDeletes; |
||
| 11 | |||
| 12 | protected $guarded = ['id']; |
||
| 13 | |||
| 14 | protected $casts = [ |
||
| 15 | 'date' => 'datetime:Y-m-d', |
||
| 16 | ]; |
||
| 17 | |||
| 18 | public function getTitleAttribute() |
||
| 19 | { |
||
| 20 | return 'Payroll for ' . \Carbon\Carbon::parse($this->year . '-' . $this->month . '-1')->format('M') . ' ' . $this->year; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function user() |
||
| 24 | { |
||
| 25 | return $this->belongsTo(config('open-payroll.models.user')); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function payslips() |
||
| 31 | } |
||
| 32 | |||
| 33 | public function status() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.