Test Failed
Pull Request — master (#684)
by Morten
14:54
created

Audit   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSerializedDate() 0 3 1
1
<?php
2
3
namespace OwenIt\Auditing\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Audit extends Model implements \OwenIt\Auditing\Contracts\Audit
8
{
9 1
    use \OwenIt\Auditing\Audit;
0 ignored issues
show
introduced by
The trait OwenIt\Auditing\Audit requires some properties which are not provided by OwenIt\Auditing\Models\Audit: $new_values, $event, $auditable, $tags, $old_values, $user
Loading history...
10
11
    /**
12
     * {@inheritdoc}
13
     */
14
    protected $guarded = [];
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected $casts = [
20
        'old_values'   => 'json',
21
        'new_values'   => 'json',
22
        // Note: Please do not add 'auditable_id' in here, as it will break non-integer PK models
23
    ];
24
25
    public function getSerializedDate($date)
26
    {
27
        return $this->serializeDate($date);
28
    }
29
}
30