Completed
Push — master ( 91f666...3f0f06 )
by Jared
01:52
created

SoftDelete   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A autoDefinitionSoftDelete() 0 8 1
1
<?php
2
3
namespace Pulsar\Traits;
4
5
use Pulsar\Type;
6
7
/**
8
 * Installs `deleted_at` properties on the model.
9
 */
10
trait SoftDelete
11
{
12
    protected static function autoDefinitionSoftDelete(): void
13
    {
14
        static::$properties['deleted_at'] = [
15
            'type' => Type::DATE,
16
            'validate' => 'timestamp|db_timestamp',
17
            'null' => true,
18
        ];
19
    }
20
}
21