Completed
Push — master ( c4e200...5f73d9 )
by Igor
06:13 queued 27s
created

Employee::getActiveAttribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Notifications\Notifiable;
7
use Illuminate\Contracts\Auth\MustVerifyEmail;
8
use Illuminate\Contracts\Auth\Authenticatable;
9
use Illuminate\Auth\Authenticatable as AuthenticableTrait;
10
11
class Employee extends Model implements Authenticatable
12
{
13
    use Notifiable;
0 ignored issues
show
introduced by
The trait Illuminate\Notifications\Notifiable requires some properties which are not provided by App\Models\Employee: $email, $phone_number
Loading history...
14
    use AuthenticableTrait;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Auth\Authenticatable requires the property $password which is not provided by App\Models\Employee.
Loading history...
15
16
    protected $table = 'employees';
17
    public $timestamps = true;
18
19
    /**
20
     * The attributes that should be hidden for arrays.
21
     *
22
     * @var array
23
     */
24
    protected $hidden = [
25
        'password', 'remember_token',
26
    ];
27
    protected $dateFormat = 'Y-m-d H:i:s';
28
29 6
    public function getActiveAttribute($active)
30
    {
31 6
        return (bool) $active;
32
    }
33
}
34