@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | $wikidataId = ltrim($page->getWikidataId(), 'Q'); |
274 | 274 | |
275 | - $sql = "SELECT " . ($count ? 'COUNT(*) AS count' : '*') . " |
|
275 | + $sql = "SELECT ".($count ? 'COUNT(*) AS count' : '*')." |
|
276 | 276 | FROM wikidatawiki_p.wb_items_per_site |
277 | 277 | WHERE ips_item_id = :wikidataId"; |
278 | 278 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | |
283 | 283 | $result = $resultQuery->fetchAll(); |
284 | 284 | |
285 | - return $count ? (int) $result[0]['count'] : $result; |
|
285 | + return $count ? (int)$result[0]['count'] : $result; |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | // Transform to associative array by 'type' |
325 | 325 | foreach ($res as $row) { |
326 | - $data[$row['type'] . '_count'] = $row['value']; |
|
326 | + $data[$row['type'].'_count'] = $row['value']; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | return $data; |
@@ -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 | /** |