@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->page = $page; |
| 50 | 50 | |
| 51 | 51 | // Copy over supported attributes |
| 52 | - $this->id = (int) $attrs['id']; |
|
| 52 | + $this->id = (int)$attrs['id']; |
|
| 53 | 53 | $this->timestamp = DateTime::createFromFormat('YmdHis', $attrs['timestamp']); |
| 54 | 54 | $this->minor = $attrs['minor'] === '1'; |
| 55 | 55 | |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | public function getDiffUrl() |
| 197 | 197 | { |
| 198 | 198 | $project = $this->getProject(); |
| 199 | - $path = str_replace('$1', 'Special:Diff/' . $this->id, $project->getArticlePath()); |
|
| 200 | - return rtrim($project->getUrl(), '/') . $path; |
|
| 199 | + $path = str_replace('$1', 'Special:Diff/'.$this->id, $project->getArticlePath()); |
|
| 200 | + return rtrim($project->getUrl(), '/').$path; |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
@@ -207,8 +207,8 @@ discard block |
||
| 207 | 207 | public function getPermaUrl() |
| 208 | 208 | { |
| 209 | 209 | $project = $this->getProject(); |
| 210 | - $path = str_replace('$1', 'Special:PermaLink/' . $this->id, $project->getArticlePath()); |
|
| 211 | - return rtrim($project->getUrl(), '/') . $path; |
|
| 210 | + $path = str_replace('$1', 'Special:PermaLink/'.$this->id, $project->getArticlePath()); |
|
| 211 | + return rtrim($project->getUrl(), '/').$path; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this->stopwatch->start($cacheKey, 'XTools'); |
| 79 | 79 | $api = $this->getMediawikiApi($project); |
| 80 | - $params = [ "list"=>"users", "ususers"=>$username, "usprop"=>"groups" ]; |
|
| 80 | + $params = ["list"=>"users", "ususers"=>$username, "usprop"=>"groups"]; |
|
| 81 | 81 | $query = new SimpleRequest('query', $params); |
| 82 | 82 | $result = []; |
| 83 | 83 | $res = $api->getRequest($query); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | // Create the API query. |
| 114 | 114 | $api = $this->getMediawikiApi($project); |
| 115 | - $params = [ "meta"=>"globaluserinfo", "guiuser"=>$username, "guiprop"=>"groups" ]; |
|
| 115 | + $params = ["meta"=>"globaluserinfo", "guiuser"=>$username, "guiprop"=>"groups"]; |
|
| 116 | 116 | $query = new SimpleRequest('query', $params); |
| 117 | 117 | |
| 118 | 118 | // Get the result. |
@@ -156,8 +156,8 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | $username = $user->getUsername(); |
| 158 | 158 | |
| 159 | - $cacheKey = 'pages.' . $project->getDatabaseName() . '.' |
|
| 160 | - . $user->getCacheKey() . '.' . $namespace . '.' . $redirects; |
|
| 159 | + $cacheKey = 'pages.'.$project->getDatabaseName().'.' |
|
| 160 | + . $user->getCacheKey().'.'.$namespace.'.'.$redirects; |
|
| 161 | 161 | if ($this->cache->hasItem($cacheKey)) { |
| 162 | 162 | return $this->cache->getItem($cacheKey)->get(); |
| 163 | 163 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | JOIN $revisionTable ON page_id = rev_page |
| 216 | 216 | $paJoin |
| 217 | 217 | WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition |
| 218 | - " . ($hasPageAssessments ? 'GROUP BY rev_page' : '') . " |
|
| 218 | + ".($hasPageAssessments ? 'GROUP BY rev_page' : '')." |
|
| 219 | 219 | ) |
| 220 | 220 | |
| 221 | 221 | UNION |