Passed
Push — master ( 3a497b...2987bb )
by Matthew
04:39
created
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.
www/includes/easyparliament/templates/html/comments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         if (!$comment['visible']) {
85 85
             $reporthtml = '';
86 86
         } elseif (($this_page != 'commentreport' &&
87
-            $this_page != 'addcomment'  &&
87
+            $this_page != 'addcomment' &&
88 88
             $this_page != 'admin_commentreport')
89 89
             && $THEUSER->is_able_to('reportcomment')
90 90
             && $THEUSER->user_id() != $comment['user_id']
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/vote.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
                     </h2>
27 27
 
28 28
                   <?php if (isset($data['mp_data'])) {
29
-                      include('_your_mp.php');
30
-                  } ?>
29
+                        include('_your_mp.php');
30
+                    } ?>
31 31
 
32 32
                     <div class="debate-speech__division__details">
33 33
                       <p>
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
                       <?php } else { ?>
39 39
                           <?php if ($mp_vote['with_majority']) { ?>
40 40
                               <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>agreed</b> and';
41
-                              include('_vote_description.php'); ?>
41
+                                include('_vote_description.php'); ?>
42 42
                           <?php } else { ?>
43 43
                               <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>disagreed</b> and';
44
-                              include('_vote_description.php'); ?>
44
+                                include('_vote_description.php'); ?>
45 45
                           <?php } ?>
46 46
                       <?php } ?>
47 47
                       </p>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_name_vote_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     <?php if (count($tellers) > 0) { ?>
30 30
       <h4><?= gettext('Tellers') ?></h4>
31 31
       <ul class="division-names">
32
-        <?php foreach($tellers as $teller) {
32
+        <?php foreach ($tellers as $teller) {
33 33
             print_voter($teller);
34 34
         } ?>
35 35
       </p>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_vote_summary.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <p>
2 2
     <a href="#for"><?= sprintf(gettext('%s for'), $division['for']) ?></a>,
3 3
     <a href="#against"><?= sprintf(gettext('%s against'), $division['against']) ?></a><?php
4
-  if ($division['both'] > 0) { ?>,
4
+    if ($division['both'] > 0) { ?>,
5 5
     <a href="#both"><?= sprintf(gettext('%s abstained'), $division['both']) ?></a><?php
6
-  }
6
+    }
7 7
     if ($division['absent'] > 0) { ?>,
8 8
     <a href="#absent"><?= sprintf(gettext('%s absent'), $division['absent']) ?></a><?php
9 9
     } ?>.
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_votes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     ],
20 20
 ];
21 21
 
22
-$sections_with_votes = array_filter(array_keys($vote_sets), function ($s) use ($division) {
22
+$sections_with_votes = array_filter(array_keys($vote_sets), function($s) use ($division) {
23 23
     return count($division[$s]);
24 24
 });
25 25
 $sections_with_votes = array_values($sections_with_votes);
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_your_mp.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,29 +11,29 @@
 block discarded – undo
11 11
     <a href="<?= $data['mp_data']['mp_url'] ?>" class="your-mp__content">
12 12
       <?php if (isset($mp_vote)) { ?>
13 13
         <span class="your-mp__vote your-mp__vote--<?= $mp_vote['vote'] ?>"><?php
14
-          switch ($mp_vote['vote']) {
15
-              case 'aye':
14
+            switch ($mp_vote['vote']) {
15
+                case 'aye':
16 16
                   echo 'Aye';
17
-                  break;
18
-              case 'no':
17
+                    break;
18
+                case 'no':
19 19
                   echo 'No';
20
-                  break;
21
-              case 'absent':
20
+                    break;
21
+                case 'absent':
22 22
                   echo 'Absent';
23
-                  break;
24
-              case 'both':
23
+                    break;
24
+                case 'both':
25 25
                   echo 'Abstain';
26
-                  break;
27
-              case 'tellaye':
26
+                    break;
27
+                case 'tellaye':
28 28
                   echo 'Aye (Teller)';
29
-                  break;
30
-              case 'tellno':
29
+                    break;
30
+                case 'tellno':
31 31
                   echo 'No (Teller)';
32
-                  break;
33
-              default:
32
+                    break;
33
+                default:
34 34
                   echo 'N/A';
35
-          }
36
-          ?></span>
35
+            }
36
+            ?></span>
37 37
       <?php } elseif (isset($before_mp) || isset($after_mp)) { ?>
38 38
         <span class="your-mp__vote">N/A</span>
39 39
       <?php } ?>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <div class="debate-speech__division__your-mp">
2
-  <?php if (!isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
2
+  <?php if (!isset($main_vote_mp) || !$main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
3 3
     <div class="your-mp__header">
4 4
       <h3>How your <?= $division['members']['singular'] ?> voted</h3>
5 5
       <p>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,6 @@
 block discarded – undo
1 1
 <div class="debate-speech__division__your-mp">
2
-  <?php if (!isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
2
+  <?php if (!isset($main_vote_mp) || ! $main_vote_mp) {
3
+/* $main_vote_mp is true if an MP has been requested via the URL */ ?>
3 4
     <div class="your-mp__header">
4 5
       <h3>How your <?= $division['members']['singular'] ?> voted</h3>
5 6
       <p>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/topic/topic.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,10 +58,12 @@
 block discarded – undo
58 58
                     to <a href="<?= $member_url ?>/votes">see all their votes</a>.
59 59
                 </p>
60 60
 
61
-              <?php else: ?>
61
+              <?php else {
62
+    : ?>
62 63
                 <ul class="vote-descriptions">
63 64
                   <?php
64 65
                   $policy_ids = [];
66
+}
65 67
 
66 68
                   foreach ($positions as $position) {
67 69
                       if (!in_array($position['policy_id'], $policy_ids)) {
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -61,23 +61,23 @@
 block discarded – undo
61 61
               <?php else: ?>
62 62
                 <ul class="vote-descriptions">
63 63
                   <?php
64
-                  $policy_ids = [];
65
-
66
-                  foreach ($positions as $position) {
67
-                      if (!in_array($position['policy_id'], $policy_ids)) {
68
-                          $description = ucfirst($position['desc']);
69
-                          $link = sprintf(
70
-                              '%s/divisions?policy=%s',
71
-                              $member_url,
72
-                              $position['policy_id']
73
-                          );
74
-                          $link_text = $position['position'] != 'has never voted on' ? 'Show votes' : 'Details';
75
-                          $key_vote = $position;
76
-                          include(dirname(__DIR__) . '/mp/_vote_description.php');
77
-
78
-                          $policy_ids[] = $position['policy_id'];
79
-                      }
80
-                  } ?>
64
+                    $policy_ids = [];
65
+
66
+                    foreach ($positions as $position) {
67
+                        if (!in_array($position['policy_id'], $policy_ids)) {
68
+                            $description = ucfirst($position['desc']);
69
+                            $link = sprintf(
70
+                                '%s/divisions?policy=%s',
71
+                                $member_url,
72
+                                $position['policy_id']
73
+                            );
74
+                            $link_text = $position['position'] != 'has never voted on' ? 'Show votes' : 'Details';
75
+                            $key_vote = $position;
76
+                            include(dirname(__DIR__) . '/mp/_vote_description.php');
77
+
78
+                            $policy_ids[] = $position['policy_id'];
79
+                        }
80
+                    } ?>
81 81
                 </ul>
82 82
 
83 83
               <?php endif; ?>
Please login to merge, or discard this patch.