Skip to content

Commit efd5963

Browse files
committed
code style fixes
1 parent 2d6f192 commit efd5963

File tree

112 files changed

+629
-772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+629
-772
lines changed

.php_cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
$config = PhpCsFixer\Config::create()
2+
3+
return PhpCsFixer\Config::create()
34
->setRiskyAllowed(false)
45
->setRules([
56
'@Symfony' => false,
@@ -26,9 +27,4 @@ $config = PhpCsFixer\Config::create()
2627
'no_empty_comment' => true,
2728
'no_trailing_whitespace_in_comment' => true,
2829
])
29-
->setFinder(
30-
PhpCsFixer\Finder::create()
31-
->in(__DIR__.'/src')
32-
)
3330
;
34-
return $config;

src/Application.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2020
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121
* DEALINGS IN THE SOFTWARE.
22-
*
2322
*/
2423
namespace Facebook;
2524

@@ -29,12 +28,12 @@
2928
class Application implements \Serializable
3029
{
3130
/**
32-
* @var string The app ID.
31+
* @var string the app ID
3332
*/
3433
protected $id;
3534

3635
/**
37-
* @var string The app secret.
36+
* @var string the app secret
3837
*/
3938
protected $secret;
4039

src/Authentication/AccessToken.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2020
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121
* DEALINGS IN THE SOFTWARE.
22-
*
2322
*/
2423
namespace Facebook\Authentication;
2524

2625
/**
27-
*
2826
* @package Facebook
2927
*/
3028
class AccessToken
@@ -39,7 +37,7 @@ class AccessToken
3937
/**
4038
* Date when token expires.
4139
*
42-
* @var \DateTime|null
40+
* @var null|\DateTime
4341
*/
4442
protected $expiresAt;
4543

@@ -60,7 +58,7 @@ public function __construct($accessToken, $expiresAt = 0)
6058
/**
6159
* Generate an app secret proof to sign a request to Graph.
6260
*
63-
* @param string $appSecret The app secret.
61+
* @param string $appSecret the app secret
6462
*
6563
* @return string
6664
*/
@@ -72,7 +70,7 @@ public function getAppSecretProof($appSecret)
7270
/**
7371
* Getter for expiresAt.
7472
*
75-
* @return \DateTime|null
73+
* @return null|\DateTime
7674
*/
7775
public function getExpiresAt()
7876
{
@@ -106,7 +104,7 @@ public function isLongLived()
106104
/**
107105
* Checks the expiration of the access token.
108106
*
109-
* @return boolean|null
107+
* @return null|bool
110108
*/
111109
public function isExpired()
112110
{

src/Authentication/AccessTokenMetadata.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2020
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121
* DEALINGS IN THE SOFTWARE.
22-
*
2322
*/
2423
namespace Facebook\Authentication;
2524

2625
use Facebook\Exception\SDKException;
2726

2827
/**
29-
*
3028
* Represents metadata from an access token.
3129
*
3230
* @package Facebook
31+
*
3332
* @see https://developers.facebook.com/docs/graph-api/reference/debug_token
3433
*/
3534
class AccessTokenMetadata
@@ -67,8 +66,8 @@ public function __construct(array $metadata)
6766
/**
6867
* Returns a value from the metadata.
6968
*
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
7271
*
7372
* @return mixed
7473
*/
@@ -84,12 +83,13 @@ public function getField($field, $default = null)
8483
/**
8584
* Returns a value from the metadata.
8685
*
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
8988
*
9089
* @return mixed
9190
*
9291
* @deprecated 5.0.0 getProperty() has been renamed to getField()
92+
*
9393
* @todo v6: Remove this method
9494
*/
9595
public function getProperty($field, $default = null)
@@ -100,9 +100,9 @@ public function getProperty($field, $default = null)
100100
/**
101101
* Returns a value from a child property in the metadata.
102102
*
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
106106
*
107107
* @return mixed
108108
*/
@@ -122,8 +122,8 @@ public function getChildProperty($parentField, $field, $default = null)
122122
/**
123123
* Returns a value from the error metadata.
124124
*
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
127127
*
128128
* @return mixed
129129
*/
@@ -133,10 +133,10 @@ public function getErrorProperty($field, $default = null)
133133
}
134134

135135
/**
136-
* Returns a value from the "metadata" metadata. *Brain explodes*
136+
* Returns a value from the "metadata" metadata. *Brain explodes*.
137137
*
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
140140
*
141141
* @return mixed
142142
*/
@@ -148,7 +148,7 @@ public function getMetadataProperty($field, $default = null)
148148
/**
149149
* The ID of the application this access token is for.
150150
*
151-
* @return string|null
151+
* @return null|string
152152
*/
153153
public function getAppId()
154154
{
@@ -158,7 +158,7 @@ public function getAppId()
158158
/**
159159
* Name of the application this access token is for.
160160
*
161-
* @return string|null
161+
* @return null|string
162162
*/
163163
public function getApplication()
164164
{
@@ -169,7 +169,7 @@ public function getApplication()
169169
* Any error that a request to the graph api
170170
* would return due to the access token.
171171
*
172-
* @return bool|null
172+
* @return null|bool
173173
*/
174174
public function isError()
175175
{
@@ -179,7 +179,7 @@ public function isError()
179179
/**
180180
* The error code for the error.
181181
*
182-
* @return int|null
182+
* @return null|int
183183
*/
184184
public function getErrorCode()
185185
{
@@ -189,7 +189,7 @@ public function getErrorCode()
189189
/**
190190
* The error message for the error.
191191
*
192-
* @return string|null
192+
* @return null|string
193193
*/
194194
public function getErrorMessage()
195195
{
@@ -199,7 +199,7 @@ public function getErrorMessage()
199199
/**
200200
* The error subcode for the error.
201201
*
202-
* @return int|null
202+
* @return null|int
203203
*/
204204
public function getErrorSubcode()
205205
{
@@ -209,7 +209,7 @@ public function getErrorSubcode()
209209
/**
210210
* DateTime when this access token expires.
211211
*
212-
* @return \DateTime|null
212+
* @return null|\DateTime
213213
*/
214214
public function getExpiresAt()
215215
{
@@ -219,7 +219,7 @@ public function getExpiresAt()
219219
/**
220220
* Whether the access token is still valid or not.
221221
*
222-
* @return boolean|null
222+
* @return null|bool
223223
*/
224224
public function getIsValid()
225225
{
@@ -234,7 +234,7 @@ public function getIsValid()
234234
*
235235
* @see https://developers.facebook.com/docs/facebook-login/access-tokens#debug
236236
*
237-
* @return \DateTime|null
237+
* @return null|\DateTime
238238
*/
239239
public function getIssuedAt()
240240
{
@@ -245,7 +245,7 @@ public function getIssuedAt()
245245
* General metadata associated with the access token.
246246
* Can contain data like 'sso', 'auth_type', 'auth_nonce'.
247247
*
248-
* @return array|null
248+
* @return null|array
249249
*/
250250
public function getMetadata()
251251
{
@@ -255,7 +255,7 @@ public function getMetadata()
255255
/**
256256
* The 'sso' child property from the 'metadata' parent property.
257257
*
258-
* @return string|null
258+
* @return null|string
259259
*/
260260
public function getSso()
261261
{
@@ -265,7 +265,7 @@ public function getSso()
265265
/**
266266
* The 'auth_type' child property from the 'metadata' parent property.
267267
*
268-
* @return string|null
268+
* @return null|string
269269
*/
270270
public function getAuthType()
271271
{
@@ -275,7 +275,7 @@ public function getAuthType()
275275
/**
276276
* The 'auth_nonce' child property from the 'metadata' parent property.
277277
*
278-
* @return string|null
278+
* @return null|string
279279
*/
280280
public function getAuthNonce()
281281
{
@@ -286,7 +286,7 @@ public function getAuthNonce()
286286
* For impersonated access tokens, the ID of
287287
* the page this token contains.
288288
*
289-
* @return string|null
289+
* @return null|string
290290
*/
291291
public function getProfileId()
292292
{
@@ -307,7 +307,7 @@ public function getScopes()
307307
/**
308308
* The ID of the user this access token is for.
309309
*
310-
* @return string|null
310+
* @return null|string
311311
*/
312312
public function getUserId()
313313
{

0 commit comments

Comments
 (0)