Passed
Push — master ( a30c11...cbe31f )
by
unknown
05:50
created
www/includes/easyparliament/templates/html/section/column.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
         </div>
33 33
     </div>
34 34
   <?php } else {
35
-      $section = false;
36
-      include '_section_content.php';
37
-  } ?>
35
+        $section = false;
36
+        include '_section_content.php';
37
+    } ?>
38 38
 
39 39
 </div>
40 40
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_section_content.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-foreach($data['rows'] as $speech) { ?>
3
+foreach ($data['rows'] as $speech) { ?>
4 4
 
5 5
     <?php
6 6
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
             $body = preg_replace('# (S\d[O0WF]-\d+)[, ]#', ' <a href="/spwrans/?spid=$1">$1</a> ', $body);
16 16
             $body = preg_replace_callback(
17 17
                 '#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#',
18
-                function ($matches) {
18
+                function($matches) {
19 19
                     if ($matches[1] == 'spor') {
20 20
                         $href_segment = 'sp/?g';
21 21
                     } elseif ($matches[1] == 'spwa') {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             <div class="debate-speech__speaker-and-content">
120 120
             <?php } ?>
121 121
 
122
-          <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
122
+          <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
123 123
             <h2 class="debate-speech__speaker">
124 124
                 <?php
125 125
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 <?php } ?>
194 194
 
195 195
               <?php if (isset($speech['mp_vote'])) {
196
-                  $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ];
196
+                  $mp_vote = ['vote' => $speech['mp_vote']['vote']];
197 197
                   if (isset($speech['before_mp'])) {
198 198
                       $before_mp = $speech['before_mp'];
199 199
                   }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
               <?php # XXX
168 168
               if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) {
169 169
                   ?><p class="debate-speech__question_id"><small>
170
-                    <?= "Question $m[1]" ?>
170
+                    <?= "question $m[1]" ?>
171 171
                     </small></p>
172 172
               <?php } ?>
173 173
 
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -124,32 +124,32 @@  discard block
 block discarded – undo
124 124
                 <?php
125 125
 
126 126
                 $speaker = $speech['speaker'];
127
-              $speaker_name = ucfirst($speaker['name']);
128
-
129
-              [$image_url, $size] = MySociety\TheyWorkForYou\Utility\Member::findMemberImage(
130
-                  $speaker['person_id'],
131
-                  true,
132
-                  $data['info']['major'] == 101 ? 'lord' : 'general'
133
-              );
134
-
135
-              if (count($speaker['office'])) {
136
-                  $desc = [];
137
-                  foreach ($speaker['office'] as $off) {
138
-                      $desc[] = $off['pretty'];
139
-                  }
140
-                  $speaker_position = join(', ', $desc);
141
-              } else {
142
-                  $speaker_position = _htmlentities($speaker['party']);
143
-                  if ($speaker['house'] == 1 &&
127
+                $speaker_name = ucfirst($speaker['name']);
128
+
129
+                [$image_url, $size] = MySociety\TheyWorkForYou\Utility\Member::findMemberImage(
130
+                    $speaker['person_id'],
131
+                    true,
132
+                    $data['info']['major'] == 101 ? 'lord' : 'general'
133
+                );
134
+
135
+                if (count($speaker['office'])) {
136
+                    $desc = [];
137
+                    foreach ($speaker['office'] as $off) {
138
+                        $desc[] = $off['pretty'];
139
+                    }
140
+                    $speaker_position = join(', ', $desc);
141
+                } else {
142
+                    $speaker_position = _htmlentities($speaker['party']);
143
+                    if ($speaker['house'] == 1 &&
144 144
                       $speaker['party'] != 'Speaker' &&
145 145
                       $speaker['party'] != 'Deputy Speaker' &&
146 146
                       $speaker['constituency']
147
-                  ) {
148
-                      $speaker_position .= ', ' . $speaker['constituency'];
149
-                  }
150
-              }
147
+                    ) {
148
+                        $speaker_position .= ', ' . $speaker['constituency'];
149
+                    }
150
+                }
151 151
 
152
-              ?>
152
+                ?>
153 153
                 <a href="<?= $speech['speaker']['url'] ?>">
154 154
                     <img src="<?= $image_url ?>" alt="Photo of <?= $speaker_name ?>">
155 155
                     <strong class="debate-speech__speaker__name"><?= $speaker_name ?></strong>
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
               <?php } ?>
166 166
 
167 167
               <?php # XXX
168
-              if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) {
169
-                  ?><p class="debate-speech__question_id"><small>
168
+                if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) {
169
+                    ?><p class="debate-speech__question_id"><small>
170 170
                     <?= "Question $m[1]" ?>
171 171
                     </small></p>
172 172
               <?php } ?>
@@ -193,15 +193,15 @@  discard block
 block discarded – undo
193 193
                 <?php } ?>
194 194
 
