@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Repository; |
| 6 | 6 | |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | SUM(IF(type = 'arc', 1, 0)) AS `deleted`, |
| 62 | 62 | SUM($summation) AS `redirects`, |
| 63 | 63 | SUM(rev_length) AS `total_length` |
| 64 | - FROM (" . |
|
| 64 | + FROM (". |
|
| 65 | 65 | $this->getPagesCreatedInnerSql($project, $conditions, $deleted, $start, $end, false, true)." |
| 66 | 66 | ) a ". |
| 67 | - $wasRedirect . |
|
| 67 | + $wasRedirect. |
|
| 68 | 68 | "GROUP BY `namespace`"; |
| 69 | 69 | |
| 70 | 70 | $result = $this->executeQuery($sql, $project, $user, $namespace) |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $sql = "SELECT * FROM (". |
| 131 | 131 | $this->getPagesCreatedInnerSql($project, $conditions, $deleted, $start, $end, $offset)." |
| 132 | 132 | ) a ". |
| 133 | - $wasRedirect . |
|
| 133 | + $wasRedirect. |
|
| 134 | 134 | "ORDER BY `timestamp` DESC |
| 135 | 135 | ".(!empty($limit) ? "LIMIT $limit" : ''); |
| 136 | 136 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Model; |
| 6 | 6 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function getUrl(bool $withTrailingSlash = true): string |
| 157 | 157 | { |
| 158 | - return rtrim($this->getBasicInfo()['url'], '/') . ($withTrailingSlash ? '/' : ''); |
|
| 158 | + return rtrim($this->getBasicInfo()['url'], '/').($withTrailingSlash ? '/' : ''); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if ($page instanceof Page) { |
| 172 | 172 | $page = $page->getTitle($useUnnormalizedPageTitle); |
| 173 | 173 | } |
| 174 | - return str_replace('$1', $page, $this->getUrl(false) . $this->getArticlePath()); |
|
| 174 | + return str_replace('$1', $page, $this->getUrl(false).$this->getArticlePath()); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | public function getScript(): string |
| 208 | 208 | { |
| 209 | 209 | $metadata = $this->getMetadata(); |
| 210 | - return $metadata['general']['script'] ?? $this->getScriptPath() . '/index.php'; |
|
| 210 | + return $metadata['general']['script'] ?? $this->getScriptPath().'/index.php'; |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /** |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | public function getApiUrl(): string |
| 218 | 218 | { |
| 219 | - return rtrim($this->getUrl(), '/') . $this->getRepository()->getApiPath(); |
|
| 219 | + return rtrim($this->getUrl(), '/').$this->getRepository()->getApiPath(); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | public function userOptInPage(User $user): string |
| 293 | 293 | { |
| 294 | - return 'User:' . $user->getUsername() . '/EditCounterOptIn.js'; |
|
| 294 | + return 'User:'.$user->getUsername().'/EditCounterOptIn.js'; |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | // 4. Lastly, see if they've opted in globally on the default project or Meta. |
| 328 | - $globalPageName = $user->getUsername() . '/EditCounterGlobalOptIn.js'; |
|
| 328 | + $globalPageName = $user->getUsername().'/EditCounterGlobalOptIn.js'; |
|
| 329 | 329 | $globalProject = $this->getRepository()->getGlobalProject(); |
| 330 | 330 | $globalExists = $globalProject->getRepository() |
| 331 | 331 | ->pageHasContent($globalProject, $userNsId, $globalPageName); |