1 | <?php |
||
13 | class AccessToken extends Model |
||
14 | { |
||
15 | use Authorizable; |
||
16 | use HasAbilities; |
||
17 | use ValidatingTrait; |
||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | protected $fillable = [ |
||
23 | 'identifier', |
||
24 | 'user_id', |
||
25 | 'user_type', |
||
26 | 'client_id', |
||
27 | 'name', |
||
28 | 'is_revoked', |
||
29 | 'expires_at', |
||
30 | 'abilities', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | protected $casts = [ |
||
37 | 'identifier' => 'string', |
||
38 | 'user_id' => 'integer', |
||
39 | 'user_type' => 'string', |
||
40 | 'client_id' => 'integer', |
||
41 | 'name' => 'string', |
||
42 | 'is_revoked' => 'boolean', |
||
43 | 'expires_at' => 'date', |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | protected $observables = [ |
||
50 | 'validating', |
||
51 | 'validated', |
||
52 | ]; |
||
53 | |||
54 | /** |
||
55 | * The default rules that the model will validate against. |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $rules = []; |
||
60 | |||
61 | /** |
||
62 | * Whether the model should throw a |
||
63 | * ValidationException if it fails validation. |
||
64 | * |
||
65 | * @var bool |
||
66 | */ |
||
67 | protected $throwValidationExceptions = true; |
||
68 | |||
69 | /** |
||
70 | * Create a new Eloquent model instance. |
||
71 | * |
||
72 | * @param array $attributes |
||
73 | */ |
||
74 | public function __construct(array $attributes = []) |
||
89 | |||
90 | /** |
||
91 | * Get the client that the token belongs to. |
||
92 | * |
||
93 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
94 | */ |
||
95 | public function client() |
||
99 | |||
100 | /** |
||
101 | * Get the user that the token belongs to. |
||
102 | * |
||
103 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
104 | */ |
||
105 | public function user(): MorphTo |
||
109 | |||
110 | /** |
||
111 | * Get all of the refresh tokens that belong to the access token. |
||
112 | * |
||
113 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
114 | */ |
||
115 | public function refreshTokens() |
||
119 | |||
120 | /** |
||
121 | * Revoke the token instance. |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function revoke() |
||
131 | |||
132 | /** |
||
133 | * Determine if the token is a transient JWT token. |
||
134 | * |
||
135 | * @return bool |
||
136 | */ |
||
137 | public function transient() |
||
141 | } |
||
142 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.