195 195
               <?php if (isset($speech['mp_vote'])) {
196
-                  $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ];
197
-                  if (isset($speech['before_mp'])) {
198
-                      $before_mp = $speech['before_mp'];
199
-                  }
200
-                  if (isset($speech['after_mp'])) {
201
-                      $after_mp = $speech['after_mp'];
202
-                  }
203
-                  include dirname(__FILE__) . '/../divisions/_your_mp.php';
204
-              } ?>
196
+                    $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ];
197
+                    if (isset($speech['before_mp'])) {
198
+                        $before_mp = $speech['before_mp'];
199
+                    }
200
+                    if (isset($speech['after_mp'])) {
201
+                        $after_mp = $speech['after_mp'];
202
+                    }
203
+                    include dirname(__FILE__) . '/../divisions/_your_mp.php';
204
+                } ?>
205 205
                 <div class="debate-speech__division__details">
206 206
                   <?php include dirname(__FILE__) . '/../divisions/_votes.php'; ?>
207 207
                 </div>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_section_toc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $divisions_to_link = [];
4
-foreach($data['rows'] as $speech) {
4
+foreach ($data['rows'] as $speech) {
5 5
 
6 6
     # Only care about divisions...
7 7
     if ($speech['htype'] != 14) {
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/pbc_bill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,13 +85,13 @@
 block discarded – undo
85 85
 
86 86
             <p><strong>Chairpersons</strong></p>
87 87
             <ul>
88
-            <?php foreach($committee['chairmen'] as $chair) { ?>
88
+            <?php foreach ($committee['chairmen'] as $chair) { ?>
89 89
                 <li><?= $chair['name'] ?> (<?= $chair['attending'] ?>)</li>
90 90
             <?php } ?>
91 91
             </ul>
92 92
             <p><strong>Members</strong></p>
93 93
             <ul>
94
-            <?php foreach($committee['members'] as $chair) { ?>
94
+            <?php foreach ($committee['members'] as $chair) { ?>
95 95
                 <li><?= $chair['name'] ?> (<?= $chair['attending'] ?>)</li>
96 96
             <?php } ?>
97 97
             </ul>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/_division_description.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
     <?php
10 10
     # remove the current policy from the list of related policies
11 11
     if (isset($policy)) {
12
-        $division['related_policies'] = array_filter($division['related_policies'], function ($related_policy) use ($policy) {
12
+        $division['related_policies'] = array_filter($division['related_policies'], function($related_policy) use ($policy) {
13 13
             return $related_policy['policy_id'] != $policy['policy_id'];
14 14
         });
15 15
     }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/recent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
                 <div>
57 57
                     <h3 class="browse-content"><?= gettext('Browse content') ?></h3>
58 58
                     <ul>
59
-                        <?php foreach($sidebar_links as $date) { ?>
59
+                        <?php foreach ($sidebar_links as $date) { ?>
60 60
                           <li>
61 61
                               <a href="#<?= strftime('%Y-%m-%d', strtotime($date)) ?>">
62 62
                                   <?= strftime('%e %b %Y', strtotime($date)) ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/alert/index.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -116,19 +116,19 @@  discard block
 block discarded – undo
116 116
       <?php } ?>
117 117
 
118 118
       <?php
119
-          if(
120
-              $members ||
119
+            if(
120
+                $members ||
121 121
               (isset($constituencies) && count($constituencies) > 0) ||
122 122
               ($alertsearch)
123
-          ) {
124
-              /* We need to disambiguate the user's instructions */
125
-              $member_options = false;
126
-              ?>
123
+            ) {
124
+                /* We need to disambiguate the user's instructions */
125
+                $member_options = false;
126
+                ?>
127 127
         <div class="alert-section alert-section--disambiguation">
128 128
             <div class="alert-section__primary">
129 129
 
130 130
               <?php if ($members) {
131
-                  $member_options = true; ?>
131
+                    $member_options = true; ?>
132 132
                 <h3><?= sprintf(gettext('Sign up for alerts when people matching <i>%s</i> speaks'), _htmlspecialchars($alertsearch)) ?></h3>
133 133
                 <ul>
134 134
                   <?php
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                             <input type="hidden" name="email" value="<?= _htmlspecialchars($email) ?>">
141 141
                             <input type="hidden" name="pid" value="<?= $row['person_id'] ?>">
142 142
                             <?php
143
-                                  $name = member_full_name($row['house'], $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']);
143
+                                    $name = member_full_name($row['house'], $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']);
144 144
                         if ($row['constituency']) {
145 145
                             $name .= ' (' . gettext($row['constituency']) . ')';
146 146
                         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
               <?php } ?>
155 155
 
156 156
               <?php if (isset($constituencies) && count($constituencies) > 0) {
157
-                  $member_options = true; ?>
157
+                    $member_options = true; ?>
158 158
                 <h3><?= sprintf(gettext('Sign up for alerts when MPs for constituencies matching <i>%s</i> speaks'), _htmlspecialchars($alertsearch)) ?></h3>
159 159
                 <ul>
160 160
                 <?php foreach ($constituencies as $constituency => $member) { ?>
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
               <?php } ?>
173 173
 
174 174
               <?php if ($alertsearch) {
175
-                  if ($member_options) { ?>
175
+                    if ($member_options) { ?>
176 176
                 <h3><?= gettext('Sign up for alerts for topics') ?></h3>
177 177
                 <?php } else { ?>
178 178
                 <h3><?= gettext('Great! Can you just confirm what you mean?') ?></h3>
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
                             want? You will only get an alert if all of these
203 203
                             are mentioned in the same debate.') ?>
204 204
                           <?php if (isset($member_alertsearch)) {
205
-                              printf(gettext('Did you mean to get alerts for when your representative mentions something instead? If so maybe you want to subscribe to…'));
206
-                          } ?>
205
+                                printf(gettext('Did you mean to get alerts for when your representative mentions something instead? If so maybe you want to subscribe to…'));
206
+                            } ?>
207 207
                         </em>
208 208
                       <?php } ?>
209 209
                     </li>
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
                 <h3>
288 288
                     <?php
289 289
                         $name = $pid_member->full_name();
290
-                  if ($pid_member->constituency()) {
291
-                      $name .= ' (' . _htmlspecialchars($pid_member->constituency()) . ')';
292
-                  } ?>
290
+                    if ($pid_member->constituency()) {
291
+                        $name .= ' (' . _htmlspecialchars($pid_member->constituency()) . ')';
292
+                    } ?>
293 293
                     <?= sprintf(gettext('Sign up for an alert when %s speaks.'), $name) ?>
294 294
                 </h3>
295 295
               <?php } elseif ($keyword) { ?>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
       <?php } ?>
117 117
 
118 118
       <?php
119
-          if(
119
+          if (
120 120
               $members ||
121 121
               (isset($constituencies) && count($constituencies) > 0) ||
122 122
               ($alertsearch)
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/people/index.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
         </div>
83 83
 
84 84
       <?php } else {
85
-          $pc_form = ($type == 'mlas' || $type == 'msps' || $type == 'mss');
86
-          ?>
85
+            $pc_form = ($type == 'mlas' || $type == 'msps' || $type == 'mss');
86
+            ?>
87 87
 
88 88
         <form action="/<?= $pc_form ? 'postcode' : 'search' ?>/">
89 89
             <div class="search-page__section search-page__section--search">
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
 
108 108
         <div class="search-page__section search-page__section--results">
109 109
         <?php
110
-                  if (isset($former)) {
111
-                      if ($type == 'mps') {
112
-                          # No reps. Election period!
113
-                          ?>
110
+                    if (isset($former)) {
111
+                        if ($type == 'mps') {
112
+                            # No reps. Election period!
113
+                            ?>
114 114
             <div class="search-page__section__primary">
115 115
                 During the period from the dissolution of Parliament to the general election, there are no Members of Parliament.
116 116
                 <a href="/mps/?date=<?=$dissolution[1] ?>">View list of MPs as it was when Parliament was dissolved</a>
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             </div>
133 133
         <?php
134 134
         }
135
-                  } else { ?>
135
+                    } else { ?>
136 136
 
137 137
             <div class="search-page__section__primary">
138 138
             <h2><?= sprintf(gettext('All %s'), $rep_plural) ?></h2>
@@ -201,18 +201,18 @@  discard block
 block discarded – undo
201 201
                         $a_to_z_key = 'given_name';
202 202
                     }
203 203
                 }
204
-                      $initial_link = '';
205
-                      foreach ($data as $person) {
206
-                          if ($order != 'party') {
207
-                              $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1);
208
-                              if ($initial != $current_initial) {
209
-                                  $current_initial = $initial;
210
-                                  $initial_link = "name=\"$initial\" ";
211
-                              } else {
212
-                                  $initial_link = "";
213
-                              }
214
-                          }
215
-                          ?>
204
+                        $initial_link = '';
205
+                        foreach ($data as $person) {
206
+                            if ($order != 'party') {
207
+                                $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1);
208
+                                if ($initial != $current_initial) {
209
+                                    $current_initial = $initial;
210
+                                    $initial_link = "name=\"$initial\" ";
211
+                                } else {
212
+                                    $initial_link = "";
213
+                                }
214
+                            }
215
+                            ?>
216 216
                 <a <?= $initial_link ?>href="/mp/<?= $person['url'] ?>" class="people-list__person">
217 217
                 <noscript class="loading-lazy">
218 218
                     <img class="people-list__person__image" src="<?= $person['image'] ?>" loading="lazy" alt="">
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/glossary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
         }
108 108
 
109 109
         if (($this_page != 'commentreport' &&
110
-            $this_page != 'addcomment'  &&
110
+            $this_page != 'addcomment' &&
111 111
             $this_page != 'admin_commentreport')
112 112
             && $THEUSER->is_able_to('reportcomment')
113 113
             && !$comment['modflagged']
Please login to merge, or discard this patch.