1 | <?php |
||
10 | class PersonalAccessTokenResult implements Arrayable, Jsonable |
||
11 | { |
||
12 | /** |
||
13 | * The access token. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | public $accessToken; |
||
18 | |||
19 | /** |
||
20 | * The token model instance. |
||
21 | * |
||
22 | * @var \Rinvex\Oauth\Models\AccessToken |
||
23 | */ |
||
24 | public $token; |
||
25 | |||
26 | /** |
||
27 | * Create a new result instance. |
||
28 | * |
||
29 | * @param string $accessToken |
||
30 | * @param \Rinvex\Oauth\Models\AccessToken $token |
||
31 | * |
||
32 | * @return void |
||
|
|||
33 | */ |
||
34 | public function __construct($accessToken, $token) |
||
39 | |||
40 | /** |
||
41 | * Get the instance as an array. |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | public function toArray() |
||
52 | |||
53 | /** |
||
54 | * Convert the object to its JSON representation. |
||
55 | * |
||
56 | * @param int $options |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function toJson($options = 0) |
||
64 | } |
||
65 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.