Test Setup Failed
Push — master ( b9960b...b23bbe )
by Roman
01:42
created

SoftDeletes   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 36
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A bootSoftDeletes() 0 5 1
A getQualifiedDeletedAtColumn() 0 4 1
A trashed() 0 4 1
1
<?php
2
3
namespace lroman242\LaravelCassandra\Eloquent;
4
5
use Exception;
6
7
trait SoftDeletes
8
{
9
    use \Illuminate\Database\Eloquent\SoftDeletes;
10
11
    /**
12
     * Boot the soft deleting trait for a model.
13
     *
14
     * @return void
15
     *
16
     * @throws \Exception
17
     */
18
    public static function bootSoftDeletes()
19
    {
20
        throw new Exception('Not implemented');
21
//        static::addGlobalScope(new SoftDeletingScope);
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function getQualifiedDeletedAtColumn()
28
    {
29
        return $this->getDeletedAtColumn();
30
    }
31
32
    /**
33
     * Determine if the model instance has been soft-deleted.
34
     *
35
     * @return bool
36
     */
37
    public function trashed()
38
    {
39
        return $this->{$this->getDeletedAtColumn()} != '';
40
    }
41
42
}
43