Completed
Push — 1.10.x ( fe0e5a...3a6f9c )
by Yannick
134:15 queued 86:39
created
facebook-php-sdk/src/Facebook/HttpClients/FacebookStreamHttpClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         'verify_peer' => true,
110 110
         'verify_peer_name' => true,
111 111
         'allow_self_signed' => true, // All root certificates are self-signed
112
-        'cafile' => __DIR__ . '/certs/DigiCertHighAssuranceEVRootCA.pem',
112
+        'cafile' => __DIR__.'/certs/DigiCertHighAssuranceEVRootCA.pem',
113 113
       ),
114 114
     );
115 115
 
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
   public function compileHeader()
144 144
   {
145 145
     $header = [];
146
-    foreach($this->requestHeaders as $k => $v) {
147
-      $header[] = $k . ': ' . $v;
146
+    foreach ($this->requestHeaders as $k => $v) {
147
+      $header[] = $k.': '.$v;
148 148
     }
149 149
 
150 150
     return implode("\r\n", $header);
Please login to merge, or discard this patch.
main/auth/external_login/facebook-php-sdk/src/Facebook/FacebookSession.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@
 block discarded – undo
287 287
     $targetAppId = static::_getTargetAppId($appId);
288 288
     $targetAppSecret = static::_getTargetAppSecret($appSecret);
289 289
     return new FacebookSession(
290
-      $targetAppId . '|' . $targetAppSecret
290
+      $targetAppId.'|'.$targetAppSecret
291 291
     );
292 292
   }
293 293
 
Please login to merge, or discard this patch.
auth/external_login/facebook-php-sdk/src/Facebook/Entities/AccessToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
         $expiresAt = isset($data['expires']) ? time() + $data['expires'] : 0;
253 253
         return new static($data['access_token'], $expiresAt);
254 254
       }
255
-    } elseif($data instanceof \stdClass) {
255
+    } elseif ($data instanceof \stdClass) {
256 256
       if (isset($data->access_token)) {
257 257
         $expiresAt = isset($data->expires_in) ? time() + $data->expires_in : 0;
258 258
         $machineId = isset($data->machine_id) ? (string) $data->machine_id : null;
Please login to merge, or discard this patch.
main/auth/external_login/facebook-php-sdk/src/Facebook/FacebookRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
    */
214 214
   protected function getRequestURL()
215 215
   {
216
-    return static::BASE_GRAPH_URL . '/' . $this->version . $this->path;
216
+    return static::BASE_GRAPH_URL.'/'.$this->version.$this->path;
217 217
   }
218 218
 
219 219
   /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     }
236 236
 
237 237
     $connection = self::getHttpClientHandler();
238
-    $connection->addRequestHeader('User-Agent', 'fb-php-' . self::VERSION);
238
+    $connection->addRequestHeader('User-Agent', 'fb-php-'.self::VERSION);
239 239
     $connection->addRequestHeader('Accept-Encoding', '*'); // Support all available encodings.
240 240
 
241 241
     // ETag
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     }
299 299
 
300 300
     if (strpos($url, '?') === false) {
301
-      return $url . '?' . http_build_query($params, null, '&');
301
+      return $url.'?'.http_build_query($params, null, '&');
302 302
     }
303 303
 
304 304
     list($path, $query_string) = explode('?', $url, 2);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     // Favor params from the original URL over $params
308 308
     $params = array_merge($params, $query_array);
309 309
 
310
-    return $path . '?' . http_build_query($params, null, '&');
310
+    return $path.'?'.http_build_query($params, null, '&');
311 311
   }
312 312
 
313 313
 }
Please login to merge, or discard this patch.
main/auth/external_login/facebook-php-sdk/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
  * @param string $class The fully-qualified class name.
41 41
  * @return void
42 42
  */
