Passed
Push — master ( bce844...1d068a )
by Struan
05:32
created
www/includes/easyparliament/templates/html/section/_section_content.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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') {
@@ -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.