Completed
Pull Request — master (#1322)
by Nick
07:54 queued 02:46
created
www/includes/easyparliament/templates/html/mp/error.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
             <p><?= $error ?></p>
8 8
 
9
-        <?php if ( $rep_search_url ) { ?>
9
+        <?php if ($rep_search_url) { ?>
10 10
         </div>
11 11
 
12 12
         <div class="full-page__unit">
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/votes.php 4 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                               <?php foreach ($segment['votes']->positions as $key_vote) {
61 61
 
62 62
                                 if (isset($policy_last_update[$key_vote['policy_id']]) && $policy_last_update[$key_vote['policy_id']] > $most_recent) {
63
-                                  $most_recent = $policy_last_update[$key_vote['policy_id']];
63
+                                    $most_recent = $policy_last_update[$key_vote['policy_id']];
64 64
                                 }
65 65
 
66 66
                                 if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
                                 include '_vote_description.php';
83 83
 
84
-                              } ?>
84
+                                } ?>
85 85
                             </ul>
86 86
 
87 87
                             <div class="share-vote-descriptions">
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-include_once INCLUDESPATH . "easyparliament/templates/html/mp/header.php";
2
+include_once INCLUDESPATH."easyparliament/templates/html/mp/header.php";
3 3
 ?>
4 4
 
5 5
 <div class="full-page">
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                                   $most_recent = $policy_last_update[$key_vote['policy_id']];
64 64
                                 }
65 65
 
66
-                                if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) {
66
+                                if ($key_vote['has_strong'] || $key_vote['position'] == 'has never voted on') {
67 67
                                     $description = ucfirst($key_vote['desc']);
68 68
                                 } else {
69 69
                                     $description = sprintf(
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                             <div class="share-vote-descriptions">
88 88
                                 <p>Share a screenshot of these votes:</p>
89 89
 
90
-                                <a href="#" class="fb-share-button-tracked" data-title="<?= $single_policy_page ? '' : $segment['title'] . ' ' ?><?= $page_title ?>" data-href="<?= $abs_member_url ?>/votes?policy=<?= $segment['key'] ?>" data-image="<?= $abs_member_url ?>/policy_set_png?policy_set=<?= $segment['key'] ?>" "See how <?= $full_name ?> voted on <?= $segment["title"] ?>">Share</a>
90
+                                <a href="#" class="fb-share-button-tracked" data-title="<?= $single_policy_page ? '' : $segment['title'].' ' ?><?= $page_title ?>" data-href="<?= $abs_member_url ?>/votes?policy=<?= $segment['key'] ?>" data-image="<?= $abs_member_url ?>/policy_set_png?policy_set=<?= $segment['key'] ?>" "See how <?= $full_name ?> voted on <?= $segment["title"] ?>">Share</a>
91 91
 
92 92
                                 <a class="twitter-share-button" href="https://twitter.com/share" data-size="small" data-url="<?= $abs_member_url ?>/votes?policy=<?= $segment['key'] ?>">Tweet</a>
93 93
                                 </div>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,13 +110,16 @@
 block discarded – undo
110 110
 
111 111
                         <?php endif; ?>
112 112
 
113
-                    <?php else: ?>
113
+                    <?php else {
114
+    : ?>
114 115
 
115 116
                         <div class="panel">
116 117
                             <p>This person has not voted on any of the key issues which we keep track of.</p>
117 118
                         </div>
118 119
 
119
-                    <?php endif; ?>
120
+                    <?php endif;
121
+}
122
+?>
120 123
 
121 124
                 <?php endif; ?>
122 125
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
                 <?php if ($has_voting_record): ?>
44 44
 
45
-                    <?php $displayed_votes = FALSE; ?>
45
+                    <?php $displayed_votes = false; ?>
46 46
 
47 47
                     <?php foreach ($key_votes_segments as $segment): ?>
48 48
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                                 <small>Last updated: <?= format_date($most_recent, LONGDATEFORMAT) ?></small>
95 95
                             </div>
96 96
 
97
-                            <?php $displayed_votes = TRUE; ?>
97
+                            <?php $displayed_votes = true; ?>
98 98
 
99 99
                         <?php endif; ?>
100 100
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/recent.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
                 if ( isset($divisions) && $divisions ) {
39 39
                     if ($has_voting_record) {
40 40
                         foreach ($divisions as $division) {
41
-                          $displayed_votes = TRUE;
41
+                            $displayed_votes = TRUE;
42 42
 
43
-                          if ($current_date != $division['date']) {
43
+                            if ($current_date != $division['date']) {
44 44
                             if ($current_date != '' ) {
45
-                              print('</ul></div>');
45
+                                print('</ul></div>');
46 46
                             }
47 47
                             $current_date = $division['date'];
48 48
                             $sidebar_links[] = $division['date'];
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                             <h2><?= strftime('%e %b %Y', strtotime($division['date'])) ?></h2>
52 52
                              <ul class="vote-descriptions policy-votes">
53 53
                           <?php }
54
-                          include('_division_description.php');
54
+                            include('_division_description.php');
55 55
                         }
56 56
                         echo('</div>');
57 57
                     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-include_once INCLUDESPATH . "easyparliament/templates/html/mp/header.php";
2
+include_once INCLUDESPATH."easyparliament/templates/html/mp/header.php";
3 3
 ?>
4 4
 
5 5
 <div class="full-page">
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
                 $current_date = '';
36 36
                 $sidebar_links = array();
37 37
 
38
-                if ( isset($divisions) && $divisions ) {
38
+                if (isset($divisions) && $divisions) {
39 39
                     if ($has_voting_record) {
40 40
                         foreach ($divisions as $division) {
41 41
                           $displayed_votes = TRUE;
42 42
 
43 43
                           if ($current_date != $division['date']) {
44
-                            if ($current_date != '' ) {
44
+                            if ($current_date != '') {
45 45
                               print('</ul></div>');
46 46
                             }
47 47
                             $current_date = $division['date'];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
             <div class="sidebar__unit in-page-nav">
69 69
                 <ul data-magellan-expedition="fixed">
70
-                  <?php foreach($sidebar_links as $date) { ?>
70
+                  <?php foreach ($sidebar_links as $date) { ?>
71 71
                     <li data-magellan-arrival="<?= strftime('%Y-%m-%d', strtotime($date)) ?>">
72 72
                         <a href="#<?= strftime('%Y-%m-%d', strtotime($date)) ?>">
73 73
                             <?= strftime('%e %b %Y', strtotime($date)) ?>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 
31 31
                 <?php
32 32
 
33
-                $displayed_votes = FALSE;
34
-                $show_all = TRUE;
33
+                $displayed_votes = false;
34
+                $show_all = true;
35 35
                 $current_date = '';
36 36
                 $sidebar_links = array();
37 37
 
38 38
                 if ( isset($divisions) && $divisions ) {
39 39
                     if ($has_voting_record) {
40 40
                         foreach ($divisions as $division) {
41
-                          $displayed_votes = TRUE;
41
+                          $displayed_votes = true;
42 42
 
43 43
                           if ($current_date != $division['date']) {
44 44
                             if ($current_date != '' ) {
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/divisions.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-include_once INCLUDESPATH . "easyparliament/templates/html/mp/header.php";
2
+include_once INCLUDESPATH."easyparliament/templates/html/mp/header.php";
3 3
 ?>
4 4
 
5 5
 <div class="full-page">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         </div>
16 16
         <div class="person-panels">
17 17
             <div class="sidebar__unit in-page-nav">
18
-                <?php if ( isset($policydivisions) && $policydivisions && count($policydivisions) == 1 ) { ?>
18
+                <?php if (isset($policydivisions) && $policydivisions && count($policydivisions) == 1) { ?>
19 19
                 <p class="policy-votes-intro">
20 20
                     How <?= $full_name ?> voted on <?= $policydivisions[array_keys($policydivisions)[0]]['desc'] ?>.
21 21
                 </p>
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
                 <?php endif; ?>
35 35
 
36 36
                 <?php $displayed_votes = FALSE; ?>
37
-                <?php if ( isset($policydivisions) && $policydivisions ) { ?>
37
+                <?php if (isset($policydivisions) && $policydivisions) { ?>
38 38
 
39 39
                     <?php if ($has_voting_record) { ?>
40 40
 
41 41
                         <?php foreach ($policydivisions as $policy) { ?>
42 42
 
43
-                            <?php if ( isset($policy['header']) ) { ?>
43
+                            <?php if (isset($policy['header'])) { ?>
44 44
                                 <div class="panel policy-votes-hero" style="background-image: url('<?php echo $policy['header']['image']; ?>');">
45 45
                                     <h2><?php echo $policy['header']['title']; ?></h2>
46 46
                                     <p><?php echo $policy['header']['description']; ?>.</p>
47
-                                    <?php if ( $policy['header']['image_source'] ) { ?>
47
+                                    <?php if ($policy['header']['image_source']) { ?>
48 48
                                     <span class="policy-votes-hero__image-attribution">
49 49
                                         Photo:
50 50
                                         <a href="<?php echo $policy['header']['image_source']; ?>">
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
                             <?php } ?>
60 60
 
61 61
 
62
-                            <?php if ( isset($policy['position']) ) { ?>
62
+                            <?php if (isset($policy['position'])) { ?>
63 63
                                 <div class="panel">
64
-                                    <?php if ( $policy['position']['has_strong'] ) { ?>
64
+                                    <?php if ($policy['position']['has_strong']) { ?>
65 65
                                         <h3 class="policy-vote-overall-stance">
66
-                                            <?= $full_name . ' ' . $policy['position']['desc'] ?>
66
+                                            <?= $full_name.' '.$policy['position']['desc'] ?>
67 67
                                         </h3>
68 68
 
69
-                                        <?php $pw_url = 'http://www.publicwhip.org.uk/mp.php?mpid=' . $member_id . '&amp;dmp=' . $policy['policy_id']; ?>
69
+                                        <?php $pw_url = 'http://www.publicwhip.org.uk/mp.php?mpid='.$member_id.'&amp;dmp='.$policy['policy_id']; ?>
70 70
                                         <p>
71 71
                                             TheyWorkForYou has automatically calculated this MP&rsquo;s stance based on all
72 72
                                             of their votes on the topic. <a href="<?= $pw_url ?>">You can browse the source
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                                     <ul class="vote-descriptions policy-votes">
88 88
                                     <?php
89 89
                                         $show_all = FALSE;
90
-                                        if ( $policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions']) ) {
90
+                                        if ($policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions'])) {
91 91
                                             $show_all = TRUE;
92 92
                                         }
93 93
                                     ?>
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 
100 100
                                     <div class="policy-votes-list-footer">
101 101
                                     <p class="policy-votes__byline">Vote information from <a href="http://www.publicwhip.org.uk/mp.php?mpid=<?= $member_id ?>&dmp=<?= $policy['policy_id'] ?>">PublicWhip</a>. Last updated: <?= $policy_last_update[$policy['policy_id']] ?></p>
102
-                                        <?php if ( !$show_all && $policy['weak_count'] > 0 ) { ?>
102
+                                        <?php if (!$show_all && $policy['weak_count'] > 0) { ?>
103 103
                                         <p><button class="button secondary-button small js-show-all-votes">Show all votes, including <?= $policy['weak_count'] ?> less important <?= $policy['weak_count'] == 1 ? 'vote' : 'votes' ?></button></p>
104 104
                                         <?php } ?>
105 105
                                     </div>
106 106
 
107 107
                                     <script type="text/javascript">
108 108
                                     $(function(){
109
-                                        <?php if ( !$show_all ) { ?>
109
+                                        <?php if (!$show_all) { ?>
110 110
                                         $('#policy-votes-type').text('Key');
111 111
                                         <?php } ?>
112 112
                                         $('.js-show-all-votes').on('click', function(){
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 </div>
34 34
                 <?php endif; ?>
35 35
 
36
-                <?php $displayed_votes = FALSE; ?>
36
+                <?php $displayed_votes = false; ?>
37 37
                 <?php if ( isset($policydivisions) && $policydivisions ) { ?>
38 38
 
39 39
                     <?php if ($has_voting_record) { ?>
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 
87 87
                                     <ul class="vote-descriptions policy-votes">
88 88
                                     <?php
89
-                                        $show_all = FALSE;
89
+                                        $show_all = false;
90 90
                                         if ( $policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions']) ) {
91
-                                            $show_all = TRUE;
91
+                                            $show_all = true;
92 92
                                         }
93 93
                                     ?>
94 94
                                     <?php foreach ($policy['divisions'] as $division) {
95 95
                                         include('_division_description.php');
96
-                                        $displayed_votes = TRUE;
96
+                                        $displayed_votes = true;
97 97
                                     } ?>
98 98
                                     </ul>
99 99
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/profile.php 4 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
                             include '_vote_description.php';
81 81
 
82
-                          } ?>
82
+                            } ?>
83 83
                         </ul>
84 84
 
85 85
                         <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>&rsquo;s voting record  on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>&rsquo;s full vote analysis page</a> for more.</p>
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
                             include '_vote_description.php';
121 121
 
122
-                          } ?>
122
+                            } ?>
123 123
                         </ul>
124 124
 
125 125
                         <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>&rsquo;s voting record  on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>&rsquo;s full vote analysis page</a> for more.</p>
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
                             include '_vote_description.php';
150 150
 
151
-                          } ?>
151
+                            } ?>
152 152
                         </ul>
153 153
 
154 154
                         <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>&rsquo;s voting record  on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>&rsquo;s full vote analysis page</a> for more.</p>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-include_once INCLUDESPATH . "easyparliament/templates/html/mp/header.php";
2
+include_once INCLUDESPATH."easyparliament/templates/html/mp/header.php";
3 3
 
4 4
 // if this is set to a year for which we have WTT responsiveness stats then
5 5
 // it'll display a banner with the MPs stats, assuming we have them for the
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 </div>
59 59
               <?php endif; ?>
60 60
 
61
-                <?php if ( !$current_member[HOUSE_TYPE_COMMONS] ) { ?>
61
+                <?php if (!$current_member[HOUSE_TYPE_COMMONS]) { ?>
62 62
                     <?php if (count($policyPositions->positions) > 0) { ?>
63 63
                     <div class="panel">
64 64
                         <a name="votes"></a>
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                                 $party,
115 115
                                 $party_positions[$policy_id]['position']
116 116
                             );
117
-                            $link = $member_url . '/divisions?policy=' . $policy_id;
117
+                            $link = $member_url.'/divisions?policy='.$policy_id;
118 118
                             $show_link = true;
119 119
 
120 120
                             include '_vote_description.php';
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
                         <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>&rsquo;s voting record  on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>&rsquo;s full vote analysis page</a> for more.</p>
126 126
 
127
-                    <?php elseif (count($policyPositions->positions) > 0 ): ?>
127
+                    <?php elseif (count($policyPositions->positions) > 0): ?>
128 128
                         <?php if (count($party_positions) && $party_member_count > 1) { ?>
129 129
                         <p>
130 130
                         <?= $full_name ?> is a <?= $party ?> MP, and on the <b>vast majority</b> of issues votes the <b>same way</b> as other <?= $party ?> MPs.
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                         </ul>
153 153
 
154 154
                         <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>&rsquo;s voting record  on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>&rsquo;s full vote analysis page</a> for more.</p>
155
-                    <?php elseif (count($policyPositions->positions) == 0 ): ?>
155
+                    <?php elseif (count($policyPositions->positions) == 0): ?>
156 156
 
157 157
                         <p>No votes to display.</p>
158 158
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,11 +190,14 @@
 block discarded – undo
190 190
                         <?= $recent_appearances['additional_links'] ?>
191 191
                         <?php endif; ?>
192 192
 
193
-                    <?php else: ?>
193
+                    <?php else {
194
+    : ?>
194 195
 
195 196
                         <p>No recent appearances to display.</p>
196 197
 
197
-                    <?php endif; ?>
198
+                    <?php endif;
199
+}
200
+?>
198 201
 
199 202
                 </div>
200 203
                 <?php endif; ?>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
                         <ul class="vote-descriptions">
106 106
                           <?php foreach ($sorted_diffs as $policy_id => $score) {
107 107
 
108
-                            $key_vote = NULL;
108
+                            $key_vote = null;
109 109
                             $description = sprintf(
110 110
                                 '%s <b>%s</b> %s, while most %s MPs <b>%s</b>.',
111 111
                                 $full_name,
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/header.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
     <div class="regional-header regional-header--<?= $current_assembly ?>">
2 2
         <div class="regional-header__overlay"></div>
3
-        <div class="person-header <?= $this_page ?> <?= (isset($data['photo_attribution_text'])?'has-data-attribution':'') ?>">
3
+        <div class="person-header <?= $this_page ?> <?= (isset($data['photo_attribution_text']) ? 'has-data-attribution' : '') ?>">
4 4
             <div class="full-page__row">
5 5
                 <div class="full-page__unit">
6 6
                     <div class="person-header__content">
7 7
                         <div class="person-name">
8
-                          <?php if ( $image ) { ?>
8
+                          <?php if ($image) { ?>
9 9
                             <div class="mp-image">
10 10
                                 <img src="<?= $image['url'] ?>" height="48">
11 11
                             </div>
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
                               <?php } ?>
18 18
                             </div>
19 19
                         </div>
20
-                        <?php if($image && $image['exists']): ?>
21
-                            <?php if(isset($data['photo_attribution_text'])) { ?>
20
+                        <?php if ($image && $image['exists']): ?>
21
+                            <?php if (isset($data['photo_attribution_text'])) { ?>
22 22
                                 <div class="person-data-attribution">
23
-                                  <?php if(isset($data['photo_attribution_link'])) { ?>
23
+                                  <?php if (isset($data['photo_attribution_link'])) { ?>
24 24
                                     Profile photo: <a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a>
25 25
                                   <?php } else { ?>
26 26
                                     Profile photo: <?= $data['photo_attribution_text'] ?>
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
                             </div>
39 39
                         <?php endif; ?>
40 40
                         <div class="person-constituency">
41
-                          <?php if ( $constituency && $this_page != 'peer' && $this_page != 'royal' ) { ?>
41
+                          <?php if ($constituency && $this_page != 'peer' && $this_page != 'royal') { ?>
42 42
                             <span class="constituency"><?= $constituency ?></span>
43 43
                           <?php } ?>
44
-                          <?php if ( $party ) { ?>
44
+                          <?php if ($party) { ?>
45 45
                             <span class="party <?= $party_short ?>"><?= $party ?></span>
46 46
                           <?php } ?>
47 47
                         </div>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                                     echo "?person=uk.org.publicwhip/person/$person_id";
59 59
                                 }
60 60
                                 if ($the_users_mp) {
61
-                                    echo "?a=WMC&amp;pc=" . _htmlentities(urlencode($user_postcode));
61
+                                    echo "?a=WMC&amp;pc="._htmlentities(urlencode($user_postcode));
62 62
                                 }
63 63
                             ?>" class="button wtt" onclick="trackLinkClick(this, 'Links', 'WriteToThem', 'Person'); return false;"><img src="/style/img/envelope.png">Send a message</a>
64 64
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
                                   <?php } ?>
28 28
                                 </div>
29 29
                             <?php } ?>
30
-                        <?php else: ?>
30
+                        <?php else {
31
+    : ?>
31 32
                             <div class="person-data-attribution">
32 33
                                 We&rsquo;re missing a photo of <?= $full_name ?>. If you have a
33 34
                                 photo <em>that you can release under a Creative Commons Attribution-ShareAlike
@@ -36,7 +37,9 @@  discard block
 block discarded – undo
36 37
                                 Please do not email us about copyrighted photos elsewhere on the internet; we can&rsquo;t
37 38
                                 use them.
38 39
                             </div>
39
-                        <?php endif; ?>
40
+                        <?php endif;
41
+}
42
+?>
40 43
                         <div class="person-constituency">
41 44
                           <?php if ( $constituency && $this_page != 'peer' && $this_page != 'royal' ) { ?>
42 45
                             <span class="constituency"><?= $constituency ?></span>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/_vote_description.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <li>
2 2
     <?= $description ?>
3
-    <?php if ( $show_link ) { ?>
3
+    <?php if ($show_link) { ?>
4 4
         <a class="vote-description__source" href="<?= $link ?>">Show votes</a>
5 5
         <?php if (isset($key_vote)) { ?>
6 6
         <a class="vote-description__evidence" href="<?= $link ?>"><?= $key_vote['summary'] ?></a>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/votes_svg.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     echo '<?xml version="1.0" encoding="iso-8859-1"?>';
30 30
 
31
- ?>
31
+    ?>
32 32
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
33 33
 <svg width="1000" height="500" viewBox="0 0 1000 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" font-family="Droid Sans, Trebuchet">
34 34
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     $stances = array();
4 4
 
5 5
     foreach ($segment['votes']->positions as $key_vote) {
6
-        if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) {
6
+        if ($key_vote['has_strong'] || $key_vote['position'] == 'has never voted on') {
7 7
             $stance = strip_tags($key_vote['desc'], '<b>');
8 8
             $stance = ucfirst($stance);
9 9
             $stance = preg_replace('#</?b>#i', '*', $stance);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 if (strpos($line, '*') !== False) {
57 57
                     echo preg_replace(
58 58
                         '#(?:^|[*])([^\r\n *][^*\n]*[^\r\n *])(?:$|[*])#i',
59
-                        $tspan_bold_open . '$1' . $tspan_bold_close,
59
+                        $tspan_bold_open.'$1'.$tspan_bold_close,
60 60
                         $line
61 61
                     );
62 62
                 } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     <text font-size="24" font-weight="normal" fill="#000000">
54 54
         <?php foreach ($lines as $j=>$line) { ?>
55 55
             <tspan x="40" y="<?= $stance_y + $stance_padding_top + $stance_baseline_offset + ($stance_lineheight * $j) ?>"><?php
56
-                if (strpos($line, '*') !== False) {
56
+                if (strpos($line, '*') !== false) {
57 57
                     echo preg_replace(
58 58
                         '#(?:^|[*])([^\r\n *][^*\n]*[^\r\n *])(?:$|[*])#i',
59 59
                         $tspan_bold_open . '$1' . $tspan_bold_close,
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/hansard_recent_mostvotes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 twfy_debug("TEMPLATE", "hansard_recentvotes.php");
14 14
 
15 15
 if (isset ($data['rows']) && count($data['rows']) > 0) {
16
-    $PAGE->block_start(array('title'=>'Most interesting speeches from past ' . $data['info']['days'] . ' days'));
16
+    $PAGE->block_start(array('title'=>'Most interesting speeches from past '.$data['info']['days'].' days'));
17 17
 ?>
18 18
                         <ol>
19 19
 <?php
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
         $title = $row['parent']['body'];
26 26
 
27 27
         if (isset($row['listurl'])) {
28
-            $title = "<a href=\"" . $row['listurl'] . "\">$title</a>";
28
+            $title = "<a href=\"".$row['listurl']."\">$title</a>";
29 29
         }
30 30
 
31 31
         if (isset($row['speaker']) && isset($row['speaker']['member_id'])) {
32 32
             $URL = new URL('member');
33 33
             $URL->insert(array('id'=>$row['speaker']['member_id']));
34
-            $member = '<a href="' . $URL->generate() . '">' . $row['speaker']['name'] . '</a>: ';
34
+            $member = '<a href="'.$URL->generate().'">'.$row['speaker']['name'].'</a>: ';
35 35
         } else {
36 36
             $member = '';
37 37
         }
Please login to merge, or discard this patch.