Passed
Push — master ( 97f56d...fd4a5f )
by Tim
01:58
created
www/linkback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 // Find authentication source
18 18
 if (is_null($state) || !array_key_exists(Twitter::AUTHID, $state)) {
19
-    throw new Error\BadRequest('No data in state for ' . Twitter::AUTHID);
19
+    throw new Error\BadRequest('No data in state for '.Twitter::AUTHID);
20 20
 }
21 21
 $sourceId = $state[Twitter::AUTHID];
22 22
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $source = Auth\Source::getById($sourceId);
25 25
 if ($source === null) {
26 26
     throw new Error\BadRequest(
27
-        'Could not find authentication source with id ' . var_export($sourceId, true)
27
+        'Could not find authentication source with id '.var_export($sourceId, true)
28 28
     );
29 29
 }
30 30
 
Please login to merge, or discard this patch.
lib/Auth/Source/Twitter.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 use Webmozart\Assert\Assert;
13 13
 
14 14
 $base = dirname(dirname(dirname(dirname(__FILE__))));
15
-$default = dirname($base) . '/oauth/libextinc/OAuth.php';
16
-$travis = $base . '/vendor/simplesamlphp/simplesamlphp/modules/oauth/libextinc/OAuth.php';
15
+$default = dirname($base).'/oauth/libextinc/OAuth.php';
16
+$travis = $base.'/vendor/simplesamlphp/simplesamlphp/modules/oauth/libextinc/OAuth.php';
17 17
 
18 18
 if (file_exists($default)) {
19 19
     require_once($default);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $configObject = Configuration::loadFromArray(
76 76
             $config,
77
-            'authsources[' . var_export($this->authId, true) . ']'
77
+            'authsources['.var_export($this->authId, true).']'
78 78
         );
79 79
 
80 80
         $this->key = $configObject->getString('key');
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
             'https://api.twitter.com/oauth/request_token',
104 104
             ['oauth_callback' => $linkback]
105 105
         );
106
-        Logger::debug("Got a request token from the OAuth service provider [" .
107
-            $requestToken->key . "] with the secret [" . $requestToken->secret . "]");
106
+        Logger::debug("Got a request token from the OAuth service provider [".
107
+            $requestToken->key."] with the secret [".$requestToken->secret."]");
108 108
 
109 109
         $state['authtwitter:authdata:requestToken'] = $requestToken;
110 110
         Auth\State::saveState($state, self::STAGE_INIT);
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 
141 141
         $consumer = new Consumer($this->key, $this->secret);
142 142
 
143
-        Logger::debug("oauth: Using this request token [" .
144
-            $requestToken->key . "] with the secret [" . $requestToken->secret . "]");
143
+        Logger::debug("oauth: Using this request token [".
144
+            $requestToken->key."] with the secret [".$requestToken->secret."]");
145 145
 
146 146
         // Replace the request token with an access token
147 147
         $accessToken = $consumer->getAccessToken(
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
             $requestToken,
150 150
             $parameters
151 151
         );
152
-        Logger::debug("Got an access token from the OAuth service provider [" .
153
-            $accessToken->key . "] with the secret [" . $accessToken->secret . "]");
152
+        Logger::debug("Got an access token from the OAuth service provider [".
153
+            $accessToken->key."] with the secret [".$accessToken->secret."]");
154 154
 
155 155
         $verify_credentials_url = 'https://api.twitter.com/1.1/account/verify_credentials.json';
156 156
         if ($this->include_email) {
157
-            $verify_credentials_url = $verify_credentials_url . '?include_email=true';
157
+            $verify_credentials_url = $verify_credentials_url.'?include_email=true';
158 158
         }
159 159
         $userdata = $consumer->getUserInfo($verify_credentials_url, $accessToken);
160 160
 
@@ -168,13 +168,13 @@  discard block
 block discarded – undo
168 168
         $attributes = [];
169 169
         foreach ($userdata as $key => $value) {
170 170
             if (is_string($value)) {
171
-                $attributes['twitter.' . $key] = [$value];
171
+                $attributes['twitter.'.$key] = [$value];
172 172
             }
173 173
         }
174 174
 
175
-        $attributes['twitter_at_screen_name'] = ['@' . $userdata['screen_name']];
176
-        $attributes['twitter_screen_n_realm'] = [$userdata['screen_name'] . '@twitter.com'];
177
-        $attributes['twitter_targetedID'] = ['http://twitter.com!' . $userdata['id_str']];
175
+        $attributes['twitter_at_screen_name'] = ['@'.$userdata['screen_name']];
176
+        $attributes['twitter_screen_n_realm'] = [$userdata['screen_name'].'@twitter.com'];
177
+        $attributes['twitter_targetedID'] = ['http://twitter.com!'.$userdata['id_str']];
178 178
 
179 179
         $state['Attributes'] = $attributes;
180 180
     }
Please login to merge, or discard this patch.