File::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
ccs 6
cts 6
cp 1
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
3
namespace LeadThread\Upload\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class File extends Model
8
{
9
    protected $table;
10
    protected $guarded = ['id'];
11
12 12
    public function __construct(array $attributes = [])
13
    {
14 12
        if (empty($this->table)) {
15 12
            $this->table = config('upload.table');
16 12
        }
17 12
        parent::__construct($attributes);
18 12
    }
19
20
    // [
21
    //  'mime'
22
    //  'path'
23
    //  'disk'
24
    //  'filename'
25
    //  'extension'
26
    //  'fingerprint'
27
    // ]
28
}
29