19
19
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
20
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
21
* DEALINGS IN THE SOFTWARE.
22
- *
23
22
*/
24
23
namespace Facebook \Authentication ;
25
24
26
25
use Facebook \Exception \SDKException ;
27
26
28
27
/**
29
- *
30
28
* Represents metadata from an access token.
31
29
*
32
30
* @package Facebook
31
+ *
33
32
* @see https://developers.facebook.com/docs/graph-api/reference/debug_token
34
33
*/
35
34
class AccessTokenMetadata
@@ -67,8 +66,8 @@ public function __construct(array $metadata)
67
66
/**
68
67
* Returns a value from the metadata.
69
68
*
70
- * @param string $field The property to retrieve.
71
- * @param mixed $default The default to return if the property doesn't exist.
69
+ * @param string $field the property to retrieve
70
+ * @param mixed $default the default to return if the property doesn't exist
72
71
*
73
72
* @return mixed
74
73
*/
@@ -84,12 +83,13 @@ public function getField($field, $default = null)
84
83
/**
85
84
* Returns a value from the metadata.
86
85
*
87
- * @param string $field The property to retrieve.
88
- * @param mixed $default The default to return if the property doesn't exist.
86
+ * @param string $field the property to retrieve
87
+ * @param mixed $default the default to return if the property doesn't exist
89
88
*
90
89
* @return mixed
91
90
*
92
91
* @deprecated 5.0.0 getProperty() has been renamed to getField()
92
+ *
93
93
* @todo v6: Remove this method
94
94
*/
95
95
public function getProperty ($ field , $ default = null )
@@ -100,9 +100,9 @@ public function getProperty($field, $default = null)
100
100
/**
101
101
* Returns a value from a child property in the metadata.
102
102
*
103
- * @param string $parentField The parent property.
104
- * @param string $field The property to retrieve.
105
- * @param mixed $default The default to return if the property doesn't exist.
103
+ * @param string $parentField the parent property
104
+ * @param string $field the property to retrieve
105
+ * @param mixed $default the default to return if the property doesn't exist
106
106
*
107
107
* @return mixed
108
108
*/
@@ -122,8 +122,8 @@ public function getChildProperty($parentField, $field, $default = null)
122
122
/**
123
123
* Returns a value from the error metadata.
124
124
*
125
- * @param string $field The property to retrieve.
126
- * @param mixed $default The default to return if the property doesn't exist.
125
+ * @param string $field the property to retrieve
126
+ * @param mixed $default the default to return if the property doesn't exist
127
127
*
128
128
* @return mixed
129
129
*/
@@ -133,10 +133,10 @@ public function getErrorProperty($field, $default = null)
133
133
}
134
134
135
135
/**
136
- * Returns a value from the "metadata" metadata. *Brain explodes*
136
+ * Returns a value from the "metadata" metadata. *Brain explodes*.
137
137
*
138
- * @param string $field The property to retrieve.
139
- * @param mixed $default The default to return if the property doesn't exist.
138
+ * @param string $field the property to retrieve
139
+ * @param mixed $default the default to return if the property doesn't exist
140
140
*
141
141
* @return mixed
142
142
*/
@@ -148,7 +148,7 @@ public function getMetadataProperty($field, $default = null)
148
148
/**
149
149
* The ID of the application this access token is for.
150
150
*
151
- * @return string| null
151
+ * @return null|string
152
152
*/
153
153
public function getAppId ()
154
154
{
@@ -158,7 +158,7 @@ public function getAppId()
158
158
/**
159
159
* Name of the application this access token is for.
160
160
*
161
- * @return string| null
161
+ * @return null|string
162
162
*/
163
163
public function getApplication ()
164
164
{
@@ -169,7 +169,7 @@ public function getApplication()
169
169
* Any error that a request to the graph api
170
170
* would return due to the access token.
171
171
*
172
- * @return bool| null
172
+ * @return null|bool
173
173
*/
174
174
public function isError ()
175
175
{
@@ -179,7 +179,7 @@ public function isError()
179
179
/**
180
180
* The error code for the error.
181
181
*
182
- * @return int| null
182
+ * @return null|int
183
183
*/
184
184
public function getErrorCode ()
185
185
{
@@ -189,7 +189,7 @@ public function getErrorCode()
189
189
/**
190
190
* The error message for the error.
191
191
*
192
- * @return string| null
192
+ * @return null|string
193
193
*/
194
194
public function getErrorMessage ()
195
195
{
@@ -199,7 +199,7 @@ public function getErrorMessage()
199
199
/**
200
200
* The error subcode for the error.
201
201
*
202
- * @return int| null
202
+ * @return null|int
203
203
*/
204
204
public function getErrorSubcode ()
205
205
{
@@ -209,7 +209,7 @@ public function getErrorSubcode()
209
209
/**
210
210
* DateTime when this access token expires.
211
211
*
212
- * @return \DateTime|null
212
+ * @return null| \DateTime
213
213
*/
214
214
public function getExpiresAt ()
215
215
{
@@ -219,7 +219,7 @@ public function getExpiresAt()
219
219
/**
220
220
* Whether the access token is still valid or not.
221
221
*
222
- * @return boolean| null
222
+ * @return null|bool
223
223
*/
224
224
public function getIsValid ()
225
225
{
@@ -234,7 +234,7 @@ public function getIsValid()
234
234
*
235
235
* @see https://developers.facebook.com/docs/facebook-login/access-tokens#debug
236
236
*
237
- * @return \DateTime|null
237
+ * @return null| \DateTime
238
238
*/
239
239
public function getIssuedAt ()
240
240
{
@@ -245,7 +245,7 @@ public function getIssuedAt()
245
245
* General metadata associated with the access token.
246
246
* Can contain data like 'sso', 'auth_type', 'auth_nonce'.
247
247
*
248
- * @return array| null
248
+ * @return null|array
249
249
*/
250
250
public function getMetadata ()
251
251
{
@@ -255,7 +255,7 @@ public function getMetadata()
255
255
/**
256
256
* The 'sso' child property from the 'metadata' parent property.
257
257
*
258
- * @return string| null
258
+ * @return null|string
259
259
*/
260
260
public function getSso ()
261
261
{
@@ -265,7 +265,7 @@ public function getSso()
265
265
/**
266
266
* The 'auth_type' child property from the 'metadata' parent property.
267
267
*
268
- * @return string| null
268
+ * @return null|string
269
269
*/
270
270
public function getAuthType ()
271
271
{
@@ -275,7 +275,7 @@ public function getAuthType()
275
275
/**
276
276
* The 'auth_nonce' child property from the 'metadata' parent property.
277
277
*
278
- * @return string| null
278
+ * @return null|string
279
279
*/
280
280
public function getAuthNonce ()
281
281
{
@@ -286,7 +286,7 @@ public function getAuthNonce()
286
286
* For impersonated access tokens, the ID of
287
287
* the page this token contains.
288
288
*
289
- * @return string| null
289
+ * @return null|string
290
290
*/
291
291
public function getProfileId ()
292
292
{
@@ -307,7 +307,7 @@ public function getScopes()
307
307
/**
308
308
* The ID of the user this access token is for.
309
309
*
310
- * @return string| null
310
+ * @return null|string
311
311
*/
312
312
public function getUserId ()
313
313
{
0 commit comments