Passed
Push — master ( 5f2bd1...7c2064 )
by
unknown
13:34
created
www/includes/easyparliament/sidebars/mps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     'body'=>''));
10 10
 ?>
11 11
 <p>
12
-    Vacher Dods charge <a href="http://www.dodonline.co.uk/engine.asp?showPage=article&id=2564"> 95 pounds </a> for this list of MPs names. We think democracy should be free. Click <?php echo '<a href="'.$csvurl.'">here</a>'; ?> to download a CSV (Comma Separated Values) file that you can load into Excel.
12
+    Vacher Dods charge <a href="http://www.dodonline.co.uk/engine.asp?showPage=article&id=2564"> 95 pounds </a> for this list of MPs names. We think democracy should be free. Click <?php echo '<a href="' . $csvurl . '">here</a>'; ?> to download a CSV (Comma Separated Values) file that you can load into Excel.
13 13
 </p>
14 14
 <?php
15 15
 $this->block_end();
Please login to merge, or discard this patch.
www/includes/easyparliament/searchlog.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
     public function add($searchlogdata) {
37 37
 
38 38
         $ip = getenv('REMOTE_ADDR');
39
-        if (preg_match('#66\.249\.(6[4-9]|[78]\d|9[0-5])\.#', $ip)) { # Googlebot
39
+        if (preg_match('#66\.249\.(6[4-9]|[78]\d|9[0-5])\.#', $ip)) {
40
+# Googlebot
40 41
             return;
41 42
         }
42 43
         if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('#simplepie|bot#i', $_SERVER['HTTP_USER_AGENT'])) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     // Select popular queries
72 72
     public function popular_recent($count, $max_chars = null) {
73 73
 
74
-        $q =  $this->db->query("SELECT query_string, count(*) AS c FROM search_query_log
74
+        $q = $this->db->query("SELECT query_string, count(*) AS c FROM search_query_log
75 75
                 WHERE count_hits != 0 AND query_string != 'twat'
76 76
            AND query_string != 'suffragettes' AND page_number=1
77 77
                 AND query_time > date_sub(NOW(), INTERVAL 1 DAY)
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $rowarray['query'] = $query;
125 125
         $rowarray['visible_name'] = $visible_name;
126 126
         $rowarray['url'] = $url;
127
-        $rowarray['display'] = '<a href="' . $url . '">' . ($htmlescape ? _htmlentities($visible_name) : $visible_name). '</a>';
127
+        $rowarray['display'] = '<a href="' . $url . '">' . ($htmlescape ? _htmlentities($visible_name) : $visible_name) . '</a>';
128 128
 
129 129
         return $rowarray;
130 130
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
     public function admin_popular_searches($count) {
145 145
 
146
-        $q =  $this->db->query("SELECT query_string, count(*) AS c FROM search_query_log
146
+        $q = $this->db->query("SELECT query_string, count(*) AS c FROM search_query_log
147 147
                 WHERE count_hits != 0 AND query_string NOT LIKE '%speaker:%'
148 148
                 AND query_time > date_sub(NOW(), INTERVAL 30 DAY)
149 149
                 GROUP BY query_string ORDER BY c desc LIMIT $count;");
Please login to merge, or discard this patch.
www/docs/user/prompt/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 $anchor = '#addcomment';
21 21
 
22 22
 $URL = new \MySociety\TheyWorkForYou\Url('userjoin');
23
-$URL->insert(array('ret'=>$returl.$anchor));
23
+$URL->insert(array('ret'=>$returl . $anchor));
24 24
 $joinurl = $URL->generate();
25 25
 
26 26
 
Please login to merge, or discard this patch.
www/docs/index-election.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 $HANSARDURL = new \MySociety\TheyWorkForYou\Url('hansard');
73 73
 $MPURL = new \MySociety\TheyWorkForYou\Url('yourmp');
74 74
 
75
-$PAGE->block_start(array ('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
75
+$PAGE->block_start(array('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
76 76
 ?>
77 77
                         <ol>
78 78
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     } else {
90 90
         $CHANGEURL = new \MySociety\TheyWorkForYou\Url('userchangepc');
91 91
     }
92
-    $MEMBER = new MEMBER(array ('postcode'=>$THEUSER->postcode(), 'house'=>1));
92
+    $MEMBER = new MEMBER(array('postcode'=>$THEUSER->postcode(), 'house'=>1));
93 93
     $mpname = $MEMBER->full_name();
94 94
     ?>
95 95
       <p><a href="<?php echo $MPURL->generate(); ?>"><strong>Find out more about how <?php echo $mpname; ?>, your ex-MP, represented you over the last parliament</strong></a><br>
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 //$PAGE->block_end();
186 186
 
187 187
 $PAGE->stripe_end(array(
188
-    array (
188
+    array(
189 189
         'type' => 'include',
190 190
         'content' => 'whatisthissite'
191 191
     ),
192
-    array (
192
+    array(
193 193
         'type' => 'include',
194 194
         'content' => 'sitenews_recent'
195 195
     )
Please login to merge, or discard this patch.
classes/Renderer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $user = new Renderer\User();
44 44
         $data = array_merge($user->data, $data);
45 45
 
46
-        if ( isset($page_errors) ) {
46
+        if (isset($page_errors)) {
47 47
             $data['page_errors'] = $page_errors;
48 48
         }
49 49
 
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 
96 96
     private static function addCommonURLs($data) {
97 97
         $urls = array();
98
-        if ( isset($data['urls']) ) {
98
+        if (isset($data['urls'])) {
99 99
             $urls = $data['urls'];
100 100
         }
101 101
 
102 102
         $common_urls = array('search', 'alert');
103 103
 
104
-        foreach ( $common_urls as $path ) {
105
-            if (!isset($urls[$path]) ) {
104
+        foreach ($common_urls as $path) {
105
+            if (!isset($urls[$path])) {
106 106
                 $url = new Url($path);
107 107
                 $urls[$path] = $url->generate();
108 108
             }
Please login to merge, or discard this patch.
classes/Url.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         // These stores an associative array of key/value pairs that
44 44
         // we'll want passed on to other pages.
45
-        $this->session_vars = array ();
45
+        $this->session_vars = array();
46 46
 
47 47
         // Prevent things using $DATA running if it hasn't been set, ie in testing
48 48
         if (isset($DATA)) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     public function reset() {
95 95
         // Call this to remove all the session_vars.
96
-        $this->session_vars = array ();
96
+        $this->session_vars = array();
97 97
     }
98 98
 
99 99
     /**
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
      *                            override just one or two of them.
163 163
      */
164 164
 
165
-    public function generate($encode = "html", $overrideVars=array()) {
165
+    public function generate($encode = "html", $overrideVars = array()) {
166 166
 
167 167
         global $DATA;
168 168
 
169
-        $url_args = array ();
169
+        $url_args = array();
170 170
 
171 171
         foreach (array_merge($this->session_vars, $overrideVars) as $key => $var) {
172 172
             if (is_array($var)) {
Please login to merge, or discard this patch.
classes/GlossaryEditQueue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
             // the new epobject id and approval details.
62 62
             $q = $this->db->query("UPDATE editqueue
63 63
                             SET
64
-                            glossary_id='" .  $this->current_epobject_id. "',
64
+                            glossary_id='" .  $this->current_epobject_id . "',
65 65
                             editor_id='" . addslashes($THEUSER->user_id()) . "',
66 66
                             approved='1',
67 67
                             decided='" . $timestamp . "'
Please login to merge, or discard this patch.
classes/Policies.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -366,14 +366,12 @@
 block discarded – undo
366 366
     public function limitToSet($set) {
367 367
 
368 368
         // Sanity check the set exists
369
-        if (isset($this->sets[$set]))
370
-        {
369
+        if (isset($this->sets[$set])) {
371 370
             $out = array();
372 371
             // Reassemble the new policies list based on the set.
373 372
             foreach ($this->sets[$set] as $set_policy)
374 373
             {
375
-                if (isset($this->policies[$set_policy]))
376
-                {
374
+                if (isset($this->policies[$set_policy])) {
377 375
                     $out[$set_policy] = $this->policies[$set_policy];
378 376
                 } else {
379 377
                     // if we've limited the policies to a single one then we only
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -397,18 +397,18 @@
 block discarded – undo
397 397
     }
398 398
 
399 399
     public function limitToArray($policies) {
400
-          $out = array();
401
-          // Reassemble the new policies list based on the set.
402
-          foreach ($policies as $policy) {
403
-              if (isset($this->policies[$policy])) {
404
-                  $out[$policy] = $this->policies[$policy];
405
-              }
406
-          }
407
-
408
-          $new_policies = new self();
409
-          $new_policies->policies = $out;
410
-
411
-          return $new_policies;
400
+            $out = array();
401
+            // Reassemble the new policies list based on the set.
402
+            foreach ($policies as $policy) {
403
+                if (isset($this->policies[$policy])) {
404
+                    $out[$policy] = $this->policies[$policy];
405
+                }
406
+            }
407
+
408
+            $new_policies = new self();
409
+            $new_policies->policies = $out;
410
+
411
+            return $new_policies;
412 412
     }
413 413
 
414 414
     public function getPolicyDetails($policyID) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $this->all_policy_agreements = $policy_data['agreements'] ?? [];
65 65
 
66
-        if ( $policy_id ) {
66
+        if ($policy_id) {
67 67
             $this->policy_id = $policy_id;
68 68
             $this->policies = array(
69 69
                 $policy_id => $this->policies[$policy_id]
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     // want to complain here if we're looking for that policy and
146 146
                     // it does not exist. Otherwise, if the single policy isn't in
147 147
                     // the set we want to return an empty set
148
-                    if ( !isset($this->policy_id) || $set_policy == $this->policy_id ) {
148
+                    if (!isset($this->policy_id) || $set_policy == $this->policy_id) {
149 149
                         throw new \Exception ('Policy ' . $set_policy . ' in set "' . $set . '" does not exist.');
150 150
                     }
151 151
                 }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
         $image = $q['image'];
200 200
 
201
-        if ( $image && file_exists(BASEDIR . '/' . $image)) {
201
+        if ($image && file_exists(BASEDIR . '/' . $image)) {
202 202
             $props['image'] = $image;
203 203
             $props['image_license'] = $q['image_license'];
204 204
             $props['image_attribution'] = $q['image_attrib'];
Please login to merge, or discard this patch.
www/docs/admin/profile-message.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,6 +91,6 @@
 block discarded – undo
91 91
     <span class="formw"><input type="submit" name="submit" value="Update"></span>
92 92
 </div>
93 93
 </form>
94
-EOF;
94
+eof;
95 95
     return $out;
96 96
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         if ($row['constituency']) {
48 48
             $desc .= ', ' . $row['constituency'];
49 49
         }
50
-        $out .= '<option value="'.$p_id.'">'.$desc.'</option>' . "\n";
50
+        $out .= '<option value="' . $p_id . '">' . $desc . '</option>' . "\n";
51 51
     }
52 52
 
53 53
     $out .= ' </select></span> </div> ';
Please login to merge, or discard this patch.