Completed
Push — master ( cfcf82...657c44 )
by Nick
21:51 queued 16:40
created
www/includes/easyparliament/templates/html/section/_search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
                         <input type="submit" value="Search" class="button search-section__submit">
11 11
                     </div>
12 12
                 </div>
13
-                <?php if ( isset($search_sections) ) { ?>
14
-                    <?php if ( count($search_sections) == 1 ) { ?>
13
+                <?php if (isset($search_sections)) { ?>
14
+                    <?php if (count($search_sections) == 1) { ?>
15 15
                     <input name="section" value="<?= $search_sections[0]['section'] ?>" type="hidden">
16
-                    <?php } else if ( count($search_sections) > 1 ) { ?>
16
+                    <?php } else if (count($search_sections) > 1) { ?>
17 17
                     <div class="search-section__filters">
18
-                        <?php foreach ( $search_sections as $section ) { ?>
18
+                        <?php foreach ($search_sections as $section) { ?>
19 19
                             <label><input name="section[]" value="<?= $section['section'] ?>" type="checkbox" checked="checked"><?= $section['title'] ?></label>
20 20
                     <?php } ?>
21 21
                     </div>
22 22
                     <?php }
23
-                } else if ( isset($section) ) { ?>
23
+                } else if (isset($section)) { ?>
24 24
                 <input name="section" value="<?= $section ?>" type="hidden">
25 25
                 <?php } ?>
26 26
             </form>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/sidebar/looking_for.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-    <?php if ( isset($mini_survey) ) {
2
-        if ( $mini_survey['show'] ) { ?>
1
+    <?php if (isset($mini_survey)) {
2
+        if ($mini_survey['show']) { ?>
3 3
                 <form class="minisurvey" method="post" action="<?=OPTION_SURVEY_URL?>">
4 4
                     <p>Did you find what you were looking for?</p>
5 5
                     <input type="hidden" name="sourceidentifier" value="twfy-mini-2">
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
                     <input type="submit" value="Submit answer">
19 19
                 </form>
20
-        <?php } else if ( $mini_survey['answered'] ) { ?>
20
+        <?php } else if ($mini_survey['answered']) { ?>
21 21
             <p>Thanks for answering</p>
22 22
         <?php } ?>
23 23
     <?php } ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/ni/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                 <div class="row nested-row">
42 42
                     <div class="homepage-in-the-news homepage-content-section">
43 43
                         <?php if ( $featured ) {
44
-                             include dirname(__FILE__) . "/../homepage/featured.php";
44
+                                include dirname(__FILE__) . "/../homepage/featured.php";
45 45
                         } ?>
46 46
                     </div>
47 47
                     <div class="homepage-create-alert homepage-content-section">
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
             <div class="hero__mp-search__wrap">
5 5
                 <h1>Do your MLAs represent you?</h1>
6 6
                 <div class="row collapse">
7
-                    <?php if ( count($data['regional']) > 0 ) { ?>
7
+                    <?php if (count($data['regional']) > 0) { ?>
8 8
                         <ul class="homepage-rep-list">
9 9
                             <li>Your MLAs: </li>
10
-                        <?php foreach ( $data['regional'] as $mla ) { ?>
10
+                        <?php foreach ($data['regional'] as $mla) { ?>
11 11
                             <li class="homepage-rep-list__rep"><a href="/mla/?p=<?= $mla['person_id'] ?>"><?= $mla['name'] ?></a></li>
12 12
                         <?php } ?>
13 13
                         </ul>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             <div class="panel panel--flushtop clearfix">
41 41
                 <div class="row nested-row">
42 42
                     <div class="homepage-in-the-news homepage-content-section">
43
-                        <?php if ( $featured ) {
43
+                        <?php if ($featured) {
44 44
                              include dirname(__FILE__) . "/../homepage/featured.php";
45 45
                         } ?>
46 46
                     </div>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     <div class="homepage-recently homepage-content-section">
86 86
                         <h2>Recently in the Northern Ireland Assembly</h2>
87 87
                         <ul class="recently__list"><?php
88
-                            foreach ( $debates['recent'] as $recent ) {
88
+                            foreach ($debates['recent'] as $recent) {
89 89
                                 include dirname(__FILE__) . '/../homepage/recent-debates.php';
90 90
                             }
91 91
                         ?></ul>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/hansard_calendar.php 2 patches
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -135,12 +135,16 @@  discard block
 block discarded – undo
135 135
                 }
136 136
 
137 137
                 $recess_major = 1; # For all of UK Parliament
138
-                if ($hansardmajors[$data['info']['major']]['location'] == 'NI')
139
-                    $recess_major = 5;
140
-                elseif ($hansardmajors[$data['info']['major']]['location'] == 'Scotland')
141
-                    $recess_major = 4; # For all of Scotland
142
-                elseif ($data['info']['major'] == 101)
143
-                    $recess_major = 101; # Lords slightly different
138
+                if ($hansardmajors[$data['info']['major']]['location'] == 'NI') {
139
+                                    $recess_major = 5;
140
+                } elseif ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') {
141
+                                    $recess_major = 4;
142
+                }
143
+                # For all of Scotland
144
+                elseif ($data['info']['major'] == 101) {
145
+                                    $recess_major = 101;
146
+                }
147
+                # Lords slightly different
144 148
                 $recess = recess_prettify($currentDay, $month, $year, $recess_major);
145 149
 
146 150
                 // Is this day actually Today in the real world?
@@ -149,11 +153,15 @@  discard block
 block discarded – undo
149 153
                 // sittings - e.g. WH is only Tuesday-Thursday
150 154
                 if ($currentDay == $toDay) {
151 155
                     print '<td class="on"';
152
-                    if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"';
156
+                    if ($recess[0] && $recess[0]!=1) {
157
+                        print ' title="'.$recess[0].'"';
158
+                    }
153 159
                     print '>';
154 160
                 } elseif ($recess[0]) {
155 161
                     print '<td class="no"';
156
-                    if ($recess[0]!=1) print ' title="'.$recess[0].'"';
162
+                    if ($recess[0]!=1) {
163
+                        print ' title="'.$recess[0].'"';
164
+                    }
157 165
                     print '>';
158 166
                 } else {
159 167
                     print '<td>';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // $data['info'] may have 'onday', a 'yyyy-mm-dd' date which indicates
24 24
 // which date will be highlighted (otherwise, today is).
25 25
 
26
-include_once INCLUDESPATH."easyparliament/recess.php";
26
+include_once INCLUDESPATH . "easyparliament/recess.php";
27 27
 global $PAGE, $DATA, $this_page, $hansardmajors;
28 28
 
29 29
 twfy_debug("TEMPLATE", "hansard_calendar.php");
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
             // Create array containing abbreviations of days of week.
43
-            $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun');
43
+            $daysOfWeek = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
44 44
 
45 45
             // What is the first day of the month in question?
46
-            $firstDayOfMonth = mktime(0,0,0,$month,1,$year);
46
+            $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year);
47 47
 
48 48
             // How many days does this month contain?
49
-            $numberDays = date('t',$firstDayOfMonth);
49
+            $numberDays = date('t', $firstDayOfMonth);
50 50
 
51 51
             // Retrieve some information about the first day of the
52 52
             // month in question.
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             if (isset($data['info']['onday'])) {
61 61
                 // 'onday' is like 'yyyy-mm-dd'.
62 62
                 $datebits = explode('-', $data['info']['onday']);
63
-                if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) {
63
+                if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) {
64 64
                     $toDay = $datebits[2];
65 65
                 } else {
66 66
                     $toDay = '';
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
                 // sittings - e.g. WH is only Tuesday-Thursday
150 150
                 if ($currentDay == $toDay) {
151 151
                     print '<td class="on"';
152
-                    if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"';
152
+                    if ($recess[0] && $recess[0] != 1) print ' title="' . $recess[0] . '"';
153 153
                     print '>';
154 154
                 } elseif ($recess[0]) {
155 155
                     print '<td class="no"';
156
-                    if ($recess[0]!=1) print ' title="'.$recess[0].'"';
156
+                    if ($recess[0] != 1) print ' title="' . $recess[0] . '"';
157 157
                     print '>';
158 158
                 } else {
159 159
                     print '<td>';
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
                 // Is the $currentDay a member of $dates? If so,
163 163
                 // the day should be linked.
164
-                if (in_array($currentDay,$dates)) {
164
+                if (in_array($currentDay, $dates)) {
165 165
 
166 166
                     $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay);
167 167
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/topic/topic.php 2 patches
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 = array();
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
-                          $show_link = $position['position'] != 'has never voted on';
75
-                          $key_vote = $position;
76
-                          include(dirname(__DIR__) . '/mp/_vote_description.php');
77
-
78
-                          $policy_ids[] = $position['policy_id'];
79
-                      }
80
-                  } ?>
64
+                    $policy_ids = array();
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
+                            $show_link = $position['position'] != 'has never voted on';
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.
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 = array();
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.
www/includes/easyparliament/templates/html/calendar_date.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,10 +18,13 @@
 block discarded – undo
18 18
 # Content goes here
19 19
 foreach ($data['dates'] as $date => $day_events) {
20 20
     foreach ($order as $i => $chamber) {
21
-        if (!array_key_exists($chamber, $day_events))
22
-            continue;
21
+        if (!array_key_exists($chamber, $day_events)) {
22
+                    continue;
23
+        }
23 24
         $events = $day_events[$chamber];
24
-        if ($plural[$i]) $chamber .= 's';
25
+        if ($plural[$i]) {
26
+            $chamber .= 's';
27
+        }
25 28
         print "<h2 class='calendar'>$chamber";
26 29
         if (in_array($major[$i], $data['majors'])) {
27 30
             $URL = new URL($hansardmajors[$major[$i]]['page_all']);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         print "<h2 class='calendar'>$chamber";
26 26
         if (in_array($major[$i], $data['majors'])) {
27 27
             $URL = new URL($hansardmajors[$major[$i]]['page_all']);
28
-            $URL->insert( array( 'd' => $date ) );
28
+            $URL->insert(array('d' => $date));
29 29
             print ' &nbsp; <a href="' . $URL->generate() . '">See this day &rarr;</a>';
30 30
         }
31 31
         print "</h2>\n";
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/vote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             </div>
114 114
 
115 115
              <ul class="debate-speech__meta debate-speech__links">
116
-             <?php if ( $division['debate_url'] ) { ?>
116
+             <?php if ($division['debate_url']) { ?>
117 117
                   <li class="link-to-speech">
118 118
                       <a class="link debate-speech__meta__link" href="<?= $division['debate_url'] ?>">Show full debate</a>
119 119
                   </li>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_vote_list.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
                     ?>
10 10
                     <ul class="division-list">
11 11
                         <?php foreach ($votes as $vote) {
12
-                          $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']);
13
-                          if ($vote['teller']) {
14
-                              $tellers[] = $voter;
15
-                          } else { ?>
12
+                            $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']);
13
+                            if ($vote['teller']) {
14
+                                $tellers[] = $voter;
15
+                            } else { ?>
16 16
                             <li><?= $voter ?></li>
17 17
                         <?php
18 18
                             }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/index.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
           </div>
8 8
           <div class="business-section__primary">
9 9
                <?php
10
-               if ( isset($divisions) && $divisions ) {
11
-                 $current_date = '';
12
-               ?>
10
+                if ( isset($divisions) && $divisions ) {
11
+                    $current_date = '';
12
+                ?>
13 13
                <ul class="business-list">
14 14
                     <?php foreach ($divisions as $division) { ?>
15 15
                     <li id="<?= $division['division_id'] ?>">
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
                         <h3><?= format_date($division['date'], LONGERDATEFORMAT) ?></h3>
19 19
                         </span>
20 20
                         <?php
21
-                          $current_date = $division['date'];
21
+                            $current_date = $division['date'];
22 22
                         } ?>
23 23
                         <a href="/divisions/<?= $division['division_id'] ?>" class="business-list__title">
24 24
                             <h3><?= $division['division_title'] ?></h3>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
           </div>
8 8
           <div class="business-section__primary">
9 9
                <?php
10
-               if ( isset($divisions) && $divisions ) {
10
+               if (isset($divisions) && $divisions) {
11 11
                  $current_date = '';
12 12
                ?>
13 13
                <ul class="business-list">
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                             <br>
30 30
                             <span class="business-list__meta">
31 31
                                 <?= $division['summary'] ?>
32
-                                <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>': '' ?>
32
+                                <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>' : '' ?>
33 33
                             </span>
34 34
                         </p>
35 35
                     </li>
Please login to merge, or discard this patch.