Failed Conditions
Push — master ( b155cb...bf56a7 )
by Struan
05:04
created
www/includes/easyparliament/templates/html/mp/_profile_footer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 
6 6
     <p><?= gettext('For an explanation of the vote descriptions please see our page about <a href="/voting-information">voting information on TheyWorkForYou</a>.') ?></p>
7 7
 
8
-  <?php if(isset($data['photo_attribution_text'])) { ?>
8
+  <?php if (isset($data['photo_attribution_text'])) { ?>
9 9
     <p>
10
-      <?php if(isset($data['photo_attribution_link'])) { ?>
10
+      <?php if (isset($data['photo_attribution_link'])) { ?>
11 11
         <?= gettext('Profile photo:') ?>
12 12
         <a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a>
13 13
       <?php } else { ?>
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
       <?php } ?>
16 16
     </p>
17 17
   <?php } ?>
18
-  <?php if(!$image || !$image['exists']) { ?>
18
+  <?php if (!$image || !$image['exists']) { ?>
19 19
     <p>
20 20
         We&rsquo;re missing a photo of <?= $full_name ?>.
21 21
         If you have a photo <em>that you can release under
Please login to merge, or discard this patch.
www/docs/api/hook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@
 block discarded – undo
57 57
         # Update the invoice's PaymentIntent and Charge to say it came from TWFY (for CSV export)
58 58
         # Both are shown in the Stripe admin, annoyingly
59 59
         if ($obj->payment_intent) {
60
-            \Stripe\PaymentIntent::update($obj->payment_intent, [ 'description' => 'TheyWorkForYou' ]);
60
+            \Stripe\PaymentIntent::update($obj->payment_intent, ['description' => 'TheyWorkForYou']);
61 61
         }
62 62
         if ($obj->charge) {
63
-            \Stripe\Charge::update($obj->charge, [ 'description' => 'TheyWorkForYou' ]);
63
+            \Stripe\Charge::update($obj->charge, ['description' => 'TheyWorkForYou']);
64 64
         }
65 65
     } catch (\Stripe\Exception\ApiErrorException $e) {
66 66
     }
Please login to merge, or discard this patch.
classes/AlertView/Simple.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
         $existing = $this->alert->fetch_by_token($confirmation);
122 122
         preg_match('/speaker:(\d+)/', $existing['criteria'], $matches);
123 123
         $old_mp_id = $matches[1];
124
-        $old_mp = new \MySociety\TheyWorkForYou\Member([ 'person_id' => $old_mp_id ]);
125
-        $new_mp = new \MySociety\TheyWorkForYou\Member([ 'constituency' => $old_mp->constituency, 'house' => 1 ]);
124
+        $old_mp = new \MySociety\TheyWorkForYou\Member(['person_id' => $old_mp_id]);
125
+        $new_mp = new \MySociety\TheyWorkForYou\Member(['constituency' => $old_mp->constituency, 'house' => 1]);
126 126
 
127 127
         $q = $this->db->query(
128 128
             "SELECT alert_id, criteria, registrationtoken FROM alerts
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
         preg_match('/speaker:(\d+)/', $existing['criteria'], $matches);
186 186
         $criteria = $matches[1];
187 187
 
188
-        $old_mp = new \MySociety\TheyWorkForYou\Member([ 'person_id' => $criteria ]);
189
-        $new_mp = new \MySociety\TheyWorkForYou\Member([ 'constituency' => $old_mp->constituency, 'house' => 1 ]);
188
+        $old_mp = new \MySociety\TheyWorkForYou\Member(['person_id' => $criteria]);
189
+        $new_mp = new \MySociety\TheyWorkForYou\Member(['constituency' => $old_mp->constituency, 'house' => 1]);
190 190
 
191 191
         if ($this->alert->fetch_by_mp($existing['email'], $new_mp->person_id)) {
192 192
             $data = [
Please login to merge, or discard this patch.
classes/Search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
         $data['search_keyword'] = $this->searchkeyword;
158 158
 
159 159
         $is_adv = false;
160
-        foreach (['to', 'from', 'person', 'section', 'column', 'phrase', 'exclude' ] as $var) {
160
+        foreach (['to', 'from', 'person', 'section', 'column', 'phrase', 'exclude'] as $var) {
161 161
             $key = "search_$var";
162 162
             $data[$key] = get_http_var($var);
163 163
             if ($data[$key]) {
Please login to merge, or discard this patch.
classes/Utility/Postcode.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         if ($last_postcode == $postcode) {
44 44
             $return_value = $mp_only ? $last_postcode_value['WMC'] : $last_postcode_value;
45
-            twfy_debug("TIME", "Postcode $postcode looked up last time, is " . (is_array($return_value) ? implode(', ', $return_value) : $return_value));
45
+            twfy_debug("TIME", "postcode $postcode looked up last time, is " . (is_array($return_value) ? implode(', ', $return_value) : $return_value));
46 46
             return $return_value;
47 47
         }
48 48
 
Please login to merge, or discard this patch.
classes/Utility/Hansard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         global $hansardmajors;
39 39
         $db = new \ParlDB();
40 40
 
41
-        $q = $db->query("SELECT major FROM hansard WHERE gid = :gid", [ ':gid' => $gid ])->first();
41
+        $q = $db->query("SELECT major FROM hansard WHERE gid = :gid", [':gid' => $gid])->first();
42 42
         $url_gid = fix_gid_from_db($gid);
43 43
         $url = new \MySociety\TheyWorkForYou\Url($hansardmajors[$q['major']]['page']);
44 44
         $url->insert(['id' => $url_gid]);
Please login to merge, or discard this patch.
classes/Utility/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             }
116 116
         }
117 117
 
118
-        uasort($speakers, function ($a, $b) {
118
+        uasort($speakers, function($a, $b) {
119 119
 
120 120
             if ($a['count'] > $b['count']) {
121 121
                 return -1;
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             // Looks like a postcode - can we find the constituency?
260 260
             $constituency = Postcode::postcodeToConstituency($searchterm);
261 261
             if ($constituency) {
262
-                return [ [$constituency], true ];
262
+                return [[$constituency], true];
263 263
             }
264 264
         }
265 265
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             $constituencies[] = $row['name'];
278 278
         }
279 279
 
280
-        return [ $constituencies, false ];
280
+        return [$constituencies, false];
281 281
     }
282 282
 
283 283
     /**
Please login to merge, or discard this patch.
classes/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@
 block discarded – undo
63 63
         $data['optin_service'] = $optin_values['optin_service'];
64 64
         $data['optin_stream'] = $optin_values['optin_stream'];
65 65
         $data['optin_org'] = $optin_values['optin_org'];
66
-        $data['postcode']	= $user->postcode();
66
+        $data['postcode'] = $user->postcode();
67 67
         $data['website']	= $user->url();
68
-        $data['registrationtime']	= $user->registrationtime();
68
+        $data['registrationtime'] = $user->registrationtime();
69 69
         $data['status'] = $user->status();
70 70
         $data["deleted"] = $user->deleted();
71 71
         $data["confirmed"] = $user->confirmed();
Please login to merge, or discard this patch.
classes/Homepage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
             $instance = new $class();
145 145
             $more_url = new Url($recent[1]);
146 146
             if ($recent[0] == 'recent_pbc_debates') {
147
-                $content = [ 'data' => $instance->display($recent[0], ['num' => 5], 'none') ];
147
+                $content = ['data' => $instance->display($recent[0], ['num' => 5], 'none')];
148 148
             } else {
149 149
                 $content = $instance->display($recent[0], ['days' => 7, 'num' => 1], 'none');
150 150
                 if (isset($content['data']) && count($content['data'])) {
Please login to merge, or discard this patch.