Completed
Push — master ( 825d81...9c7056 )
by Maxime
08:49
created

Asset::scopeLocale()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 3
dl 0
loc 8
ccs 0
cts 7
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Distilleries\Contentful\Models;
4
5
use Distilleries\Contentful\Models\Traits\Localable;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\Eloquent\Builder;
8
9
/**
10
 * @property string $contentful_id
11
 * @property string $locale
12
 * @property string $title
13
 * @property string $description
14
 * @property string $url
15
 * @property string $file_name
16
 * @property string $content_type
17
 * @property integer $size
18
 * @property integer $width
19
 * @property integer $height
20
 * @property \Illuminate\Support\Carbon $created_at
21
 * @property \Illuminate\Support\Carbon $updated_at
22
 */
23
class Asset extends Model
24
{
25
    use Localable;
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected $table = 'assets';
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected $fillable = [
35
        'contentful_id',
36
        'locale',
37
        'title',
38
        'description',
39
        'url',
40
        'file_name',
41
        'content_type',
42
        'size',
43
        'width',
44
        'height',
45
    ];
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    protected $casts = [
51
        'size' => 'integer',
52
        'width' => 'integer',
53
        'height' => 'integer',
54
    ];
55
56
}
57