@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | $username = $request->query->get('username', $request->query->get('user')); |
| 48 | 48 | |
| 49 | 49 | if ($projectQuery != '' && $username != '') { |
| 50 | - return $this->redirectToRoute('AdminScoreResult', [ 'project' => $projectQuery, 'username' => $username ]); |
|
| 50 | + return $this->redirectToRoute('AdminScoreResult', ['project' => $projectQuery, 'username' => $username]); |
|
| 51 | 51 | } elseif ($projectQuery != '' && $project === null) { |
| 52 | - return $this->redirectToRoute('AdminScoreProject', [ 'project' => $projectQuery ]); |
|
| 52 | + return $this->redirectToRoute('AdminScoreProject', ['project' => $projectQuery]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Set default project so we can populate the namespace selector. |
@@ -95,20 +95,20 @@ discard block |
||
| 95 | 95 | $archiveTable = $projectRepo->getTableName($dbName, 'archive'); |
| 96 | 96 | |
| 97 | 97 | // MULTIPLIERS (to review) |
| 98 | - $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
| 99 | - $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
| 100 | - $USER_PAGE_MULT = 0.1; # 0 if = |
|
| 98 | + $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
| 99 | + $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
| 100 | + $USER_PAGE_MULT = 0.1; # 0 if = |
|
| 101 | 101 | $PATROLS_MULT = 1; # 0 if = |
| 102 | - $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
| 102 | + $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
| 103 | 103 | $AFD_MULT = 1.15; |
| 104 | - $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
| 104 | + $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
| 105 | 105 | $AIV_MULT = 1.15; |
| 106 | - $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
| 107 | - $NAMESPACES_MULT = 1.0; # 0 if = |
|
| 106 | + $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
| 107 | + $NAMESPACES_MULT = 1.0; # 0 if = |
|
| 108 | 108 | $PAGES_CREATED_LIVE_MULT = 1.4; # 0 if = |
| 109 | 109 | $PAGES_CREATED_ARCHIVE_MULT = 1.4; # 0 if = |
| 110 | - $RPP_MULT = 1.15; # 0 if = |
|
| 111 | - $USERRIGHTS_MULT = 0.75; # 0 if = |
|
| 110 | + $RPP_MULT = 1.15; # 0 if = |
|
| 111 | + $USERRIGHTS_MULT = 0.75; # 0 if = |
|
| 112 | 112 | |
| 113 | 113 | // Grab the connection to the replica database (which is separate from the above) |
| 114 | 114 | $conn = $this->get('doctrine')->getManager("replicas")->getConnection(); |
@@ -186,15 +186,15 @@ discard block |
||
| 186 | 186 | $now = new DateTime(); |
| 187 | 187 | $date = new DateTime($value); |
| 188 | 188 | $diff = $date->diff($now); |
| 189 | - $formula = 365*$diff->format("%y")+30*$diff->format("%m")+$diff->format("%d"); |
|
| 189 | + $formula = 365 * $diff->format("%y")+30 * $diff->format("%m")+$diff->format("%d"); |
|
| 190 | 190 | $value = $formula-365; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($key == "id") { |
| 194 | 194 | $id = $value; |
| 195 | 195 | } else { |
| 196 | - $multiplierKey = strtoupper($row["source"] . "_MULT"); |
|
| 197 | - $multiplier = ( isset($$multiplierKey) ? $$multiplierKey : 1 ); |
|
| 196 | + $multiplierKey = strtoupper($row["source"]."_MULT"); |
|
| 197 | + $multiplier = (isset($$multiplierKey) ? $$multiplierKey : 1); |
|
| 198 | 198 | $score = max(min($value * $multiplier, 100), -100); |
| 199 | 199 | $master[$key]["mult"] = $multiplier; |
| 200 | 200 | $master[$key]["value"] = $value; |
@@ -204,8 +204,8 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | if ($id == 0) { |
| 207 | - $this->addFlash("notice", [ "no-result", $username ]); |
|
| 208 | - return $this->redirectToRoute("AdminScore", [ "project"=>$project ]); |
|
| 207 | + $this->addFlash("notice", ["no-result", $username]); |
|
| 208 | + return $this->redirectToRoute("AdminScore", ["project"=>$project]); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | return $this->render('adminscore/result.html.twig', [ |