43
-spl_autoload_register(function ($class)
43
+spl_autoload_register(function($class)
44 44
 {
45 45
   // project-specific namespace prefix
46 46
   $prefix = 'Facebook\\';
47 47
 
48 48
   // base directory for the namespace prefix
49
-  $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/';
49
+  $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__.'/src/Facebook/';
50 50
 
51 51
   // does the class use the namespace prefix?
52 52
   $len = strlen($prefix);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
   // replace the namespace prefix with the base directory, replace namespace
62 62
   // separators with directory separators in the relative class name, append
63 63
   // with .php
64
-  $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
64
+  $file = $base_dir.str_replace('\\', '/', $relative_class).'.php';
65 65
 
66 66
   // if the file exists, require it
67 67
   if (file_exists($file)) {
Please login to merge, or discard this patch.
main/auth/external_login/facebook.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
  * Please edit the facebook.conf.php file to adapt it to your fb application parameter
12 12
  */
13 13
 
14
-require_once dirname(__FILE__) . '/../../inc/global.inc.php';
15
-require_once dirname(__FILE__) . '/facebook.init.php';
16
-require_once dirname(__FILE__) . '/facebook-php-sdk/autoload.php';
14
+require_once dirname(__FILE__).'/../../inc/global.inc.php';
15
+require_once dirname(__FILE__).'/facebook.init.php';
16
+require_once dirname(__FILE__).'/facebook-php-sdk/autoload.php';
17 17
 
18 18
 use Facebook\FacebookSession;
19 19
 use Facebook\FacebookRedirectLoginHelper;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 use Facebook\HttpClients\FacebookCurlHttpClient;
28 28
 use Facebook\HttpClients\FacebookHttpable;
29 29
 
30
-require_once dirname(__FILE__) . '/functions.inc.php';
30
+require_once dirname(__FILE__).'/functions.inc.php';
31 31
 
32 32
 // dont rename $facebook_config to $facebookConfig otherwise get a "Facebook\\FacebookSDKException"
33 33
 FacebookSession::setDefaultApplication($facebook_config['appId'], $facebook_config['secret']);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $locale = $graphObject->getProperty('locale');
58 58
             $language = facebookPluginGetLanguage($locale);
59 59
             if (!$language) {
60
-                $language='en_US';
60
+                $language = 'en_US';
61 61
             }
62 62
 
63 63
             //Checks if user already exists in chamilo
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     $_user['user_id'] = $chamilo_uid;
86 86
                     $_user['uidReset'] = true;
87 87
                     $_SESSION['_user'] = $_user;
88
-                    header('Location:' . api_get_path(WEB_PATH));
88
+                    header('Location:'.api_get_path(WEB_PATH));
89 89
                     exit();
90 90
                 } else {
91 91
                     return false;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 $_user['user_id'] = $chamilo_uid;
99 99
                 $_user['uidReset'] = true;
100 100
                 $_SESSION['_user'] = $_user;
101
-                header('Location:' . api_get_path(WEB_PATH));
101
+                header('Location:'.api_get_path(WEB_PATH));
102 102
                 exit();
103 103
             }
104 104
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 {
118 118
     global $facebook_config;
119 119
     $helper = new FacebookRedirectLoginHelper($facebook_config['return_url']);
120
-    $loginUrl =   $helper->getLoginUrl(
120
+    $loginUrl = $helper->getLoginUrl(
121 121
         array('scope' => 'email')
122 122
     );
123 123
 
Please login to merge, or discard this patch.
main/auth/external_login/login.ws.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $wsUrl = '';
15 15
 
16 16
 // include common authentication functions
17
-require_once dirname(__FILE__) . '/functions.inc.php';
17
+require_once dirname(__FILE__).'/functions.inc.php';
18 18
 // call the login checker (defined below)
19 19
 $isValid = loginWSAuthenticate($login, $password, $wsUrl);
20 20
 
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
     $key = '-+*%$({[]})$%*+-';
62 62
     // Complete password con PKCS7-specific padding
63 63
     $blockSize = 16;
64
-    $padding = $blockSize - (strlen($password)%$blockSize);
65
-    $password .= str_repeat(chr($padding),$padding);
64
+    $padding = $blockSize - (strlen($password) % $blockSize);
65
+    $password .= str_repeat(chr($padding), $padding);
66 66
     $cipher = new Crypt_AES(CRYPT_AES_MODE_CFB);
67 67
     $cipher->setKeyLength(128);
68 68
     $cipher->setKey($key);
Please login to merge, or discard this patch.
main/auth/external_login/updateUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 use ChamiloSession as Session;
9 9
 
10
-require_once(dirname(__FILE__) . '/functions.inc.php');
10
+require_once(dirname(__FILE__).'/functions.inc.php');
11 11
 
12 12
 //MAIN CODE
13 13
 //$uData variable is set in local.inc.php
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
     //User cannot login
37 37
     $loginFailed = true;
38 38
     Session::erase('_uid');
39
-    header('Location: ' . api_get_path(WEB_PATH) . 'index.php?loginFailed=1&error=user_password_incorrect');
39
+    header('Location: '.api_get_path(WEB_PATH).'index.php?loginFailed=1&error=user_password_incorrect');
40 40
     exit;
41 41
 }
Please login to merge, or discard this patch.
main/auth/external_login/newUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 use ChamiloSession as Session;
12 12
 
13
-require_once(dirname(__FILE__) . '/functions.inc.php');
13
+require_once(dirname(__FILE__).'/functions.inc.php');
14 14
 
15 15
 //MAIN CODE
16 16
 //$login and $password variables are setted in main/inc/local.inc.php
Please login to merge, or discard this patch.