@@ -61,6 +61,6 @@ |
||
| 61 | 61 | public function userRightsUrl(Project $project) |
| 62 | 62 | { |
| 63 | 63 | return $project->getUrl() . $project->getScriptPath() . "?title=Special:UserRights&user=" . |
| 64 | - $this->getUsername(); |
|
| 64 | + $this->getUsername(); |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function userRightsUrl(Project $project) |
| 62 | 62 | { |
| 63 | - return $project->getUrl() . $project->getScriptPath() . "?title=Special:UserRights&user=" . |
|
| 63 | + return $project->getUrl().$project->getScriptPath()."?title=Special:UserRights&user=". |
|
| 64 | 64 | $this->getUsername(); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | * List top edits by this user for all pages in a particular namespace. |
| 112 | 112 | * @param User $user The User. |
| 113 | 113 | * @param Project $project The project. |
| 114 | - * @param integer|string $namespace The namespace ID or 'all' |
|
| 114 | + * @param integer $namespace The namespace ID or 'all' |
|
| 115 | 115 | * @return \Symfony\Component\HttpFoundation\Response |
| 116 | 116 | */ |
| 117 | 117 | protected function namespaceTopEdits(User $user, Project $project, $namespace) |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'username' => $username, |
| 67 | 67 | ]); |
| 68 | 68 | } elseif ($project != "") { |
| 69 | - return $this->redirectToRoute("TopEditsResults", [ 'project'=>$project ]); |
|
| 69 | + return $this->redirectToRoute("TopEditsResults", ['project'=>$project]); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // set default wiki so we can populate the namespace selector |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | // Get page info about these 100 pages, so we can use their display title. |
| 150 | - $titles = array_map(function ($e) { |
|
| 150 | + $titles = array_map(function($e) { |
|
| 151 | 151 | return $e['page_title']; |
| 152 | 152 | }, $editData); |
| 153 | 153 | $displayTitles = $apiHelper->displayTitles($project->getDomain(), $titles); |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | /** @var string[] Basic metadata about the project */ |
| 15 | 15 | protected $metadata; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $nameOrUrl |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct($nameOrUrl) |
| 18 | 21 | { |
| 19 | 22 | $this->nameUnnormalized = $nameOrUrl; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function getUrl() |
| 57 | 57 | { |
| 58 | - return rtrim($this->getMetadata()['url'], '/') . '/'; |
|
| 58 | + return rtrim($this->getMetadata()['url'], '/').'/'; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | public function getAll() |
| 13 | 13 | { |
| 14 | 14 | $wikiQuery = $this->metaConnection->createQueryBuilder(); |
| 15 | - $wikiQuery->select([ 'dbname', 'name', 'url' ])->from('wiki'); |
|
| 15 | + $wikiQuery->select(['dbname', 'name', 'url'])->from('wiki'); |
|
| 16 | 16 | return $wikiQuery->execute()->fetchAll(); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $wikiQuery = $this->metaConnection->createQueryBuilder(); |
| 27 | 27 | $wikiQuery |
| 28 | - ->select([ 'dbname', 'url' ]) |
|
| 28 | + ->select(['dbname', 'url']) |
|
| 29 | 29 | ->from('wiki') |
| 30 | 30 | ->where($wikiQuery->expr()->eq('dbname', ':project')) |
| 31 | 31 | // The meta database will have the project's URL stored as https://en.wikipedia.org |