@@ -251,7 +251,6 @@ discard block |
||
| 251 | 251 | * Get a user's total edit count on one or more project. |
| 252 | 252 | * Requires the CentralAuth extension to be installed on the project. |
| 253 | 253 | * |
| 254 | - * @param string $username The username. |
|
| 255 | 254 | * @param Project $project The project to start from. |
| 256 | 255 | * @return mixed[]|boolean Array of total edit counts, or false if none could be found. |
| 257 | 256 | */ |
@@ -301,7 +300,7 @@ discard block |
||
| 301 | 300 | |
| 302 | 301 | /** |
| 303 | 302 | * Get total edit counts for the top 10 projects for this user. |
| 304 | - * @param string $username The username. |
|
| 303 | + * @param string $stopwatchName |
|
| 305 | 304 | * @return string[] Elements are arrays with 'dbName', 'url', 'name', and 'total'. |
| 306 | 305 | */ |
| 307 | 306 | protected function getRevisionCountsAllProjectsNoCentralAuth( |
@@ -413,7 +412,6 @@ discard block |
||
| 413 | 412 | |
| 414 | 413 | /** |
| 415 | 414 | * Get data for a bar chart of monthly edit totals per namespace. |
| 416 | - * @param string $username The username. |
|
| 417 | 415 | * @return string[] |
| 418 | 416 | */ |
| 419 | 417 | public function getMonthCounts(Project $project, User $user) |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function getRevisionCounts(Project $project, User $user) |
| 20 | 20 | { |
| 21 | 21 | // Set up cache. |
| 22 | - $cacheKey = 'revisioncounts.' . $project->getDatabaseName() . '.' . $user->getUsername(); |
|
| 22 | + $cacheKey = 'revisioncounts.'.$project->getDatabaseName().'.'.$user->getUsername(); |
|
| 23 | 23 | if ($this->cache->hasItem($cacheKey)) { |
| 24 | 24 | return $this->cache->getItem($cacheKey)->get(); |
| 25 | 25 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function getRevisionDates(Project $project, User $user) |
| 81 | 81 | { |
| 82 | 82 | // Set up cache. |
| 83 | - $cacheKey = 'revisiondates.' . $project->getDatabaseName() . '.' . $user->getUsername(); |
|
| 83 | + $cacheKey = 'revisiondates.'.$project->getDatabaseName().'.'.$user->getUsername(); |
|
| 84 | 84 | if ($this->cache->hasItem($cacheKey)) { |
| 85 | 85 | return $this->cache->getItem($cacheKey)->get(); |
| 86 | 86 | } |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | $results = $resultQuery->fetchAll(); |
| 153 | 153 | |
| 154 | 154 | $pageCounts = array_combine( |
| 155 | - array_map(function ($e) { |
|
| 155 | + array_map(function($e) { |
|
| 156 | 156 | return $e['source']; |
| 157 | 157 | }, $results), |
| 158 | - array_map(function ($e) { |
|
| 158 | + array_map(function($e) { |
|
| 159 | 159 | return $e['value']; |
| 160 | 160 | }, $results) |
| 161 | 161 | ); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | // Query. |
| 188 | 188 | $sql = "SELECT CONCAT(log_type, '-', log_action) AS source, COUNT(log_id) AS value |
| 189 | - FROM " . $this->getTableName($project->getDatabaseName(), 'logging') . " |
|
| 189 | + FROM " . $this->getTableName($project->getDatabaseName(), 'logging')." |
|
| 190 | 190 | WHERE log_user = :userId |
| 191 | 191 | GROUP BY log_type, log_action"; |
| 192 | 192 | $resultQuery = $this->getProjectsConnection()->prepare($sql); |
@@ -195,10 +195,10 @@ discard block |
||
| 195 | 195 | $resultQuery->execute(); |
| 196 | 196 | $results = $resultQuery->fetchAll(); |
| 197 | 197 | $logCounts = array_combine( |
| 198 | - array_map(function ($e) { |
|
| 198 | + array_map(function($e) { |
|
| 199 | 199 | return $e['source']; |
| 200 | 200 | }, $results), |
| 201 | - array_map(function ($e) { |
|
| 201 | + array_map(function($e) { |
|
| 202 | 202 | return $e['value']; |
| 203 | 203 | }, $results) |
| 204 | 204 | ); |
@@ -355,9 +355,9 @@ discard block |
||
| 355 | 355 | $resultQuery->bindParam(":id", $userId); |
| 356 | 356 | $resultQuery->execute(); |
| 357 | 357 | $results = $resultQuery->fetchAll(); |
| 358 | - $namespaceTotals = array_combine(array_map(function ($e) { |
|
| 358 | + $namespaceTotals = array_combine(array_map(function($e) { |
|
| 359 | 359 | return $e['page_namespace']; |
| 360 | - }, $results), array_map(function ($e) { |
|
| 360 | + }, $results), array_map(function($e) { |
|
| 361 | 361 | return $e['total']; |
| 362 | 362 | }, $results)); |
| 363 | 363 | |