Completed
Push — master ( b23bbe...fdbc4a )
by Roman
09:09
created

SoftDeletes::getQualifiedDeletedAtColumn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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