1 | <?php |
||
28 | class Message extends \Eloquent |
||
29 | { |
||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $primaryKey = 'id'; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $table = 'messages'; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $fillable = ['gitter_id', 'user_id', 'room_id', 'text', 'html', 'urls', 'created_at', 'updated_at']; |
||
44 | |||
45 | /** |
||
46 | * @param GitterMessage $gitter |
||
47 | * @param \Closure|null $new |
||
48 | * @return Message |
||
49 | */ |
||
50 | public static function make(GitterMessage $gitter, \Closure $new = null) |
||
86 | |||
87 | /** |
||
88 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
89 | */ |
||
90 | public function room() |
||
94 | |||
95 | |||
96 | /** |
||
97 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
98 | */ |
||
99 | public function mentions() |
||
103 | |||
104 | /** |
||
105 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
106 | */ |
||
107 | public function user() |
||
111 | |||
112 | /** |
||
113 | * @param $content |
||
114 | * @return Text |
||
115 | */ |
||
116 | public function getTextAttribute($content) |
||
120 | |||
121 | /** |
||
122 | * @param array $urls |
||
123 | */ |
||
124 | public function setUrlsAttribute($urls = []) |
||
128 | |||
129 | /** |
||
130 | * @param $urls |
||
131 | * @return array|mixed |
||
132 | */ |
||
133 | public function getUrlsAttribute($urls) |
||
142 | } |
||
143 |
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.