@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | public function getAccessToken() |
| 76 | 76 | { |
| 77 | - return new AccessToken($this->id . '|' . $this->secret); |
|
| 77 | + return new AccessToken($this->id.'|'.$this->secret); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -138,12 +138,12 @@ |
||
| 138 | 138 | 'client_id' => $this->app->getId(), |
| 139 | 139 | 'state' => $state, |
| 140 | 140 | 'response_type' => 'code', |
| 141 | - 'sdk' => 'php-sdk-' . Facebook::VERSION, |
|
| 141 | + 'sdk' => 'php-sdk-'.Facebook::VERSION, |
|
| 142 | 142 | 'redirect_uri' => $redirectUrl, |
| 143 | 143 | 'scope' => implode(',', $scope) |
| 144 | 144 | ]; |
| 145 | 145 | |
| 146 | - return static::BASE_AUTHORIZATION_URL . '/' . $this->graphVersion . '/dialog/oauth?' . http_build_query($params, null, $separator); |
|
| 146 | + return static::BASE_AUTHORIZATION_URL.'/'.$this->graphVersion.'/dialog/oauth?'.http_build_query($params, null, $separator); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | CURLOPT_HEADER => true, // Enable header processing |
| 113 | 113 | CURLOPT_SSL_VERIFYHOST => 2, |
| 114 | 114 | CURLOPT_SSL_VERIFYPEER => true, |
| 115 | - CURLOPT_CAINFO => __DIR__ . '/certs/DigiCertHighAssuranceEVRootCA.pem', |
|
| 115 | + CURLOPT_CAINFO => __DIR__.'/certs/DigiCertHighAssuranceEVRootCA.pem', |
|
| 116 | 116 | ]; |
| 117 | 117 | |
| 118 | 118 | if ($method !== "GET") { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $return = []; |
| 152 | 152 | |
| 153 | 153 | foreach ($headers as $key => $value) { |
| 154 | - $return[] = $key . ': ' . $value; |
|
| 154 | + $return[] = $key.': '.$value; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | return $return; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | 'verify_peer' => true, |
| 59 | 59 | 'verify_peer_name' => true, |
| 60 | 60 | 'allow_self_signed' => true, // All root certificates are self-signed |
| 61 | - 'cafile' => __DIR__ . '/certs/DigiCertHighAssuranceEVRootCA.pem', |
|
| 61 | + 'cafile' => __DIR__.'/certs/DigiCertHighAssuranceEVRootCA.pem', |
|
| 62 | 62 | ], |
| 63 | 63 | ]; |
| 64 | 64 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | $header = []; |
| 88 | 88 | foreach ($headers as $k => $v) { |
| 89 | - $header[] = $k . ': ' . $v; |
|
| 89 | + $header[] = $k.': '.$v; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | return implode("\r\n", $header); |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function get($key) |
| 61 | 61 | { |
| 62 | - if (isset($_SESSION[$this->sessionPrefix . $key])) { |
|
| 63 | - return $_SESSION[$this->sessionPrefix . $key]; |
|
| 62 | + if (isset($_SESSION[$this->sessionPrefix.$key])) { |
|
| 63 | + return $_SESSION[$this->sessionPrefix.$key]; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return null; |
@@ -71,6 +71,6 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function set($key, $value) |
| 73 | 73 | { |
| 74 | - $_SESSION[$this->sessionPrefix . $key] = $value; |
|
| 74 | + $_SESSION[$this->sessionPrefix.$key] = $value; |
|
| 75 | 75 | } |
| 76 | 76 | } |
@@ -157,8 +157,8 @@ |
||
| 157 | 157 | */ |
| 158 | 158 | public function getRawSignedRequestFromCookie() |
| 159 | 159 | { |
| 160 | - if (isset($_COOKIE['fbsr_' . $this->app->getId()])) { |
|
| 161 | - return $_COOKIE['fbsr_' . $this->app->getId()]; |
|
| 160 | + if (isset($_COOKIE['fbsr_'.$this->app->getId()])) { |
|
| 161 | + return $_COOKIE['fbsr_'.$this->app->getId()]; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | return null; |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | 'access_token' => $accessToken->getValue(), |
| 169 | 169 | ]; |
| 170 | 170 | |
| 171 | - return 'https://www.facebook.com/logout.php?' . http_build_query($params, null, $separator); |
|
| 171 | + return 'https://www.facebook.com/logout.php?'.http_build_query($params, null, $separator); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * Returns the URL to send the user in order to login to Facebook. |
| 133 | 133 | * |
| 134 | 134 | * @param string $redirectUrl The URL Facebook should redirect users to after login. |
| 135 | - * @param array $scope List of permissions to request during login. |
|
| 135 | + * @param string[] $scope List of permissions to request during login. |
|
| 136 | 136 | * @param string $separator The separator to use in http_build_query(). |
| 137 | 137 | * |
| 138 | 138 | * @return string |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * Returns the URL to send the user in order to log out of Facebook. |
| 147 | 147 | * |
| 148 | - * @param AccessToken|string $accessToken The access token that will be logged out. |
|
| 148 | + * @param string $accessToken The access token that will be logged out. |
|
| 149 | 149 | * @param string $next The url Facebook should redirect the user to after a successful logout. |
| 150 | 150 | * @param string $separator The separator to use in http_build_query(). |
| 151 | 151 | * |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | $hashedSig = $this->hashSignature($encodedPayload); |
| 140 | 140 | $encodedSig = $this->base64UrlEncode($hashedSig); |
| 141 | 141 | |
| 142 | - return $encodedSig . '.' . $encodedPayload; |
|
| 142 | + return $encodedSig.'.'.$encodedPayload; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | * Returns a property from the signed request data if available. |
| 91 | 91 | * |
| 92 | 92 | * @param string $key |
| 93 | - * @param mixed|null $default |
|
| 93 | + * @param integer $default |
|
| 94 | 94 | * |
| 95 | 95 | * @return mixed|null |
| 96 | 96 | */ |
@@ -85,13 +85,13 @@ |
||
| 85 | 85 | public function open() |
| 86 | 86 | { |
| 87 | 87 | if (!$this->isRemoteFile($this->path) && !is_readable($this->path)) { |
| 88 | - throw new FacebookSDKException('Failed to create FacebookFile entity. Unable to read resource: ' . $this->path . '.'); |
|
| 88 | + throw new FacebookSDKException('Failed to create FacebookFile entity. Unable to read resource: '.$this->path.'.'); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $this->stream = fopen($this->path, 'r'); |
| 92 | 92 | |
| 93 | 93 | if (!$this->stream) { |
| 94 | - throw new FacebookSDKException('Failed to create FacebookFile entity. Unable to open resource: ' . $this->path . '.'); |
|
| 94 | + throw new FacebookSDKException('Failed to create FacebookFile entity. Unable to open resource: '.$this->path.'.'); |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |