1 | <?php |
||
29 | class Message extends \Eloquent |
||
30 | { |
||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $primaryKey = 'id'; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $table = 'messages'; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $fillable = ['gitter_id', 'user_id', 'room_id', 'text', 'html', 'urls', 'created_at', 'updated_at']; |
||
45 | |||
46 | /** |
||
47 | * @param GitterMessage $gitter |
||
48 | * @param \Closure|null $new |
||
49 | * @return Message |
||
50 | */ |
||
51 | public static function make(GitterMessage $gitter, \Closure $new = null) |
||
92 | |||
93 | /** |
||
94 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
95 | */ |
||
96 | public function room() |
||
100 | |||
101 | /** |
||
102 | * @return BelongsToMany |
||
103 | */ |
||
104 | public function mentions() |
||
114 | |||
115 | /** |
||
116 | * @param User $user |
||
117 | * @return BelongsToMany |
||
118 | */ |
||
119 | public function hasMention(User $user) |
||
123 | |||
124 | /** |
||
125 | * @return bool |
||
126 | */ |
||
127 | public function hasMentions() |
||
131 | |||
132 | /** |
||
133 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
134 | */ |
||
135 | public function user() |
||
139 | |||
140 | /** |
||
141 | * @param $content |
||
142 | * @return Text |
||
143 | */ |
||
144 | public function getTextAttribute($content) |
||
148 | |||
149 | /** |
||
150 | * @param array $urls |
||
151 | */ |
||
152 | public function setUrlsAttribute($urls = null) |
||
159 | |||
160 | /** |
||
161 | * @param $urls |
||
162 | * @return array|mixed |
||
163 | */ |
||
164 | public function getUrlsAttribute($urls) |
||
173 | } |
||
174 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.