Completed
Pull Request — master (#1323)
by Nick
84:26 queued 71:50
created
www/includes/easyparliament/templates/html/section/year.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                 foreach ( $years as $year => $months ) { ?>
25 25
             <div class="calendar-year">
26 26
                 <?php foreach ($months as $month => $dates) {
27
-                  include '_calendar.php';
27
+                    include '_calendar.php';
28 28
                 } ?>
29 29
             </div>
30 30
             <?php }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
         </div>
9 9
         <div class="business-section__solo">
10 10
             <div class="calendar__controls">
11
-                <?php if ( isset( $prev ) ) { ?>
11
+                <?php if (isset($prev)) { ?>
12 12
                 <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">&larr; <?= $prev['title'] ?></a>
13 13
                 <?php } else { ?>
14 14
                 <span class="calendar__controls__previous"></span>
15 15
                 <?php } ?>
16 16
                 <span class="calendar__controls__current"><?= $year ?></span>
17
-                <?php if ( isset( $next ) ) { ?>
17
+                <?php if (isset($next)) { ?>
18 18
                 <a href="<?= $next['url'] ?>" class="calendar__controls__next"><?= $next['title'] ?> &rarr;</a>
19 19
                 <?php } else { ?>
20 20
                 <span class="calendar__controls__next"></span>
21 21
                 <?php } ?>
22 22
             </div>
23
-            <?php if ( isset($years) ) {
24
-                foreach ( $years as $year => $months ) { ?>
23
+            <?php if (isset($years)) {
24
+                foreach ($years as $year => $months) { ?>
25 25
             <div class="calendar-year">
26 26
                 <?php foreach ($months as $month => $dates) {
27 27
                   include '_calendar.php';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
         </div>
35 35
     </div>
36 36
 
37
-    <?php $search_title = "Search $title"; include '_search.php'; ?>
37
+    <?php $search_title = "search $title"; include '_search.php'; ?>
38 38
 
39 39
 </div>
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,13 +10,15 @@  discard block
 block discarded – undo
10 10
             <div class="calendar__controls">
11 11
                 <?php if ( isset( $prev ) ) { ?>
12 12
                 <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">&larr; <?= $prev['title'] ?></a>
13
-                <?php } else { ?>
13
+                <?php }
14
+else { ?>
14 15
                 <span class="calendar__controls__previous"></span>
15 16
                 <?php } ?>
16 17
                 <span class="calendar__controls__current"><?= $year ?></span>
17 18
                 <?php if ( isset( $next ) ) { ?>
18 19
                 <a href="<?= $next['url'] ?>" class="calendar__controls__next"><?= $next['title'] ?> &rarr;</a>
19
-                <?php } else { ?>
20
+                <?php }
21
+else { ?>
20 22
                 <span class="calendar__controls__next"></span>
21 23
                 <?php } ?>
22 24
             </div>
@@ -28,7 +30,8 @@  discard block
 block discarded – undo
28 30
                 } ?>
29 31
             </div>
30 32
             <?php }
31
-            } else { ?>
33
+            }
34
+            else { ?>
32 35
                 We don't seem to have any <?= $parent_title ?> for this year.
33 36
             <?php } ?>
34 37
         </div>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/pbc_index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
 
23 23
         <div class="business-section__primary">
24 24
             <ul class="business-list">
25
-                <?php foreach ( $content['data'] as $date => $bills ) { ?>
25
+                <?php foreach ($content['data'] as $date => $bills) { ?>
26 26
                 <li>
27 27
                     <span class="business-list__title">
28 28
                         <h3>
29 29
                             <?= $date ?>
30 30
                         </h3>
31 31
                     </span>
32
-                    <?php foreach ( $bills as $bill ) { ?>
32
+                    <?php foreach ($bills as $bill) { ?>
33 33
                     <p>
34 34
                     <a href="<?= $bill['url'] ?>" class="business-list__title">
35 35
                         <?= $bill['bill'] ?> &ndash; <?= $bill['sitting'] ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_calendar_section.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
             <?php
2 2
             foreach ( $calendar as $year => $months ) {
3 3
                 foreach ($months as $month => $dates) {
4
-                     include '_calendar.php';
4
+                        include '_calendar.php';
5 5
                 }
6 6
             } ?>
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
             <?php
2
-            foreach ( $calendar as $year => $months ) {
2
+            foreach ($calendar as $year => $months) {
3 3
                 foreach ($months as $month => $dates) {
4 4
                      include '_calendar.php';
5 5
                 }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/column.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
         </div>
33 33
     </div>
34 34
   <?php } else {
35
-      $section = false; include '_section_content.php';
36
-  } ?>
35
+        $section = false; include '_section_content.php';
36
+    } ?>
37 37
 
38 38
 </div>
39 39
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 </div>
20 20
 <div class="full-page">
21 21
 
22
-  <?php if ( count($data['rows']) == 0 ) { ?>
22
+  <?php if (count($data['rows']) == 0) { ?>
23 23
     <div class="debate-speech">
24 24
         <div class="full-page__row">
25 25
             <div class="full-page__unit">
26
-                <?php if ( $col_country == 'SCOTLAND' || $col_country == 'NORTHERN IRELAND' ) { ?>
26
+                <?php if ($col_country == 'SCOTLAND' || $col_country == 'NORTHERN IRELAND') { ?>
27 27
                     We only have information about columns for debates in the House of Commons and the House of Lords.
28 28
                 <?php } else { ?>
29 29
                     We can't find anything in column <?= $column ?> on <?= $debate_day_human ?>.
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,13 +25,15 @@
 block discarded – undo
25 25
             <div class="full-page__unit">
26 26
                 <?php if ( $col_country == 'SCOTLAND' || $col_country == 'NORTHERN IRELAND' ) { ?>
27 27
                     We only have information about columns for debates in the House of Commons and the House of Lords.
28
-                <?php } else { ?>
28
+                <?php }
29
+else { ?>
29 30
                     We can't find anything in column <?= $column ?> on <?= $debate_day_human ?>.
30 31
                 <?php } ?>
31 32
             </div>
32 33
         </div>
33 34
     </div>
34
-  <?php } else {
35
+  <?php }
36
+else {
35 37
       $section = false; include '_section_content.php';
36 38
   } ?>
37 39
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_calendar.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     if ($dayOfWeek < 0) {
42 42
         $dayOfWeek = 6;
43 43
     }
44
-  ?>
44
+    ?>
45 45
   <?php }
46 46
     if (!isset($years)) { ?>
47 47
     <div class="calendar__controls">
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     } else {
128 128
                         $day_section = $section;
129 129
                         if ($section == 'sp') {
130
-                          $day_section = 'spdebates';
130
+                            $day_section = 'spdebates';
131 131
                         }
132 132
                         $urls[$day_section . 'day']->insert(array('d'=>$date));
133 133
                         print "<a href=\"" . $urls[$day_section . 'day']->generate() . "\">$currentDay</a></td>";
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <div class="calendar">
2
-  <?php if(isset($month)){
3
-    $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun');
2
+  <?php if (isset($month)) {
3
+    $daysOfWeek = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
4 4
 
5 5
     // What is the first day of the month in question?
6
-    $firstDayOfMonth = mktime(0,0,0,$month,1,$year);
6
+    $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year);
7 7
 
8 8
     // How many days does this month contain?
9
-    $numberDays = date('t',$firstDayOfMonth);
9
+    $numberDays = date('t', $firstDayOfMonth);
10 10
 
11 11
     // Retrieve some information about the first day of the
12 12
     // month in question.
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     if (isset($info['onday'])) {
19 19
         // 'onday' is like 'yyyy-mm-dd'.
20 20
         $datebits = explode('-', $info['onday']);
21
-        if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) {
21
+        if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) {
22 22
             $toDay = $datebits[2];
23 23
         } else {
24 24
             $toDay = '';
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
   <?php }
46 46
     if (!isset($years)) { ?>
47 47
     <div class="calendar__controls">
48
-        <?php if ( isset($prev) ) { ?>
48
+        <?php if (isset($prev)) { ?>
49 49
         <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">&larr;</a>
50 50
         <?php } else { ?>
51 51
         <span class="calendar__controls__previous">&nbsp;</span>
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         <span class="calendar__controls__current">
54 54
             <?= $monthName ?> <?= $year ?>
55 55
         </span>
56
-        <?php if ( isset($next) ) { ?>
56
+        <?php if (isset($next)) { ?>
57 57
         <a href="<?= $next['url'] ?>" class="calendar__controls__next">&rarr;</a>
58 58
         <?php } else { ?>
59 59
         <span class="calendar__controls__next">&nbsp;</span>
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
                 // sittings - e.g. WH is only Tuesday-Thursday
107 107
                 if ($currentDay == $toDay) {
108 108
                     print '<td class="on"';
109
-                    if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"';
109
+                    if ($recess[0] && $recess[0] != 1) print ' title="' . $recess[0] . '"';
110 110
                     print '>';
111 111
                 } elseif ($recess[0]) {
112 112
                     print '<td class="no"';
113
-                    if ($recess[0]!=1) print ' title="'.$recess[0].'"';
113
+                    if ($recess[0] != 1) print ' title="' . $recess[0] . '"';
114 114
                     print '>';
115 115
                 } else {
116 116
                     print '<td>';
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
                 // Is the $currentDay a member of $dates? If so,
120 120
                 // the day should be linked.
121
-                if (in_array($currentDay,$dates)) {
121
+                if (in_array($currentDay, $dates)) {
122 122
 
123 123
                     $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay);
124 124
 
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
             </tr>
157 157
         </tbody>
158 158
     </table>
159
-  <?php if(!isset($years)){ ?>
159
+  <?php if (!isset($years)) { ?>
160 160
     <div class="calendar__footer">
161 161
     <?php
162 162
         $y = $urls['day'];
163 163
         $y->reset();
164
-        $y->insert(array( 'y' => $year ));
164
+        $y->insert(array('y' => $year));
165 165
         $url = $y->generate();
166 166
     ?>
167 167
     <a href="<?= $url ?>">See all of <?= $year ?></a>
Please login to merge, or discard this patch.
Braces   +27 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <div class="calendar">
2
-  <?php if(isset($month)){
2
+  <?php if(isset($month)) {
3 3
     $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun');
4 4
 
5 5
     // What is the first day of the month in question?
@@ -20,17 +20,20 @@  discard block
 block discarded – undo
20 20
         $datebits = explode('-', $info['onday']);
21 21
         if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) {
22 22
             $toDay = $datebits[2];
23
-        } else {
23
+        }
24
+        else {
24 25
             $toDay = '';
25 26
         }
26
-    } else {
27
+    }
28
+    else {
27 29
         // If this calendar is for this current, real world, month
28 30
         // we get the value of today, so we can highlight it.
29 31
         $nowDateComponents = getdate();
30 32
 
31 33
         if ($nowDateComponents['year'] == $year && $nowDateComponents['mon'] == $month) {
32 34
             $toDay = $nowDateComponents['mday'];
33
-        } else {
35
+        }
36
+        else {
34 37
             $toDay = '';
35 38
         }
36 39
     }
@@ -47,7 +50,8 @@  discard block
 block discarded – undo
47 50
     <div class="calendar__controls">
48 51
         <?php if ( isset($prev) ) { ?>
49 52
         <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">&larr;</a>
50
-        <?php } else { ?>
53
+        <?php }
54
+else { ?>
51 55
         <span class="calendar__controls__previous">&nbsp;</span>
52 56
         <?php } ?>
53 57
         <span class="calendar__controls__current">
@@ -55,11 +59,13 @@  discard block
 block discarded – undo
55 59
         </span>
56 60
         <?php if ( isset($next) ) { ?>
57 61
         <a href="<?= $next['url'] ?>" class="calendar__controls__next">&rarr;</a>
58
-        <?php } else { ?>
62
+        <?php }
63
+else { ?>
59 64
         <span class="calendar__controls__next">&nbsp;</span>
60 65
         <?php } ?>
61 66
     </div>
62
-  <?php } else { ?>
67
+  <?php }
68
+else { ?>
63 69
     <div class="calendar__header">
64 70
         <?= $monthName ?>
65 71
     </div>
@@ -106,13 +112,19 @@  discard block
 block discarded – undo
106 112
                 // sittings - e.g. WH is only Tuesday-Thursday
107 113
                 if ($currentDay == $toDay) {
108 114
                     print '<td class="on"';
109
-                    if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"';
115
+                    if ($recess[0] && $recess[0]!=1) {
116
+                        print ' title="'.$recess[0].'"';
117
+                    }
110 118
                     print '>';
111
-                } elseif ($recess[0]) {
119
+                }
120
+                elseif ($recess[0]) {
112 121
                     print '<td class="no"';
113
-                    if ($recess[0]!=1) print ' title="'.$recess[0].'"';
122
+                    if ($recess[0]!=1) {
123
+                        print ' title="'.$recess[0].'"';
124
+                    }
114 125
                     print '>';
115
-                } else {
126
+                }
127
+                else {
116 128
                     print '<td>';
117 129
                 }
118 130
 
@@ -124,7 +136,8 @@  discard block
 block discarded – undo
124 136
 
125 137
                     if ($currentDay == $toDay) {
126 138
                         print '<span>' . $currentDay . '</span></td>';
127
-                    } else {
139
+                    }
140
+                    else {
128 141
                         $day_section = $section;
129 142
                         if ($section == 'sp') {
130 143
                           $day_section = 'spdebates';
@@ -135,7 +148,8 @@  discard block
 block discarded – undo
135 148
 
136 149
                     // $currentDay is not a member of $dates.
137 150
 
138
-                } else {
151
+                }
152
+                else {
139 153
 
140 154
                         print '<span>' . $currentDay . '</span></td>';
141 155
                 }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/day.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                       <?php } ?>
50 50
                     </a>
51 51
                   <?php }
52
-                  if ( isset($row['excerpt']) ) { ?>
52
+                    if ( isset($row['excerpt']) ) { ?>
53 53
                     <p class="business-list__excerpt">
54 54
                         <?= trim_characters($row['excerpt'], 0, 200 ) ?>
55 55
                     </p>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,6 +84,6 @@
 block discarded – undo
84 84
       <?php } ?>
85 85
     </div>
86 86
 
87
-    <?php $search_title = "Search $title"; include '_search.php'; ?>
87
+    <?php $search_title = "search $title"; include '_search.php'; ?>
88 88
 
89 89
 </div>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,32 +6,32 @@  discard block
 block discarded – undo
6 6
                 <?= $parent_title ?>
7 7
             </h1>
8 8
             <p class="business-section__header__date">
9
-                <?= format_date( $info['date'], LONGERDATEFORMAT ) ?>
9
+                <?= format_date($info['date'], LONGERDATEFORMAT) ?>
10 10
             </p>
11 11
         </div>
12
-      <?php if ( isset($rows) ) { ?>
12
+      <?php if (isset($rows)) { ?>
13 13
         <div class="business-section__primary">
14 14
             <ul class="business-list">
15 15
               <?php
16 16
                 $prevlevel = '';
17
-                foreach ( $rows as $row ) { ?>
18
-                <?php if ( $row['htype'] == 10 ) {
19
-                    if ( $prevlevel == 'sub' ) { ?>
17
+                foreach ($rows as $row) { ?>
18
+                <?php if ($row['htype'] == 10) {
19
+                    if ($prevlevel == 'sub') { ?>
20 20
                     </ul>
21 21
                     </li>
22
-                    <?php } elseif ( $prevlevel == 'top' ) { ?>
22
+                    <?php } elseif ($prevlevel == 'top') { ?>
23 23
                     </li>
24 24
                     <?php } ?>
25 25
                     <li>
26 26
                 <?php } else {
27
-                    if ( $prevlevel == '' ) { ?>
27
+                    if ($prevlevel == '') { ?>
28 28
                     <li>
29
-                    <?php } elseif ( $prevlevel == 'top' ) { ?>
29
+                    <?php } elseif ($prevlevel == 'top') { ?>
30 30
                     <ul>
31 31
                     <li>
32 32
                     <?php } ?>
33 33
                 <?php } ?>
34
-                  <?php if ( isset($row['excerpt']) && strstr($row['excerpt'], "was asked&#8212;") ) { ?>
34
+                  <?php if (isset($row['excerpt']) && strstr($row['excerpt'], "was asked&#8212;")) { ?>
35 35
                     <div class="business-list__title">
36 36
                         <h3>
37 37
                             <?= $row['body'] ?>
@@ -42,26 +42,26 @@  discard block
 block discarded – undo
42 42
                         <h3>
43 43
                             <?= $row['body'] ?>
44 44
                         </h3>
45
-                      <?php if ( isset($row['contentcount']) && $row['contentcount'] > 0 ) { ?>
45
+                      <?php if (isset($row['contentcount']) && $row['contentcount'] > 0) { ?>
46 46
                         <span class="business-list__meta">
47 47
                             <?= $row['contentcount'] == 1 ? '1 speech' : $row['contentcount'] . ' speeches' ?>
48 48
                         </span>
49 49
                       <?php } ?>
50 50
                     </a>
51 51
                   <?php }
52
-                  if ( isset($row['excerpt']) ) { ?>
52
+                  if (isset($row['excerpt'])) { ?>
53 53
                     <p class="business-list__excerpt">
54
-                        <?= trim_characters($row['excerpt'], 0, 200 ) ?>
54
+                        <?= trim_characters($row['excerpt'], 0, 200) ?>
55 55
                     </p>
56 56
                   <?php } ?>
57
-                <?php if ( $row['htype'] == 10 ) {
57
+                <?php if ($row['htype'] == 10) {
58 58
                     $prevlevel = 'top';
59 59
                 } else {
60 60
                     $prevlevel = 'sub'; ?>
61 61
                 </li>
62 62
                 <?php } ?>
63 63
               <?php } ?>
64
-                <?php if ( $prevlevel == 'sub' ) { ?>
64
+                <?php if ($prevlevel == 'sub') { ?>
65 65
                 </ul>
66 66
                 </li>
67 67
                 <?php } ?>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             </div>
75 75
             <?php
76 76
                 include '_calendar_section.php';
77
-                include( dirname(__FILE__) . '/../sidebar/looking_for.php' );
77
+                include(dirname(__FILE__) . '/../sidebar/looking_for.php');
78 78
             ?>
79 79
         </div>
80 80
       <?php } else { ?>
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,14 +19,17 @@  discard block
 block discarded – undo
19 19
                     if ( $prevlevel == 'sub' ) { ?>
20 20
                     </ul>
21 21
                     </li>
22
-                    <?php } elseif ( $prevlevel == 'top' ) { ?>
22
+                    <?php }
23
+elseif ( $prevlevel == 'top' ) { ?>
23 24
                     </li>
24 25
                     <?php } ?>
25 26
                     <li>
26
-                <?php } else {
27
+                <?php }
28
+else {
27 29
                     if ( $prevlevel == '' ) { ?>
28 30
                     <li>
29
-                    <?php } elseif ( $prevlevel == 'top' ) { ?>
31
+                    <?php }
32
+elseif ( $prevlevel == 'top' ) { ?>
30 33
                     <ul>
31 34
                     <li>
32 35
                     <?php } ?>
@@ -37,7 +40,8 @@  discard block
 block discarded – undo
37 40
                             <?= $row['body'] ?>
38 41
                         </h3>
39 42
                     </div>
40
-                  <?php } else { ?>
43
+                  <?php }
44
+else { ?>
41 45
                     <a href="<?= $row['listurl'] ?>" class="business-list__title">
42 46
                         <h3>
43 47
                             <?= $row['body'] ?>
@@ -56,7 +60,8 @@  discard block
 block discarded – undo
56 60
                   <?php } ?>
57 61
                 <?php if ( $row['htype'] == 10 ) {
58 62
                     $prevlevel = 'top';
59
-                } else {
63
+                }
64
+                else {
60 65
                     $prevlevel = 'sub'; ?>
61 66
                 </li>
62 67
                 <?php } ?>
@@ -77,7 +82,8 @@  discard block
 block discarded – undo
77 82
                 include( dirname(__FILE__) . '/../sidebar/looking_for.php' );
78 83
             ?>
79 84
         </div>
80
-      <?php } else { ?>
85
+      <?php }
86
+else { ?>
81 87
         <div class="business-section__primary">
82 88
             No data to display.
83 89
         </div>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_section_content.php 4 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
         if ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') {
13 13
             $body = preg_replace('# (S\d[O0WF]-\d+)[, ]#', ' <a href="/spwrans/?spid=$1">$1</a> ', $body);
14 14
             $body = preg_replace_callback('#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', function($matches) {
15
-                   if ($matches[1] == 'spor') {
16
-                       $href_segment = 'sp/?g';
17
-                   } elseif ($matches[1] == 'spwa') {
15
+                    if ($matches[1] == 'spor') {
16
+                        $href_segment = 'sp/?g';
17
+                    } elseif ($matches[1] == 'spwa') {
18 18
                         $href_segment = 'spwrans/?';
19 19
                     } else {
20 20
                         $href_segment = 'debates/?';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
               <?php # XXX
158 158
                 if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) {
159 159
                     ?><p class="debate-speech__question_id"><small>
160
-                    <?= "Question $m[1]" ?>
160
+                    <?= "question $m[1]" ?>
161 161
                     </small></p>
162 162
               <?php } ?>
163 163
             </h2>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-  <?php foreach($data['rows'] as $speech) { ?>
1
+  <?php foreach ($data['rows'] as $speech) { ?>
2 2
 
3 3
     <?php
4 4
 
@@ -65,34 +65,34 @@  discard block
 block discarded – undo
65 65
             'url' => $speech['source_url']
66 66
         );
67 67
         $major = $data['info']['major'];
68
-        if ($major==1 || $major==2 || (($major==3 || $major==4) && isset($speech['speaker']['house'])) || $major==101 || $major==6) {
68
+        if ($major == 1 || $major == 2 || (($major == 3 || $major == 4) && isset($speech['speaker']['house'])) || $major == 101 || $major == 6) {
69 69
             $source['title'] = 'Citation: ';
70
-            if ($major==1 || $major==2) {
70
+            if ($major == 1 || $major == 2) {
71 71
                 $source['title'] .= 'HC';
72
-            } elseif ($major==3 || $major==4) {
73
-                if ($speech['speaker']['house']==1) {
72
+            } elseif ($major == 3 || $major == 4) {
73
+                if ($speech['speaker']['house'] == 1) {
74 74
                     $source['title'] .= 'HC';
75 75
                 } else {
76 76
                     $source['title'] .= 'HL';
77 77
                 }
78
-            } elseif ($major==6) {
78
+            } elseif ($major == 6) {
79 79
                 $source['title'] .= $data['section_title'];
80 80
             } else {
81 81
                 $source['title'] .= 'HL';
82 82
             }
83 83
             $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum'];
84
-            if ($major==2) {
84
+            if ($major == 2) {
85 85
                 $source['title'] .= 'WH';
86
-            } elseif ($major==3) {
86
+            } elseif ($major == 3) {
87 87
                 $source['title'] .= 'W';
88
-            } elseif ($major==4) {
88
+            } elseif ($major == 4) {
89 89
                 $source['title'] .= 'WS';
90 90
             }
91 91
         } else {
92 92
             $source['title'] = null;
93 93
         }
94 94
 
95
-        if ($hansardmajors[$data['info']['major']]['location']=='Scotland'){
95
+        if ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') {
96 96
             $source['text'] = 'Official Report source';
97 97
         } else {
98 98
             $source['text'] = 'Hansard source';
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
             <div class="debate-speech__speaker-and-content">
111 111
 
112
-          <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
112
+          <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
113 113
             <h2 class="debate-speech__speaker">
114 114
                 <?php
115 115
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
           <?php } ?>
167 167
             <div class="debate-speech__content"><?=$body ?></div>
168 168
 
169
-            <?php if ( $section ) {
169
+            <?php if ($section) {
170 170
                 if ($speech['voting_data']) { ?>
171 171
 
172 172
                 <div class="debate-speech__question-answered">
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
 
192 192
                 // Video
193 193
                 if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only
194
-                    if ($speech['video_status']&4) { ?>
194
+                    if ($speech['video_status'] & 4) { ?>
195 195
                         <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a>
196 196
                     <?php
197
-                    } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) {
197
+                    } elseif (!$speech['video'] && $speech['video_status'] & 1 && !($speech['video_status'] & 8)) {
198 198
                         $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?>
199 199
                         <a href="/video/?from=debate&amp;gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a>
200 200
                     <?php
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     $moreinfo[] = $row['totalcomments'] . " $plural";
299 299
                 }
300 300
                 if (count($moreinfo) > 0) {
301
-                    print "<small>(" . implode (', ', $moreinfo) . ") </small>";
301
+                    print "<small>(" . implode(', ', $moreinfo) . ") </small>";
302 302
                 }
303 303
             } else {
304 304
                 // Nothing in this item, so no link.
Please login to merge, or discard this patch.
Braces   +39 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,9 +14,11 @@  discard block
 block discarded – undo
14 14
             $body = preg_replace_callback('#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', function($matches) {
15 15
                    if ($matches[1] == 'spor') {
16 16
                        $href_segment = 'sp/?g';
17
-                   } elseif ($matches[1] == 'spwa') {
17
+                   }
18
+                   elseif ($matches[1] == 'spwa') {
18 19
                         $href_segment = 'spwrans/?';
19
-                    } else {
20
+                    }
21
+                    else {
20 22
                         $href_segment = 'debates/?';
21 23
                     }
22 24
                     return '[<a href="' . $href_segment . 'id=' . $matches[2] . '\">' . $matches[3] . '</a>]';
@@ -69,32 +71,40 @@  discard block
 block discarded – undo
69 71
             $source['title'] = 'Citation: ';
70 72
             if ($major==1 || $major==2) {
71 73
                 $source['title'] .= 'HC';
72
-            } elseif ($major==3 || $major==4) {
74
+            }
75
+            elseif ($major==3 || $major==4) {
73 76
                 if ($speech['speaker']['house']==1) {
74 77
                     $source['title'] .= 'HC';
75
-                } else {
78
+                }
79
+                else {
76 80
                     $source['title'] .= 'HL';
77 81
                 }
78
-            } elseif ($major==6) {
82
+            }
83
+            elseif ($major==6) {
79 84
                 $source['title'] .= $data['section_title'];
80
-            } else {
85
+            }
86
+            else {
81 87
                 $source['title'] .= 'HL';
82 88
             }
83 89
             $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum'];
84 90
             if ($major==2) {
85 91
                 $source['title'] .= 'WH';
86
-            } elseif ($major==3) {
92
+            }
93
+            elseif ($major==3) {
87 94
                 $source['title'] .= 'W';
88
-            } elseif ($major==4) {
95
+            }
96
+            elseif ($major==4) {
89 97
                 $source['title'] .= 'WS';
90 98
             }
91
-        } else {
99
+        }
100
+        else {
92 101
             $source['title'] = null;
93 102
         }
94 103
 
95
-        if ($hansardmajors[$data['info']['major']]['location']=='Scotland'){
104
+        if ($hansardmajors[$data['info']['major']]['location']=='Scotland') {
96 105
             $source['text'] = 'Official Report source';
97
-        } else {
106
+        }
107
+        else {
98 108
             $source['text'] = 'Hansard source';
99 109
         }
100 110
     }
@@ -128,7 +138,8 @@  discard block
 block discarded – undo
128 138
                         $desc[] = $off['pretty'];
129 139
                     }
130 140
                     $speaker_position = join(', ', $desc);
131
-                } else {
141
+                }
142
+                else {
132 143
                     $speaker_position = _htmlentities($speaker['party']);
133 144
                     if ($speaker['house'] == 1 &&
134 145
                         $speaker['party'] != 'Speaker' &&
@@ -190,11 +201,13 @@  discard block
 block discarded – undo
190 201
                 } # End of voting HTML
191 202
 
192 203
                 // Video
193
-                if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only
204
+                if ($data['info']['major'] == 1 && !$individual_item) {
205
+# Commons debates only
194 206
                     if ($speech['video_status']&4) { ?>
195 207
                         <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a>
196 208
                     <?php
197
-                    } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) {
209
+                    }
210
+                    elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) {
198 211
                         $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?>
199 212
                         <a href="/video/?from=debate&amp;gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a>
200 213
                     <?php
@@ -231,9 +244,11 @@  discard block
 block discarded – undo
231 244
                 <?php if ($section && $hansardmajors[$speech['major']]['type'] == 'debate' && $individual_item) {
232 245
                     if ($speech['htype'] == '12') {
233 246
                         $thing = 'speech';
234
-                    } elseif ($speech['htype'] == '13') {
247
+                    }
248
+                    elseif ($speech['htype'] == '13') {
235 249
                         $thing = 'item';
236
-                    } else {
250
+                    }
251
+                    else {
237 252
                         $thing = 'item';
238 253
                     }
239 254
                 ?>
@@ -242,7 +257,8 @@  discard block
 block discarded – undo
242 257
                 </li>
243 258
                 <?php
244 259
                 }
245
-                if (!$section || !$individual_item) { # XXX ?>
260
+                if (!$section || !$individual_item) {
261
+# XXX ?>
246 262
                 <li class="link-to-speech">
247 263
                     <span class="link-to-speech__label">Link to this speech</span>
248 264
                     <a href="<?= $speech['listurl'] ?>" class="link debate-speech__meta__link">In context</a>
@@ -296,9 +312,11 @@  discard block
 block discarded – undo
296 312
             print '<li class="subrows__list-item">';
297 313
             if (isset($row['contentcount']) && $row['contentcount'] > 0) {
298 314
                 $has_content = true;
299
-            } elseif ($row['htype'] == '11' && $hansardmajors[$row['major']]['type'] == 'other') {
315
+            }
316
+            elseif ($row['htype'] == '11' && $hansardmajors[$row['major']]['type'] == 'other') {
300 317
                 $has_content = true;
301
-            } else {
318
+            }
319
+            else {
302 320
                 $has_content = false;
303 321
             }
304 322
             if ($has_content) {
@@ -318,7 +336,8 @@  discard block
 block discarded – undo
318 336
                 if (count($moreinfo) > 0) {
319 337
                     print "<small>(" . implode (', ', $moreinfo) . ") </small>";
320 338
                 }
321
-            } else {
339
+            }
340
+            else {
322 341
                 // Nothing in this item, so no link.
323 342
                 print $row['body'];
324 343
             }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_search.php 2 patches
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.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,14 +13,16 @@
 block discarded – undo
13 13
                 <?php if ( isset($search_sections) ) { ?>
14 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 }
17
+else if ( count($search_sections) > 1 ) { ?>
17 18
                     <div class="search-section__filters">
18 19
                         <?php foreach ( $search_sections as $section ) { ?>
19 20
                             <label><input name="section[]" value="<?= $section['section'] ?>" type="checkbox" checked="checked"><?= $section['title'] ?></label>
20 21
                     <?php } ?>
21 22
                     </div>
22 23
                     <?php }
23
-                } else if ( isset($section) ) { ?>
24
+                }
25
+                else if ( isset($section) ) { ?>
24 26
                 <input name="section" value="<?= $section ?>" type="hidden">
25 27
                 <?php } ?>
26 28
             </form>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/sidebar/looking_for.php 2 patches
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.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 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 }
21
+else if ( $mini_survey['answered'] ) { ?>
21 22
             <p>Thanks for answering</p>
22 23
         <?php } ?>
23 24
     <?php } ?>
Please login to merge, or discard this patch.