@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | $username = $request->query->get('user'); |
28 | 28 | |
29 | 29 | if ($projectQuery != "" && $username != "") { |
30 | - return $this->redirectToRoute("AdminScoreResult", [ 'project'=>$projectQuery, 'username' => $username ]); |
|
30 | + return $this->redirectToRoute("AdminScoreResult", ['project'=>$projectQuery, 'username' => $username]); |
|
31 | 31 | } elseif ($projectQuery != "") { |
32 | - return $this->redirectToRoute("AdminScoreProject", [ 'project'=>$projectQuery ]); |
|
32 | + return $this->redirectToRoute("AdminScoreProject", ['project'=>$projectQuery]); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // Otherwise fall through. |
@@ -67,20 +67,20 @@ discard block |
||
67 | 67 | $archiveTable = $lh->getTable("archive", $dbName); |
68 | 68 | |
69 | 69 | // MULTIPLIERS (to review) |
70 | - $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
71 | - $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
72 | - $USER_PAGE_MULT = 0.1; # 0 if = |
|
70 | + $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
71 | + $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
72 | + $USER_PAGE_MULT = 0.1; # 0 if = |
|
73 | 73 | $PATROLS_MULT = 1; # 0 if = |
74 | - $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
74 | + $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
75 | 75 | $AFD_MULT = 1.15; |
76 | - $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
76 | + $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
77 | 77 | $AIV_MULT = 1.15; |
78 | - $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
79 | - $NAMESPACES_MULT = 1.0; # 0 if = |
|
78 | + $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
79 | + $NAMESPACES_MULT = 1.0; # 0 if = |
|
80 | 80 | $PAGES_CREATED_LIVE_MULT = 1.4; # 0 if = |
81 | 81 | $PAGES_CREATED_ARCHIVE_MULT = 1.4; # 0 if = |
82 | - $RPP_MULT = 1.15; # 0 if = |
|
83 | - $USERRIGHTS_MULT = 0.75; # 0 if = |
|
82 | + $RPP_MULT = 1.15; # 0 if = |
|
83 | + $USERRIGHTS_MULT = 0.75; # 0 if = |
|
84 | 84 | |
85 | 85 | // Grab the connection to the replica database (which is separate from the above) |
86 | 86 | $conn = $this->get('doctrine')->getManager("replicas")->getConnection(); |
@@ -154,15 +154,15 @@ discard block |
||
154 | 154 | $now = new DateTime(); |
155 | 155 | $date = new DateTime($value); |
156 | 156 | $diff = $date->diff($now); |
157 | - $formula = 365*$diff->format("%y")+30*$diff->format("%m")+$diff->format("%d"); |
|
157 | + $formula = 365 * $diff->format("%y")+30 * $diff->format("%m")+$diff->format("%d"); |
|
158 | 158 | $value = $formula-365; |
159 | 159 | } |
160 | 160 | |
161 | 161 | if ($key == "id") { |
162 | 162 | $id = $value; |
163 | 163 | } else { |
164 | - $multiplierKey = strtoupper($row["source"] . "_MULT"); |
|
165 | - $multiplier = ( isset($$multiplierKey) ? $$multiplierKey : 1 ); |
|
164 | + $multiplierKey = strtoupper($row["source"]."_MULT"); |
|
165 | + $multiplier = (isset($$multiplierKey) ? $$multiplierKey : 1); |
|
166 | 166 | $score = max(min($value * $multiplier, 100), -100); |
167 | 167 | $master[$key]["mult"] = $multiplier; |
168 | 168 | $master[$key]["value"] = $value; |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | if ($id == 0) { |
175 | - $this->addFlash("notice", [ "noresult", $username ]); |
|
176 | - return $this->redirectToRoute("AdminScore", [ "project"=>$project ]); |
|
175 | + $this->addFlash("notice", ["noresult", $username]); |
|
176 | + return $this->redirectToRoute("AdminScore", ["project"=>$project]); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | // replace this example code with whatever you need |