@@ -156,7 +156,7 @@ |
||
| 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. |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | // Get individual counts of how many times each tool was used. |
| 122 | 122 | // This also includes a wikilink to the tool. |
| 123 | 123 | $toolCounts = $autoEdits->getAutomatedCounts(); |
| 124 | - $toolsTotal = array_reduce($toolCounts, function ($a, $b) { |
|
| 125 | - return $a + $b['count']; |
|
| 124 | + $toolsTotal = array_reduce($toolCounts, function($a, $b) { |
|
| 125 | + return $a+$b['count']; |
|
| 126 | 126 | }); |
| 127 | 127 | |
| 128 | 128 | // Query to get combined (semi)automated using for all edits |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $res['automated_editcount'] = $autoEdits->countAutomatedEdits(); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - $res['nonautomated_editcount'] = $res['total_editcount'] - $res['automated_editcount']; |
|
| 201 | + $res['nonautomated_editcount'] = $res['total_editcount']-$res['automated_editcount']; |
|
| 202 | 202 | |
| 203 | 203 | $response->setData($res); |
| 204 | 204 | return $response; |
@@ -238,8 +238,8 @@ discard block |
||
| 238 | 238 | if ($this->request->query->get('format') !== 'html') { |
| 239 | 239 | return new JsonResponse( |
| 240 | 240 | [ |
| 241 | - 'error' => 'Unable to show any data. User has made over ' . |
|
| 242 | - $user->maxEdits() . ' edits.', |
|
| 241 | + 'error' => 'Unable to show any data. User has made over '. |
|
| 242 | + $user->maxEdits().' edits.', |
|
| 243 | 243 | ], |
| 244 | 244 | Response::HTTP_FORBIDDEN |
| 245 | 245 | ); |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | |
| 258 | 258 | if ($this->request->query->get('format') === 'html') { |
| 259 | 259 | if ($edits) { |
| 260 | - $edits = array_map(function ($attrs) use ($project, $user) { |
|
| 260 | + $edits = array_map(function($attrs) use ($project, $user) { |
|
| 261 | 261 | $page = $project->getRepository() |
| 262 | 262 | ->getPage($project, $attrs['full_page_title']); |
| 263 | 263 | $pageTitles[] = $attrs['full_page_title']; |