1 | <?php |
||
32 | class Tag extends Model |
||
33 | { |
||
34 | use Traits\Tag\CrudTrait, |
||
35 | Traits\Tag\QueryTrait, |
||
36 | Traits\Tag\RelationTrait, |
||
37 | Traits\Tag\CountTrait; |
||
38 | |||
39 | /** |
||
40 | * Core tag: Open. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | const STATUS_OPEN = 'open'; |
||
45 | |||
46 | /** |
||
47 | * Core tag: Closed. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | const STATUS_CLOSED = 'closed'; |
||
52 | |||
53 | /** |
||
54 | * Core tag group: Status. |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | const GROUP_STATUS = 'status'; |
||
59 | |||
60 | /** |
||
61 | * Core tag group: Type. |
||
62 | * |
||
63 | * @var string |
||
64 | */ |
||
65 | const GROUP_TYPE = 'type'; |
||
66 | |||
67 | /** |
||
68 | * Core tag group: Resolution. |
||
69 | * |
||
70 | * @var string |
||
71 | */ |
||
72 | const GROUP_RESOLUTION = 'resolution'; |
||
73 | |||
74 | /** |
||
75 | * Timestamp enabled. |
||
76 | * |
||
77 | * @var bool |
||
78 | */ |
||
79 | public $timestamps = true; |
||
80 | |||
81 | /** |
||
82 | * List of allowed columns to be used in $this->fill(). |
||
83 | * |
||
84 | * @var array |
||
85 | */ |
||
86 | public $fillable = ['parent_id', 'name', 'bgcolor', 'group', 'role_limit', 'message_limit', 'readonly']; |
||
87 | |||
88 | /** |
||
89 | * Name of database table. |
||
90 | * |
||
91 | * @var string |
||
92 | */ |
||
93 | protected $table = 'tags'; |
||
94 | |||
95 | /** |
||
96 | * Generate a URL for the tag. |
||
97 | * |
||
98 | * @param string $url |
||
99 | * |
||
100 | * @return mixed |
||
101 | 2 | */ |
|
102 | public function to($url) |
||
106 | |||
107 | /** |
||
108 | * Returns tag full name with prefix group name and ":" in between. |
||
109 | * |
||
110 | * @return string |
||
111 | 33 | */ |
|
112 | public function getFullNameAttribute() |
||
116 | |||
117 | /** |
||
118 | * Whether or not the current user can view this tag. |
||
119 | * |
||
120 | * @return bool |
||
121 | 7 | */ |
|
122 | public function canView() |
||
126 | |||
127 | /** |
||
128 | * Whether or not the tag to mark issue as ready only. |
||
129 | * |
||
130 | * @return bool |
||
131 | 5 | */ |
|
132 | public function isReadOnly() |
||
136 | 5 | ||
137 | 5 | /** |
|
138 | 5 | * Return an array of tag details. |
|
139 | * |
||
140 | * @return array |
||
141 | */ |
||
142 | public function toShortArray() |
||
152 | 4 | ||
153 | /** |
||
154 | * Returns an array of core groups. |
||
155 | * |
||
156 | * @return array |
||
157 | */ |
||
158 | public static function getCoreGroups() |
||
166 | 3 | ||
167 | /** |
||
168 | * Whether or not the user is allowed to receive messages that contains the current tag. |
||
169 | 1 | * |
|
170 | * @param User $user |
||
171 | * |
||
172 | * @return bool |
||
173 | */ |
||
174 | public function allowMessagesToUser(User $user) |
||
182 | } |
||
183 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: