Completed
Push — master ( b75fe6...d62ce8 )
by Matthew
02:52
created
src/AppBundle/Controller/AutomatedEditsController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6 6
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7 7
 use Symfony\Component\HttpFoundation\Request;
8
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
9 8
 
10 9
 class AutomatedEditsController extends Controller
11 10
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,8 +155,8 @@
 block discarded – undo
155 155
         $rev = $lh->getTable("revision", $dbName);
156 156
         $arc = $lh->getTable("archive", $dbName);
157 157
   
158
-        $cond_begin = ( $start ) ? " AND rev_timestamp > :start " : null;
159
-        $cond_end = ( $end ) ? " AND rev_timestamp < :end ": null;
158
+        $cond_begin = ($start) ? " AND rev_timestamp > :start " : null;
159
+        $cond_end = ($end) ? " AND rev_timestamp < :end " : null;
160 160
 
161 161
         foreach ($AEBTypes as $toolname => $check) {
162 162
             $toolname = $dbh->quote($toolname, \PDO::PARAM_STR);
Please login to merge, or discard this patch.
src/AppBundle/Controller/SimpleEditCounterController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
         $username = $request->query->get('username');
32 32
 
33 33
         if ($projectQuery != "" && $username != "") {
34
-            $routeParams = [ 'project'=>$projectQuery, 'username' => $username ];
34
+            $routeParams = ['project'=>$projectQuery, 'username' => $username];
35 35
             return $this->redirectToRoute("SimpleEditCounterResult", $routeParams);
36 36
         } elseif ($projectQuery != "") {
37
-            return $this->redirectToRoute("SimpleEditCounterProject", [ 'project'=>$projectQuery ]);
37
+            return $this->redirectToRoute("SimpleEditCounterProject", ['project'=>$projectQuery]);
38 38
         }
39 39
 
40 40
         // Otherwise fall through.
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
         $resultQuery->execute();
90 90
 
91 91
         if ($resultQuery->errorCode() > 0) {
92
-            $this->addFlash("notice", [ "noresult", $username ]);
93
-            return $this->redirectToRoute("SimpleEditCounterProject", [ "project"=>$project ]);
92
+            $this->addFlash("notice", ["noresult", $username]);
93
+            return $this->redirectToRoute("SimpleEditCounterProject", ["project"=>$project]);
94 94
         }
95 95
 
96 96
         // Fetch the result data
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
                 $rev = $row["value"];
115 115
             }
116 116
             if ($row["source"] == "groups") {
117
-                $groups .= $row["value"]. ", ";
117
+                $groups .= $row["value"].", ";
118 118
             }
119 119
         }
120 120
 
121 121
         // Unknown user - If the user is created the $results variable will have 3 entries.
122 122
         // This is a workaround to detect non-existent IPs.
123 123
         if (count($results) < 3 && $arch == 0 && $rev == 0) {
124
-            $this->addFlash('notice', [ "noresult", $username ]);
124
+            $this->addFlash('notice', ["noresult", $username]);
125 125
 
126
-            return $this->redirectToRoute("SimpleEditCounterProject", [ "project"=>$project ]);
126
+            return $this->redirectToRoute("SimpleEditCounterProject", ["project"=>$project]);
127 127
         }
128 128
 
129 129
         // Remove the last comma and space
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             'project_url' => $url,
153 153
             'id' => $id,
154 154
             'arch' => $arch,
155
-            'rev' => $rev + $arch,
155
+            'rev' => $rev+$arch,
156 156
             'live' => $rev,
157 157
             'groups' => $groups,
158 158
             'globalGroups' => $globalGroups,
Please login to merge, or discard this patch.