@@ -228,7 +228,7 @@ |
||
| 228 | 228 | $compiledHeaders = []; |
| 229 | 229 | $headers = $request->getHeaders(); |
| 230 | 230 | foreach ($headers as $name => $value) { |
| 231 | - $compiledHeaders[] = $name . ': ' . $value; |
|
| 231 | + $compiledHeaders[] = $name.': '.$value; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | $batch = [ |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | -spl_autoload_register(function ($class) { |
|
| 45 | +spl_autoload_register(function($class) { |
|
| 46 | 46 | // project-specific namespace prefix |
| 47 | 47 | $prefix = 'Facebook\\'; |
| 48 | 48 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $customBaseDir = FACEBOOK_SDK_SRC_DIR; |
| 56 | 56 | } |
| 57 | 57 | // base directory for the namespace prefix |
| 58 | - $baseDir = $customBaseDir ?: __DIR__ . '/'; |
|
| 58 | + $baseDir = $customBaseDir ?: __DIR__.'/'; |
|
| 59 | 59 | |
| 60 | 60 | // does the class use the namespace prefix? |
| 61 | 61 | $len = strlen($prefix); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | // replace the namespace prefix with the base directory, replace namespace |
| 71 | 71 | // separators with directory separators in the relative class name, append |
| 72 | 72 | // with .php |
| 73 | - $file = rtrim($baseDir, '/') . '/' . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 73 | + $file = rtrim($baseDir, '/').'/'.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 74 | 74 | |
| 75 | 75 | // if the file exists, require it |
| 76 | 76 | if (file_exists($file)) { |
@@ -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 | /** |