@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public function loginAction() |
| 90 | 90 | { |
| 91 | 91 | try { |
| 92 | - list( $next, $token ) = $this->getOauthClient()->initiate(); |
|
| 92 | + list($next, $token) = $this->getOauthClient()->initiate(); |
|
| 93 | 93 | } catch (Exception $oauthException) { |
| 94 | 94 | throw $oauthException; |
| 95 | 95 | // @TODO Make this work. |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | . '?title=Special:OAuth'; |
| 157 | 157 | $conf = new ClientConfig($endpoint); |
| 158 | 158 | $consumerKey = $this->getParameter('oauth_key'); |
| 159 | - $consumerSecret = $this->getParameter('oauth_secret'); |
|
| 159 | + $consumerSecret = $this->getParameter('oauth_secret'); |
|
| 160 | 160 | $conf->setConsumer(new Consumer($consumerKey, $consumerSecret)); |
| 161 | 161 | $this->oauthClient = new Client($conf); |
| 162 | 162 | // Callback URL is hardcoded in the consumer registration. |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | // Get individual counts of how many times each tool was used. |
| 127 | 127 | // This also includes a wikilink to the tool. |
| 128 | 128 | $toolCounts = $autoEdits->getAutomatedCounts(); |
| 129 | - $toolsTotal = array_reduce($toolCounts, function ($a, $b) { |
|
| 130 | - return $a + $b['count']; |
|
| 129 | + $toolsTotal = array_reduce($toolCounts, function($a, $b) { |
|
| 130 | + return $a+$b['count']; |
|
| 131 | 131 | }); |
| 132 | 132 | |
| 133 | 133 | // Query to get combined (semi)automated using for all edits |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $res['automated_editcount'] = $autoEdits->countAutomatedEdits(); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - $res['nonautomated_editcount'] = $res['total_editcount'] - $res['automated_editcount']; |
|
| 206 | + $res['nonautomated_editcount'] = $res['total_editcount']-$res['automated_editcount']; |
|
| 207 | 207 | |
| 208 | 208 | $response->setData($res); |
| 209 | 209 | return $response; |
@@ -243,8 +243,8 @@ discard block |
||
| 243 | 243 | if ($request->query->get('format') !== 'html') { |
| 244 | 244 | return new JsonResponse( |
| 245 | 245 | [ |
| 246 | - 'error' => 'Unable to show any data. User has made over ' . |
|
| 247 | - $user->maxEdits() . ' edits.', |
|
| 246 | + 'error' => 'Unable to show any data. User has made over '. |
|
| 247 | + $user->maxEdits().' edits.', |
|
| 248 | 248 | ], |
| 249 | 249 | Response::HTTP_FORBIDDEN |
| 250 | 250 | ); |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | if ($request->query->get('format') === 'html') { |
| 264 | 264 | if ($edits) { |
| 265 | - $edits = array_map(function ($attrs) use ($project, $user) { |
|
| 265 | + $edits = array_map(function($attrs) use ($project, $user) { |
|
| 266 | 266 | $page = $project->getRepository() |
| 267 | 267 | ->getPage($project, $attrs['full_page_title']); |
| 268 | 268 | $pageTitles[] = $attrs['full_page_title']; |