Completed
Pull Request — master (#554)
by
unknown
04:12
created
src/Facebook/FacebookRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
         $graphVersion = FacebookUrlManipulator::forceSlashPrefix($this->graphVersion);
512 512
         $endpoint = FacebookUrlManipulator::forceSlashPrefix($this->getEndpoint());
513 513
 
514
-        $url = $graphVersion . $endpoint;
514
+        $url = $graphVersion.$endpoint;
515 515
 
516 516
         if ($this->getMethod() !== 'POST') {
517 517
             $params = $this->getParams();
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
     public static function getDefaultHeaders()
530 530
     {
531 531
         return [
532
-            'User-Agent' => 'fb-php-' . Facebook::VERSION,
532
+            'User-Agent' => 'fb-php-'.Facebook::VERSION,
533 533
             'Accept-Encoding' => '*',
534 534
         ];
535 535
     }
Please login to merge, or discard this patch.
src/Facebook/Url/FacebookUrlDetectionHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getCurrentUrl()
37 37
     {
38
-        return $this->getHttpScheme() . '://' . $this->getHostName() . $this->getServerVar('REQUEST_URI');
38
+        return $this->getHttpScheme().'://'.$this->getHostName().$this->getServerVar('REQUEST_URI');
39 39
     }
40 40
 
41 41
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return $this->protocolWithActiveSsl($protocol);
67 67
         }
68 68
 
69
-        return (string)$this->getServerVar('SERVER_PORT') === '443';
69
+        return (string) $this->getServerVar('SERVER_PORT') === '443';
70 70
     }
71 71
 
72 72
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     protected function protocolWithActiveSsl($protocol)
80 80
     {
81
-        $protocol = strtolower((string)$protocol);
81
+        $protocol = strtolower((string) $protocol);
82 82
 
83 83
         return in_array($protocol, ['on', '1', 'https', 'ssl'], true);
84 84
     }
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
         // Port number
112 112
         $scheme = $this->getHttpScheme();
113 113
         $port = $this->getCurrentPort();
114
-        $appendPort = ':' . $port;
114
+        $appendPort = ':'.$port;
115 115
 
116 116
         // Don't append port number if a normal port.
117 117
         if (($scheme == 'http' && $port == '80') || ($scheme == 'https' && $port == '443')) {
118 118
             $appendPort = '';
119 119
         }
120 120
 
121
-        return $host . $appendPort;
121
+        return $host.$appendPort;
122 122
     }
123 123
 
124 124
     protected function getCurrentPort()
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
         // Check for proxy first
127 127
         $port = $this->getHeader('X_FORWARDED_PORT');
128 128
         if ($port) {
129
-            return (string)$port;
129
+            return (string) $port;
130 130
         }
131 131
 
132
-        $protocol = (string)$this->getHeader('X_FORWARDED_PROTO');
132
+        $protocol = (string) $this->getHeader('X_FORWARDED_PROTO');
133 133
         if ($protocol === 'https') {
134 134
             return '443';
135 135
         }
136 136
 
137
-        return (string)$this->getServerVar('SERVER_PORT');
137
+        return (string) $this->getServerVar('SERVER_PORT');
138 138
     }
139 139
 
140 140
     /**
@@ -158,6 +158,6 @@  discard block
 block discarded – undo
158 158
      */
159 159
     protected function getHeader($key)
160 160
     {
161
-        return $this->getServerVar('HTTP_' . $key);
161
+        return $this->getServerVar('HTTP_'.$key);
162 162
     }
163 163
 }
Please login to merge, or discard this patch.
src/Facebook/Url/FacebookUrlManipulator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,17 +53,17 @@  discard block
 block discarded – undo
53 53
             }
54 54
 
55 55
             if (count($params) > 0) {
56
-                $query = '?' . http_build_query($params, null, '&');
56
+                $query = '?'.http_build_query($params, null, '&');
57 57
             }
58 58
         }
59 59
 
60
-        $scheme = isset($parts['scheme']) ? $parts['scheme'] . '://' : '';
60
+        $scheme = isset($parts['scheme']) ? $parts['scheme'].'://' : '';
61 61
         $host = isset($parts['host']) ? $parts['host'] : '';
62
-        $port = isset($parts['port']) ? ':' . $parts['port'] : '';
62
+        $port = isset($parts['port']) ? ':'.$parts['port'] : '';
63 63
         $path = isset($parts['path']) ? $parts['path'] : '';
64
-        $fragment = isset($parts['fragment']) ? '#' . $parts['fragment'] : '';
64
+        $fragment = isset($parts['fragment']) ? '#'.$parts['fragment'] : '';
65 65
 
66
-        return $scheme . $host . $port . $path . $query . $fragment;
66
+        return $scheme.$host.$port.$path.$query.$fragment;
67 67
     }
68 68
 
69 69
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         if (strpos($url, '?') === false) {
84
-            return $url . '?' . http_build_query($newParams, null, '&');
84
+            return $url.'?'.http_build_query($newParams, null, '&');
85 85
         }
86 86
 
87 87
         list($path, $query) = explode('?', $url, 2);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         // Sort for a predicable order
95 95
         ksort($newParams);
96 96
 
97
-        return $path . '?' . http_build_query($newParams, null, '&');
97
+        return $path.'?'.http_build_query($newParams, null, '&');
98 98
     }
99 99
 
100 100
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return $string;
151 151
         }
152 152
 
153
-        return strpos($string, '/') === 0 ? $string : '/' . $string;
153
+        return strpos($string, '/') === 0 ? $string : '/'.$string;
154 154
     }
155 155
 
156 156
     /**
@@ -162,6 +162,6 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public static function baseGraphUrlEndpoint($urlToTrim)
164 164
     {
165
-        return '/' . preg_replace('/^https:\/\/.+\.facebook\.com(\/v.+?)?\//', '', $urlToTrim);
165
+        return '/'.preg_replace('/^https:\/\/.+\.facebook\.com(\/v.+?)?\//', '', $urlToTrim);
166 166
     }
167 167
 }
Please login to merge, or discard this patch.
src/Facebook/Facebook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,10 +136,10 @@
 block discarded – undo
136 136
         ], $config);
137 137
 
138 138
         if (!$config['app_id']) {
139
-            throw new FacebookSDKException('Required "app_id" key not supplied in config and could not find fallback environment variable "' . static::APP_ID_ENV_NAME . '"');
139
+            throw new FacebookSDKException('Required "app_id" key not supplied in config and could not find fallback environment variable "'.static::APP_ID_ENV_NAME.'"');
140 140
         }
141 141
         if (!$config['app_secret']) {
142
-            throw new FacebookSDKException('Required "app_secret" key not supplied in config and could not find fallback environment variable "' . static::APP_SECRET_ENV_NAME . '"');
142
+            throw new FacebookSDKException('Required "app_secret" key not supplied in config and could not find fallback environment variable "'.static::APP_SECRET_ENV_NAME.'"');
143 143
         }
144 144
 
145 145
         $this->app = new FacebookApp($config['app_id'], $config['app_secret']);
Please login to merge, or discard this patch.
src/Facebook/FacebookBatchRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
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 = [
Please login to merge, or discard this patch.
src/Facebook/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Facebook/FacebookApp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Facebook/Authentication/OAuth2Client.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,12 +138,12 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Facebook/HttpClients/FacebookCurlHttpClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.