Passed
Push — master ( 2073b4...fffc45 )
by Struan
06:46
created
www/docs/images/mps/photo-status.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     WHERE house=1 AND left_house = (SELECT MAX(left_house) FROM member) ';
12 12
 $q = $db->query($query . "ORDER BY person_id");
13 13
 $out = array('both'=>'', 'small'=>'', 'none'=>array());
14
-for ($i=0; $i<$q->rows(); $i++) {
14
+for ($i = 0; $i < $q->rows(); $i++) {
15 15
     $p_id = $q->field($i, 'person_id');
16 16
     list($dummy, $sz) = MySociety\TheyWorkForYou\Utility\Member::findMemberImage($p_id);
17 17
     if ($sz == 'L') {
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         array_push($out['none'], '<li>' . $q->field($i, 'person_id') . ' (' . $q->field($i, 'party') . ')' . ', ' . $q->field($i, 'constituency'));
23 23
     }
24 24
 }
25
-print '<h3>Missing completely ('.count($out['none']).')</h3> <ul>';
25
+print '<h3>Missing completely (' . count($out['none']) . ')</h3> <ul>';
26 26
 print join($out['none'], "\n");
27 27
 print '</ul>';
28 28
 print '<h3>Large and small</h3> <p>';
Please login to merge, or discard this patch.
www/includes/easyparliament/glossarylist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 class GLOSSARYLIST {
4 4
 
5
-    public function render($data, $format='html', $template='glossary') {
5
+    public function render($data, $format = 'html', $template = 'glossary') {
6 6
         // Once we have the data that's to be rendered,
7 7
         // include the template.
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
             $format = 'html';
11 11
         }
12 12
 
13
-        include (INCLUDESPATH."easyparliament/templates/$format/$template.php");
13
+        include (INCLUDESPATH . "easyparliament/templates/$format/$template.php");
14 14
 
15 15
     }
16 16
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/search/form_main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
             <input type="text" name="q" value="<?= _htmlentities($search_keyword) ?>" class="form-control">
5 5
             <input type="submit" class="button" value="Search">
6 6
         </p>
7
-      <?php if (isset($warnings) ) { ?>
7
+      <?php if (isset($warnings)) { ?>
8 8
         <p class="error">
9 9
             <?= $warnings ?>
10 10
         </p>
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         <p>
19 19
             <ul class="search-result-display-options">
20 20
                 <li><a href="#options" class="search-options-toggle js-toggle-search-options">Advanced search</a></li>
21
-              <?php if ( $is_adv ) { ?>
21
+              <?php if ($is_adv) { ?>
22 22
                 <?= $search_phrase ? '<li>Exactly: ' . _htmlentities($search_phrase) . '</li>' : '' ?>
23 23
                 <?= $search_exclude ? '<li>Excluding: ' . _htmlentities($search_exclude) . '</li>' : '' ?>
24 24
                 <?= $search_from ? '<li>From: ' . _htmlentities($search_from) . '</li>' : '' ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/search/sidebar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
             <div class="search-page__section__secondary search-page-sidebar">
2
-                <?php if ( isset( $search_sidebar['email'] ) ) { ?>
2
+                <?php if (isset($search_sidebar['email'])) { ?>
3 3
                 <h2>Create an alert</h2>
4 4
                 <p class="sidebar-item-with-icon">
5 5
                     <a href="<?= $search_sidebar['email'] ?>">Subscribe to an email alert</a>
6 6
                     for <em class="current-search-term"><?= $search_sidebar['email_desc'] ?></em>
7
-                    <?php if (isset( $search_sidebar['email_section'] ) ) { ?>
7
+                    <?php if (isset($search_sidebar['email_section'])) { ?>
8 8
                     <br><small>(or just <a href="<?= $search_sidebar['email_section'] ?>"><?= $search_sidebar['email_desc_section'] ?></a>)</small>
9 9
                     <?php } ?>
10 10
                 </p>
@@ -16,5 +16,5 @@  discard block
 block discarded – undo
16 16
                 <?php } ?>
17 17
 
18 18
 
19
-                <?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ) ?>
19
+                <?php include(dirname(__FILE__) . '/../sidebar/looking_for.php') ?>
20 20
             </div>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/index.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             <div class="panel panel--flushtop clearfix">
46 46
                 <div class="row nested-row">
47 47
                     <div class="homepage-in-the-news homepage-content-section">
48
-                        <?php if ( count($featured) > 0 ) {
48
+                        <?php if (count($featured) > 0) {
49 49
                             include 'homepage/featured.php';
50 50
                         } else { ?>
51 51
                             No debates found.
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
                     <div class="homepage-recently homepage-content-section">
109 109
                         <h2>Recently in Parliament</h2>
110 110
                         <ul class="recently__list"><?php
111
-                            foreach ( $debates['recent'] as $recent ) {
111
+                            foreach ($debates['recent'] as $recent) {
112 112
                                 include 'homepage/recent-debates.php';
113 113
                             }
114 114
                         ?></ul>
115 115
                     </div>
116 116
                     <div class="homepage-upcoming homepage-content-section">
117 117
                         <h2>Upcoming</h2>
118
-                        <?php if ( count($calendar) ) { ?>
118
+                        <?php if (count($calendar)) { ?>
119 119
                         <div class="upcoming__controls">
120 120
                             <!--
121 121
                                 These controls should make the upcoming section slide to the next day.
@@ -134,24 +134,24 @@  discard block
 block discarded – undo
134 134
                             </div>
135 135
                         </div>
136 136
                         <?php $first = true; $count = 0;
137
-                            foreach ( $calendar as $date => $places ) {
137
+                            foreach ($calendar as $date => $places) {
138 138
                                 $count++; ?>
139 139
                                 <div class="cal-wrapper <?= $first ? 'visible' : 'hidden' ?>" id="day-<?= $count ?>" data-count="<?= $count ?>" data-date="<?= format_date($date, SHORTDATEFORMAT); ?>">
140 140
                                 <?php foreach ($places as $place => $events) { ?>
141 141
                                     <?php $first = false; ?>
142 142
                                     <h3><?= $place ?></h3>
143 143
                                     <ul class="upcoming__list">
144
-                                        <?php for ( $i = 0; $i < 3; $i++ ) {
145
-                                            if ( isset( $events[$i] ) ) { ?>
144
+                                        <?php for ($i = 0; $i < 3; $i++) {
145
+                                            if (isset($events[$i])) { ?>
146 146
                                         <li>
147 147
                                             <h4 class="upcoming__title"><a href="<?= $events[$i]['link_external'] ?>"><?= $events[$i]['title'] ?></a></h4>
148 148
                                             <p class="meta"><?php
149 149
                                                 $meta_items = array();
150 150
                                                 $meta_items[] = $events[$i]['debate_type'];
151
-                                                if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){
151
+                                                if (isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00') {
152 152
                                                     $times = format_time($events[$i]['time_start'], 'g:i a');
153 153
 
154
-                                                    if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){
154
+                                                    if (isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00') {
155 155
                                                         $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a');
156 156
                                                     }
157 157
                                                     $meta_items[] = $times;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                                         <?php } ?>
164 164
                                         <?php } ?>
165 165
                                     </ul>
166
-                                    <?php if ( count($events) - 3 > 0 ) { ?>
166
+                                    <?php if (count($events) - 3 > 0) { ?>
167 167
                                     <a href="/calendar/?d=<?= format_date($date, 'Y-m-d') ?>" class="upcoming__more">And <?= count($events) - 3 ?> more</a><!-- (just links to relevant upcoming page) -->
168 168
                                     <?php } ?>
169 169
                             <?php } ?>
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                         <?php } ?>
172 172
                         <?php } else {
173 173
                             list($recess, $from, $to) = recess_prettify(date('j'), date('n'), date('Y'), 1);
174
-                            if ( $recess ) { ?>
174
+                            if ($recess) { ?>
175 175
                                 <p>
176 176
                                 Parliament is on holiday until <?= format_date($to, LONGERDATEFORMAT) ?>.
177 177
                                 Follow us on <a href="https://twitter.com/theyworkforyou">Twitter</a> and you'll
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,10 +148,10 @@
 block discarded – undo
148 148
                                             <p class="meta"><?php
149 149
                                                 $meta_items = array();
150 150
                                                 $meta_items[] = $events[$i]['debate_type'];
151
-                                                if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){
151
+                                                if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ) {
152 152
                                                     $times = format_time($events[$i]['time_start'], 'g:i a');
153 153
 
154
-                                                    if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){
154
+                                                    if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ) {
155 155
                                                         $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a');
156 156
                                                     }
157 157
                                                     $meta_items[] = $times;
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/hansard_glossary_search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     ?>
43 43
                 <dl id="searchresults">
44 44
 <?php
45
-    for ($i=0; $i<count($data['rows']); $i++) {
45
+    for ($i = 0; $i < count($data['rows']); $i++) {
46 46
 
47 47
         $row = $data['rows'][$i];
48 48
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/homepage/recent-debates.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1
-                            <?php if ( isset( $recent['child'] ) ) { ?>
1
+                            <?php if (isset($recent['child'])) { ?>
2 2
                             <li class="parliamentary-excerpt">
3 3
                             <h3 class="excerpt__title"><a href="<?= $recent['list_url'] ?>"><?= $recent['parent']['body'] ? $recent['parent']['body'] . ' : ' : '' ?><?= $recent['body'] ?></a></h3>
4 4
                                 <p class="meta"><?=format_date($recent['hdate'], LONGERDATEFORMAT); ?></p>
5 5
                                 <p class="meta excerpt__category"><a href="<?= $recent['more_url'] ?>"><?= $recent['desc'] ?></a></p>
6 6
                                 <p class="excerpt__statement">
7
-                                <?php if ( isset($recent['child']['speaker']) && count($recent['child']['speaker']) ) { ?>
7
+                                <?php if (isset($recent['child']['speaker']) && count($recent['child']['speaker'])) { ?>
8 8
                                 <a href="<?= $recent['child']['speaker']['url'] ?>"><?= $recent['child']['speaker']['name'] ?></a>
9 9
                                 <?php } ?>
10 10
                                 <?= trim_characters($recent['child']['body'], 0, 200) ?>
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
                             <?php } else { ?>
14 14
                             <li class="parliamentary-excerpt">
15 15
                             <h3 class="excerpt__title"><?= $recent['desc'] ?></h3>
16
-                                <?php foreach ( $recent['data'] as $date => $details ) { ?>
16
+                                <?php foreach ($recent['data'] as $date => $details) { ?>
17 17
                                 <p class="meta"><?= $date ?></p>
18 18
                                 <p class="meta excerpt__category"><a href="<?= $recent['more_url'] ?>"><?= $recent['desc'] ?></a></p>
19
-                                <?php foreach ( $details as $bill ) { ?>
19
+                                <?php foreach ($details as $bill) { ?>
20 20
                                 <p class="excerpt__statement">
21 21
                                     <a href="<?= $bill['url'] ?>"><?= $bill['bill'] ?>, <?= $bill['sitting'] ?></a>
22 22
                                 </p>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/comments.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 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']
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $date = format_date($date, SHORTDATEFORMAT);
120 120
         $time = format_time($time, TIMEFORMAT);
121 121
         ?>
122
-                    <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) .' '. _htmlentities($comment['lastname']); ?></strong></a><br>
122
+                    <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) . ' ' . _htmlentities($comment['lastname']); ?></strong></a><br>
123 123
                     <small>Posted on <?php echo $date;
124 124
 
125 125
         if (isset($comment['url'])) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         } else {
129 129
             // There won't be a URL when we're just previewing a comment.
130
-            print ' '.$time;
130
+            print ' ' . $time;
131 131
         }
132 132
         ?> <?php echo $reporthtml; ?></small></p>
133 133
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             $body = prepare_comment_for_display($comment['body']); // In utility.php
140 140
             echo "<p class=\"comment\">$body</p>\n";
141 141
         } else {
142
-            print '<p class="comment"><em>This annotation has been removed</em></p>'."\n";
142
+            print '<p class="comment"><em>This annotation has been removed</em></p>' . "\n";
143 143
         }
144 144
 
145 145
         ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_business_section.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
         </div>
7 7
 
8 8
         <?php
9
-            if ( isset($content['data']['data']) ) {
9
+            if (isset($content['data']['data'])) {
10 10
                 $data = $content['data']['data'];
11 11
                 include '_business_list.php'; ?>
12 12
                 <div class="business-section__secondary">
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
                 <?php
18 18
                 $calendar = $content['calendar']['years'];
19 19
                 include '_calendar_section.php';
20
-                if ( !isset($no_survey) ) {
21
-                    include( dirname(__FILE__) . '/../sidebar/looking_for.php' );
20
+                if (!isset($no_survey)) {
21
+                    include(dirname(__FILE__) . '/../sidebar/looking_for.php');
22 22
                 }
23 23
                 ?>
24
-                <?php if ( isset($content['rssurl']) ) { ?>
24
+                <?php if (isset($content['rssurl'])) { ?>
25 25
                 <p class="rss-feed">
26 26
                     <a href="<?= WEBPATH . $content['rssurl'] ?>">RSS feed of <?= $title ?></a>
27 27
                 </p>
Please login to merge, or discard this patch.