Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 81.25% |
Changes | 0 |
1 | <?php |
||
8 | class File extends Model |
||
9 | { |
||
10 | public $timestamps = true; |
||
11 | |||
12 | protected $fillable = [ |
||
13 | 'uuid', |
||
14 | 'filename', |
||
15 | 'size', |
||
16 | ]; |
||
17 | |||
18 | 3 | public function getSizeAttribute($value) |
|
19 | { |
||
20 | 3 | return bytesToHuman($value); |
|
21 | } |
||
22 | |||
23 | 3 | public function canDeleteSafely() |
|
26 | } |
||
27 | |||
28 | public function scopeUnused ($query) |
||
29 | { |
||
30 | $usedIds = DB::table(config('twill.fileables_table'))->get()->pluck('file_id'); |
||
31 | return $query->whereNotIn('id', $usedIds->toArray())->get(); |
||
32 | } |
||
33 | |||
34 | 3 | public function toCmsArray() |
|
43 | ]; |
||
44 | } |
||
45 | |||
46 | 49 | public function getTable() |
|
51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths