1 | <?php |
||
13 | final class Module extends UuidModel |
||
14 | { |
||
15 | use ManyMinistryModules; |
||
16 | use ActiveTrait; |
||
17 | use ImageableTrait; |
||
18 | use CommentableTrait; |
||
19 | use StorageTrait; |
||
20 | |||
21 | protected $guarded = ['id']; |
||
22 | protected $table = 'fg_modules'; |
||
23 | |||
24 | protected $hidden = [ |
||
25 | 'created_at', |
||
26 | 'updated_at', |
||
27 | ]; |
||
28 | |||
29 | public function getNameAttribute($val) |
||
33 | |||
34 | /** |
||
35 | * Checks is if the authenticated user is using this module. |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function getUsedAttribute(): bool |
||
50 | |||
51 | /** |
||
52 | * Formats the description. |
||
53 | * |
||
54 | * @param $val |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getDescriptionAttribute($val) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function filesDir() |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function getFileName() |
||
80 | |||
81 | public function getImageDimensions() |
||
85 | } |
||
86 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: