|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
fix: add return type declarations to Eloquent relation methods
Larastan 3.x requires explicit return types on relation methods to
verify relation existence when using with(), has(), etc. This adds
the appropriate return type declarations to all relation methods
flagged by the larastan.relationExistence rule.
Models fixed:
- Profile (avatar, statuses)
- User (profile)
- Status (profile, media, hashtags)
- DirectMessage (status, author, recipient)
- Report (reporter, status, reportedUser)
- Like (actor, status)
- Media (status)
- Notification (item)
- HashtagFollow (hashtag)
- OauthClient (user)
- Story (profile)
- StatusHashtag (status, hashtag, profile, media)
- AccountInterstitial (user)
- Hashtag (posts)
- CustomFilter (keywords)
- CustomFilterKeyword (customFilter)
- AdminShadowFilter (profile)
- ImportPost (status)
4 weeks ago
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
use Illuminate\Support\Carbon;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @property int $id
|
|
|
|
|
* @property int|null $user_id
|
|
|
|
|
* @property string $name
|
|
|
|
|
* @property string|null $secret
|
|
|
|
|
* @property string|null $provider
|
|
|
|
|
* @property string $redirect
|
|
|
|
|
* @property int $personal_access_client
|
|
|
|
|
* @property int $password_client
|
|
|
|
|
* @property int $revoked
|
|
|
|
|
* @property Carbon|null $created_at
|
|
|
|
|
* @property Carbon|null $updated_at
|
|
|
|
|
* @property-read User|null $user
|
|
|
|
|
*
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient newModelQuery()
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient newQuery()
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient query()
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereCreatedAt($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereId($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereName($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient wherePasswordClient($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient wherePersonalAccessClient($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereProvider($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereRedirect($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereRevoked($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereSecret($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereUpdatedAt($value)
|
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|OauthClient whereUserId($value)
|
|
|
|
|
*
|
|
|
|
|
* @mixin \Eloquent
|
|
|
|
|
*/
|
|
|
|
|
class OauthClient extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $table = 'oauth_clients';
|
|
|
|
|
|
fix: add return type declarations to Eloquent relation methods
Larastan 3.x requires explicit return types on relation methods to
verify relation existence when using with(), has(), etc. This adds
the appropriate return type declarations to all relation methods
flagged by the larastan.relationExistence rule.
Models fixed:
- Profile (avatar, statuses)
- User (profile)
- Status (profile, media, hashtags)
- DirectMessage (status, author, recipient)
- Report (reporter, status, reportedUser)
- Like (actor, status)
- Media (status)
- Notification (item)
- HashtagFollow (hashtag)
- OauthClient (user)
- Story (profile)
- StatusHashtag (status, hashtag, profile, media)
- AccountInterstitial (user)
- Hashtag (posts)
- CustomFilter (keywords)
- CustomFilterKeyword (customFilter)
- AdminShadowFilter (profile)
- ImportPost (status)
4 weeks ago
|
|
|
public function user(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
|
}
|
|
|
|
|
}
|