Employee   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 21
rs 10
ccs 2
cts 2
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getActiveAttribute() 0 3 1
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 8
    public function getActiveAttribute($active)
30
    {
31 8
        return (bool) $active;
32
    }
33
}
34