@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | $username = $request->query->get('username', $request->query->get('user')); |
35 | 35 | |
36 | 36 | if ($projectQuery != '' && $username != '') { |
37 | - $routeParams = [ 'project' => $projectQuery, 'username' => $username ]; |
|
37 | + $routeParams = ['project' => $projectQuery, 'username' => $username]; |
|
38 | 38 | return $this->redirectToRoute('SimpleEditCounterResult', $routeParams); |
39 | 39 | } elseif ($projectQuery != '') { |
40 | - return $this->redirectToRoute('SimpleEditCounterProject', [ 'project' => $projectQuery ]); |
|
40 | + return $this->redirectToRoute('SimpleEditCounterProject', ['project' => $projectQuery]); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // Set default project to be used by autocompletion |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | $resultQuery->execute(); |
101 | 101 | |
102 | 102 | if ($resultQuery->errorCode() > 0) { |
103 | - $this->addFlash('notice', [ 'no-result', $username ]); |
|
104 | - return $this->redirectToRoute('SimpleEditCounterProject', [ 'project' => $projectQuery ]); |
|
103 | + $this->addFlash('notice', ['no-result', $username]); |
|
104 | + return $this->redirectToRoute('SimpleEditCounterProject', ['project' => $projectQuery]); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | // Fetch the result data |
@@ -125,16 +125,16 @@ discard block |
||
125 | 125 | $rev = $row['value']; |
126 | 126 | } |
127 | 127 | if ($row['source'] == 'groups') { |
128 | - $groups .= $row['value']. ', '; |
|
128 | + $groups .= $row['value'].', '; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | 132 | // Unknown user - If the user is created the $results variable will have 3 entries. |
133 | 133 | // This is a workaround to detect non-existent IPs. |
134 | 134 | if (count($results) < 3 && $arch == 0 && $rev == 0) { |
135 | - $this->addFlash('notice', [ 'no-result', $username ]); |
|
135 | + $this->addFlash('notice', ['no-result', $username]); |
|
136 | 136 | |
137 | - return $this->redirectToRoute('SimpleEditCounterProject', [ 'project' => $projectQuery ]); |
|
137 | + return $this->redirectToRoute('SimpleEditCounterProject', ['project' => $projectQuery]); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | // Remove the last comma and space |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'project_url' => $url, |
165 | 165 | 'id' => $id, |
166 | 166 | 'arch' => $arch, |
167 | - 'rev' => $rev + $arch, |
|
167 | + 'rev' => $rev+$arch, |
|
168 | 168 | 'live' => $rev, |
169 | 169 | 'groups' => $groups, |
170 | 170 | 'globalGroups' => $globalGroups, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Get this page's database ID. |
62 | - * @return int |
|
62 | + * @return \string|null |
|
63 | 63 | */ |
64 | 64 | public function getId() |
65 | 65 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Get this page's length in bytes. |
72 | - * @return int |
|
72 | + * @return \string|null |
|
73 | 73 | */ |
74 | 74 | public function getLength() |
75 | 75 | { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | /** |
95 | 95 | * Get the full URL of this page. |
96 | - * @return string |
|
96 | + * @return \string|null |
|
97 | 97 | */ |
98 | 98 | public function getUrl() |
99 | 99 | { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | /** |
105 | 105 | * Get the numerical ID of the namespace of this page. |
106 | - * @return int |
|
106 | + * @return \string|null |
|
107 | 107 | */ |
108 | 108 | public function getNamespace() |
109 | 109 | { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | /** |
115 | 115 | * Get the number of page watchers. |
116 | - * @return int |
|
116 | + * @return \string|null |
|
117 | 117 | */ |
118 | 118 | public function getWatchers() |
119 | 119 | { |