@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function getAuthorizationEndpoint() |
43 | 43 | { |
44 | - return new Uri($this->baseApiUri . '/oauth/authorize'); |
|
44 | + return new Uri($this->baseApiUri.'/oauth/authorize'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function getAccessTokenEndpoint() |
52 | 52 | { |
53 | - return new Uri($this->baseApiUri . '/oauth/token'); |
|
53 | + return new Uri($this->baseApiUri.'/oauth/token'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | if (null === $data || !is_array($data)) { |
69 | 69 | throw new TokenResponseException('Unable to parse response.'); |
70 | 70 | } elseif (isset($data['error_description'])) { |
71 | - throw new TokenResponseException('Error in retrieving token: "' . $data['error_description'] . '"'); |
|
71 | + throw new TokenResponseException('Error in retrieving token: "'.$data['error_description'].'"'); |
|
72 | 72 | } elseif (isset($data['error'])) { |
73 | - throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"'); |
|
73 | + throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $token = new StdOAuth2Token(); |
@@ -136,7 +136,7 @@ |
||
136 | 136 | if ($data === null || !is_array($data)) { |
137 | 137 | throw new TokenResponseException('Unable to parse response.'); |
138 | 138 | } elseif (isset($data['error'])) { |
139 | - throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"'); |
|
139 | + throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"'); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $token = new StdOAuth2Token(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if (null === $data || !is_array($data)) { |
83 | 83 | throw new TokenResponseException('Unable to parse response.'); |
84 | 84 | } elseif (isset($data['error'])) { |
85 | - throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"'); |
|
85 | + throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | $token = new StdOAuth2Token(); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | protected function getExtraOAuthHeaders() |
109 | 109 | { |
110 | 110 | // Reddit uses a Basic OAuth header |
111 | - return array('Authorization' => 'Basic ' . |
|
112 | - base64_encode($this->credentials->getConsumerId() . ':' . $this->credentials->getConsumerSecret())); |
|
111 | + return array('Authorization' => 'Basic '. |
|
112 | + base64_encode($this->credentials->getConsumerId().':'.$this->credentials->getConsumerSecret())); |
|
113 | 113 | } |
114 | 114 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getAuthorizationEndpoint() |
73 | 73 | { |
74 | - return new Uri('https://www.strava.com/oauth/authorize?approval_prompt=' . $this->approvalPrompt); |
|
74 | + return new Uri('https://www.strava.com/oauth/authorize?approval_prompt='.$this->approvalPrompt); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | throw new TokenResponseException('Unable to parse response.'); |
102 | 102 | } elseif (isset($data['error_description'])) { |
103 | 103 | throw new TokenResponseException( |
104 | - 'Error in retrieving token: "' . $data['error_description'] . '"' |
|
104 | + 'Error in retrieving token: "'.$data['error_description'].'"' |
|
105 | 105 | ); |
106 | 106 | } elseif (isset($data['error'])) { |
107 | 107 | throw new TokenResponseException( |
108 | - 'Error in retrieving token: "' . $data['error'] . '"' |
|
108 | + 'Error in retrieving token: "'.$data['error'].'"' |
|
109 | 109 | ); |
110 | 110 | } |
111 | 111 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $reflClass = new \ReflectionClass($className); |
78 | 78 | |
79 | 79 | foreach (array('OAuth2', 'OAuth1') as $version) { |
80 | - if ($reflClass->implementsInterface('OAuth\\' . $version . '\\Service\\ServiceInterface')) { |
|
80 | + if ($reflClass->implementsInterface('OAuth\\'.$version.'\\Service\\ServiceInterface')) { |
|
81 | 81 | $this->serviceClassMap[$version][ucfirst($serviceName)] = $className; |
82 | 82 | |
83 | 83 | return $this; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | return $this->serviceClassMap[$type][$serviceName]; |
149 | 149 | } |
150 | 150 | |
151 | - return '\\OAuth\\' . $type . '\\Service\\' . $serviceName; |
|
151 | + return '\\OAuth\\'.$type.'\\Service\\'.$serviceName; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | $resolvedScopes = array(); |
199 | 199 | foreach ($scopes as $scope) { |
200 | - $key = strtoupper('SCOPE_' . $scope); |
|
200 | + $key = strtoupper('SCOPE_'.$scope); |
|
201 | 201 | |
202 | 202 | if (array_key_exists($key, $constants)) { |
203 | 203 | $resolvedScopes[] = $constants[$key]; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | $f = array(); |
57 | 57 | foreach ($to as $k => $v) { |
58 | - $f[] = (empty($v) ? '' : "$v ") . "<$k>"; |
|
58 | + $f[] = (empty($v) ? '' : "$v ")."<$k>"; |
|
59 | 59 | } |
60 | 60 | return implode(', ', $f); |
61 | 61 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | continue; |
41 | 41 | } |
42 | 42 | |
43 | - $dump .= $message['message'] . PHP_EOL; |
|
43 | + $dump .= $message['message'].PHP_EOL; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | return $dump; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | public function enter(Twig_Profiler_Profile $profile) |
46 | 46 | { |
47 | 47 | if ($this->timeDataCollector && $profile->isTemplate()) { |
48 | - $this->timeDataCollector->startMeasure($profile->getName(), 'template ' . $profile->getName()); |
|
48 | + $this->timeDataCollector->startMeasure($profile->getName(), 'template '.$profile->getName()); |
|
49 | 49 | } |
50 | 50 | parent::enter($profile); |
51 | 51 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $duration = null; |
146 | 146 | $memory = null; |
147 | 147 | |
148 | - $isSuccess = ( LogLevel::INFO === strtolower($record['level_name']) ); |
|
148 | + $isSuccess = (LogLevel::INFO === strtolower($record['level_name'])); |
|
149 | 149 | |
150 | 150 | $detailsCount = count($config['details']); |
151 | 151 | $parameters = explode($config['outerGlue'], $record['message'], $detailsCount + 1); |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | $value = $_details[$detail['name']]; |
164 | 164 | if ('time' === $key) { |
165 | 165 | if (substr_count($value, 'ms')) { |
166 | - $value = (float)$value / 1000; |
|
166 | + $value = (float) $value / 1000; |
|
167 | 167 | } else { |
168 | - $value = (float)$value; |
|
168 | + $value = (float) $value; |
|
169 | 169 | } |
170 | 170 | } else { |
171 | 171 | $suffixes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $i = array_search($suffix, $suffixes, true); |
174 | 174 | $i = (false === $i) ? 0 : $i; |
175 | 175 | |
176 | - $value = ((float)$value) * pow(1024, $i); |
|
176 | + $value = ((float) $value) * pow(1024, $i); |
|
177 | 177 | } |
178 | 178 | $details[$key] = $value; |
179 | 179 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | { |
224 | 224 | if (count($this->errors)) { |
225 | 225 | return array( |
226 | - 'statements' => array_map(function ($message) { |
|
226 | + 'statements' => array_map(function($message) { |
|
227 | 227 | return array('sql' => '', 'is_success' => false, 'error_code' => 500, 'error_message' => $message); |
228 | 228 | }, $this->errors), |
229 | 229 | 'nb_statements' => 0, |
@@ -237,15 +237,15 @@ discard block |
||
237 | 237 | |
238 | 238 | $statements = $this->getStatements($this->getHandler()->getRecords(), $this->getConfig()); |
239 | 239 | |
240 | - $failedStatement = count(array_filter($statements, function ($statement) { |
|
240 | + $failedStatement = count(array_filter($statements, function($statement) { |
|
241 | 241 | return false === $statement['is_success']; |
242 | 242 | })); |
243 | - $accumulatedDuration = array_reduce($statements, function ($accumulatedDuration, $statement) { |
|
243 | + $accumulatedDuration = array_reduce($statements, function($accumulatedDuration, $statement) { |
|
244 | 244 | |
245 | 245 | $time = isset($statement['duration']) ? $statement['duration'] : 0; |
246 | 246 | return $accumulatedDuration += $time; |
247 | 247 | }); |
248 | - $memoryUsage = array_reduce($statements, function ($memoryUsage, $statement) { |
|
248 | + $memoryUsage = array_reduce($statements, function($memoryUsage, $statement) { |
|
249 | 249 | |
250 | 250 | $time = isset($statement['memory']) ? $statement['memory'] : 0; |
251 | 251 | return $memoryUsage += $time; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function getName() |
269 | 269 | { |
270 | - $additionalName = ''; |
|
270 | + $additionalName = ''; |
|
271 | 271 | if ($this->getLogger() !== $this->getDefaultLogger()) { |
272 | 272 | $additionalName = ' ('.$this->getLogger()->getName().')'; |
273 | 273 | } |