Total Complexity | 11 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
12 | class Event extends UuidModel |
||
13 | { |
||
14 | use BelongsToMinistryTrait, CommentableTrait, ImageableTrait, StorageTrait; |
||
15 | |||
16 | protected $table = 'fg_events'; |
||
17 | protected $casts = [ |
||
18 | 'location' => 'array', |
||
19 | ]; |
||
20 | |||
21 | protected $hidden = [ |
||
22 | 'ministry_id', |
||
23 | 'created_at', |
||
24 | 'updated_at', |
||
25 | ]; |
||
26 | |||
27 | public function guests() |
||
28 | { |
||
29 | return $this->hasMany(Guest::class); |
||
30 | } |
||
31 | |||
32 | public function getNameAttribute($val) |
||
33 | { |
||
34 | return ucwords($val); |
||
35 | } |
||
36 | |||
37 | public function getDescriptionAttribute($val) |
||
40 | } |
||
41 | |||
42 | public function scopePublished($query) |
||
43 | { |
||
44 | if (! config('faithgen-sdk.source')) { |
||
45 | return $query->wherePublished(true); |
||
46 | } else { |
||
47 | return $query; |
||
48 | } |
||
49 | } |
||
50 | |||
51 | public function getPublishedAttribute($val) |
||
52 | { |
||
53 | return (bool) $val; |
||
54 | } |
||
55 | |||
56 | public function filesDir() |
||
57 | { |
||
58 | return 'events'; |
||
59 | } |
||
60 | |||
61 | public function getFileName() |
||
62 | { |
||
63 | return $this->image->name; |
||
64 | } |
||
65 | |||
66 | public function getImageDimensions() |
||
69 | } |
||
70 | |||
71 | public function getAvatarAttribute() |
||
72 | { |
||
73 | if (! $this->image()->exists()) { |
||
74 | return; |
||
83 |
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