Failed Conditions
Pull Request — master (#1328)
by Nick
33:04 queued 18:05
created
www/docs/admin/badusers.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/commentreportlist.php");
4
+include_once (INCLUDESPATH . "easyparliament/commentreportlist.php");
5 5
 
6 6
 $this_page = "admin_badusers";
7 7
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $rows = array();
33 33
 $USERURL = new \MySociety\TheyWorkForYou\Url('userview');
34 34
 
35
-for ($row=0; $row<$q->rows(); $row++) {
35
+for ($row = 0; $row < $q->rows(); $row++) {
36 36
 
37 37
     $user_id = $q->field($row, 'user_id');
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     $totalcomments = $r->field(0, 'totalcount');
45 45
 
46
-    $percentagedeleted = ( $q->field($row, 'deletedcount') / $totalcomments ) * 100;
46
+    $percentagedeleted = ($q->field($row, 'deletedcount') / $totalcomments) * 100;
47 47
 
48 48
 
49 49
     // Get complaints made about this user's comments, but not upheld.
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
 
60 60
     $USERURL->insert(array('u'=>$user_id));
61 61
 
62
-    $rows[] = array (
62
+    $rows[] = array(
63 63
         '<a href="' . $USERURL->generate() . '">' . $q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname') . '</a>',
64 64
         $totalcomments,
65 65
         $q->field($row, 'deletedcount'),
66
-        $percentagedeleted.'%',
66
+        $percentagedeleted . '%',
67 67
         $notupheldcount
68 68
     );
69 69
 }
70 70
 
71
-$tabledata = array (
72
-    'header' => array (
71
+$tabledata = array(
72
+    'header' => array(
73 73
         'Name',
74 74
         'Total comments',
75 75
         'Number deleted',
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 $rows = array();
106 106
 $USERURL = new \MySociety\TheyWorkForYou\Url('userview');
107 107
 
108
-for ($row=0; $row<$q->rows(); $row++) {
108
+for ($row = 0; $row < $q->rows(); $row++) {
109 109
 
110 110
     $user_id = $q->field($row, 'user_id');
111 111
 
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
                     WHERE	user_id = '$user_id'
118 118
                     AND		upheld = '1'");
119 119
 
120
-    $rows[] = array (
120
+    $rows[] = array(
121 121
         '<a href="' . $USERURL->generate() . '">' . $q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname') . '</a>',
122 122
         $q->field($row, 'rejectedcount'),
123 123
         $r->field(0, 'upheldcount')
124 124
     );
125 125
 
126 126
 }
127
-$tabledata = array (
128
-    'header' => array (
127
+$tabledata = array(
128
+    'header' => array(
129 129
         'Name',
130 130
         'Reports not upheld',
131 131
         'Reports upheld'
Please login to merge, or discard this patch.
www/docs/admin/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/commentreportlist.php");
4
+include_once (INCLUDESPATH . "easyparliament/commentreportlist.php");
5 5
 
6 6
 $this_page = "admin_home";
7 7
 
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE confirmed = '0'");
23 23
 $unconfirmedusers = $q->field(0, 'count');
24 24
 
25
-$olddate = gmdate("Y-m-d H:i:s", time()-86400);
25
+$olddate = gmdate("Y-m-d H:i:s", time() - 86400);
26 26
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE lastvisit > '$olddate'");
27 27
 $dayusers = $q->field(0, 'count');
28 28
 
29
-$olddate = gmdate("Y-m-d H:i:s", time()-86400*7);
29
+$olddate = gmdate("Y-m-d H:i:s", time() - 86400 * 7);
30 30
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE lastvisit > '$olddate'");
31 31
 $weekusers = $q->field(0, 'count');
32 32
 ?>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 $rows = array();
62 62
 $USERURL = new \MySociety\TheyWorkForYou\Url('userview');
63 63
 
64
-for ($row=0; $row<$q->rows(); $row++) {
64
+for ($row = 0; $row < $q->rows(); $row++) {
65 65
 
66 66
     $user_id = $q->field($row, 'user_id');
67 67
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $name = _htmlspecialchars($q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname'));
77 77
     }
78 78
 
79
-    $rows[] = array (
79
+    $rows[] = array(
80 80
         $name,
81 81
         '<a href="mailto:' . $q->field($row, 'email') . '">' . $q->field($row, 'email') . '</a>',
82 82
         $confirmed,
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     );
85 85
 }
86 86
 
87
-$tabledata = array (
88
-    'header' => array (
87
+$tabledata = array(
88
+    'header' => array(
89 89
         'Name',
90 90
         'Email',
91 91
         'Confirmed?',
Please login to merge, or discard this patch.
www/docs/admin/featured.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $out = '';
13 13
 if (get_http_var('preview')) {
14 14
     preview_featured();
15
-} else if ( get_http_var('confirm') ) {
15
+} else if (get_http_var('confirm')) {
16 16
     $out = update_featured();
17 17
 }
18 18
 
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 print '</div>';
24 24
 
25 25
 function gid_to_url($gid) {
26
-    if ( !$gid ) {
26
+    if (!$gid) {
27 27
         return '';
28 28
     }
29 29
     global $hansardmajors;
30 30
     global $db;
31 31
 
32
-    $q = $db->query("SELECT major FROM hansard WHERE gid = :gid", array( ':gid' => $gid ));
32
+    $q = $db->query("SELECT major FROM hansard WHERE gid = :gid", array(':gid' => $gid));
33 33
     $url_gid = fix_gid_from_db($gid);
34 34
     $url = new \MySociety\TheyWorkForYou\Url($hansardmajors[$q->field(0, 'major')]['page']);
35 35
     $url->insert(array('id' => $url_gid));
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     $related = $featured->get_related();
44 44
     $context = $featured->get_context();
45 45
 
46
-    if ( get_http_var('url') ) {
46
+    if (get_http_var('url')) {
47 47
         $url = get_http_var('url');
48 48
         $title = get_http_var('title');
49 49
         $context = get_http_var('context');
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
     $related_gid3 = $related3 ? get_gid_from_url($related3) : NULL;
114 114
 
115 115
     print "<h2>Preview Content</h2>";
116
-    if ( $gid !== NULL ) {
116
+    if ($gid !== NULL) {
117 117
         $h = new MySociety\TheyWorkForYou\Homepage;
118
-        $featured = $h->getFeaturedDebate($gid, $title, $context, array( $related_gid1, $related_gid2, $related_gid3 ));
118
+        $featured = $h->getFeaturedDebate($gid, $title, $context, array($related_gid1, $related_gid2, $related_gid3));
119 119
 
120 120
         include INCLUDESPATH . 'easyparliament/templates/html/homepage/featured.php';
121 121
     } else {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     $parts = parse_url($url);
158 158
     parse_str($parts['query'], $query);
159 159
 
160
-    if ( $query['id'] ) {
160
+    if ($query['id']) {
161 161
         if (strpos($parts['path'], 'lords') !== false) {
162 162
             $gid = 'uk.org.publicwhip/lords/';
163 163
         } elseif (strpos($parts['path'], 'whall') !== false) {
Please login to merge, or discard this patch.
www/docs/user/prompt/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 $anchor = '#addcomment';
21 21
 
22 22
 $URL = new \MySociety\TheyWorkForYou\Url('userjoin');
23
-$URL->insert(array('ret'=>$returl.$anchor));
23
+$URL->insert(array('ret'=>$returl . $anchor));
24 24
 $joinurl = $URL->generate();
25 25
 
26 26
 
Please login to merge, or discard this patch.
www/docs/index-election.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 $HANSARDURL = new \MySociety\TheyWorkForYou\Url('hansard');
73 73
 $MPURL = new \MySociety\TheyWorkForYou\Url('yourmp');
74 74
 
75
-$PAGE->block_start(array ('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
75
+$PAGE->block_start(array('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
76 76
 ?>
77 77
                         <ol>
78 78
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     } else {
90 90
         $CHANGEURL = new \MySociety\TheyWorkForYou\Url('userchangepc');
91 91
     }
92
-    $MEMBER = new MEMBER(array ('postcode'=>$THEUSER->postcode(), 'house'=>1));
92
+    $MEMBER = new MEMBER(array('postcode'=>$THEUSER->postcode(), 'house'=>1));
93 93
     $mpname = $MEMBER->full_name();
94 94
     ?>
95 95
       <p><a href="<?php echo $MPURL->generate(); ?>"><strong>Find out more about how <?php echo $mpname; ?>, your ex-MP, represented you over the last parliament</strong></a><br>
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 //$PAGE->block_end();
186 186
 
187 187
 $PAGE->stripe_end(array(
188
-    array (
188
+    array(
189 189
         'type' => 'include',
190 190
         'content' => 'whatisthissite'
191 191
     ),
192
-    array (
192
+    array(
193 193
         'type' => 'include',
194 194
         'content' => 'sitenews_recent'
195 195
     )
Please login to merge, or discard this patch.
www/docs/api/api_convertURL.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     $LISTURL = new \MySociety\TheyWorkForYou\Url($hansardmajors[$id_data['major']]['page_all']);
41 41
     $fragment = '';
42 42
     if ($id_data['htype'] == '11' || $id_data['htype'] == '10') {
43
-        $LISTURL->insert( array( 'id' => $id_data['gid'] ) );
43
+        $LISTURL->insert(array('id' => $id_data['gid']));
44 44
     } else {
45 45
         $parent_epobject_id = $id_data['subsection_id'];
46 46
         $parent_gid = '';
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
                     ':epobject_id' => $parent_epobject_id
51 51
                     ));
52 52
         if ($r->rows() > 0) {
53
-            $parent_gid = fix_gid_from_db( $r->field(0, 'gid') );
53
+            $parent_gid = fix_gid_from_db($r->field(0, 'gid'));
54 54
         }
55 55
         if ($parent_gid != '') {
56
-            $LISTURL->insert( array( 'id' => $parent_gid ) );
56
+            $LISTURL->insert(array('id' => $parent_gid));
57 57
             $fragment = '#g' . gid_to_anchor($id_data['gid']);
58 58
         }
59 59
     }
Please login to merge, or discard this patch.
classes/Renderer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $user = new Renderer\User();
44 44
         $data = array_merge($user->data, $data);
45 45
 
46
-        if ( isset($page_errors) ) {
46
+        if (isset($page_errors)) {
47 47
             $data['page_errors'] = $page_errors;
48 48
         }
49 49
 
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 
96 96
     private static function addCommonURLs($data) {
97 97
         $urls = array();
98
-        if ( isset($data['urls']) ) {
98
+        if (isset($data['urls'])) {
99 99
             $urls = $data['urls'];
100 100
         }
101 101
 
102 102
         $common_urls = array('search', 'alert');
103 103
 
104
-        foreach ( $common_urls as $path ) {
105
-            if (!isset($urls[$path]) ) {
104
+        foreach ($common_urls as $path) {
105
+            if (!isset($urls[$path])) {
106 106
                 $url = new Url($path);
107 107
                 $urls[$path] = $url->generate();
108 108
             }
Please login to merge, or discard this patch.
classes/MiniSurvey.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
         if ($hide_question) {
26 26
             $always_ask = 0;
27 27
             $show_survey_qn = $current_question;
28
-            setcookie('survey', $current_question, time()+60*60*24*365, '/');
28
+            setcookie('survey', $current_question, time() + 60 * 60 * 24 * 365, '/');
29 29
         } elseif ($has_answered_question == $current_question && !$always_ask) {
30 30
             $show_survey_qn = $current_question;
31
-            setcookie('survey', $current_question, time()+60*60*24*365, '/');
31
+            setcookie('survey', $current_question, time() + 60 * 60 * 24 * 365, '/');
32 32
         } elseif (isset($_COOKIE['survey'])) {
33 33
             $show_survey_qn = $_COOKIE['survey'];
34 34
         }
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
 
39 39
             $page_url = '';
40 40
             $hide_url = '';
41
-            if ( in_array( $this_page, array('mp', 'peer', 'msp', 'mla', 'royal') ) ) {
41
+            if (in_array($this_page, array('mp', 'peer', 'msp', 'mla', 'royal'))) {
42 42
                 global $MEMBER;
43
-                if ( $MEMBER ) {
43
+                if ($MEMBER) {
44 44
                     $page_url = $MEMBER->url(true) . "?answered_survey=$current_question";
45 45
                     $hide_url = $MEMBER->url() . "?hide_survey=$current_question";
46 46
                 }
47 47
             } else {
48 48
                 $URL = new Url($this_page);
49
-                $URL->insert(array('answered_survey' => $current_question ));
49
+                $URL->insert(array('answered_survey' => $current_question));
50 50
                 $page_url = 'https://' . DOMAIN . $URL->generate();
51 51
                 $URL = new Url($this_page);
52
-                $URL->insert(array('hide_survey' => $current_question ));
52
+                $URL->insert(array('hide_survey' => $current_question));
53 53
                 $hide_url = $URL->generate();
54 54
             }
55 55
 
Please login to merge, or discard this patch.
classes/SectionView/SectionView.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $data = $this->addCommonData($data);
33 33
         } elseif ($date = get_http_var('d')) {
34 34
             $data = $this->display_day($date);
35
-            if ( !isset($data['template']) ) {
35
+            if (!isset($data['template'])) {
36 36
                 $data['template'] = 'section/day';
37 37
             }
38 38
             $data = $this->addCommonData($data);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $data = $this->display_section_or_speech();
41 41
         } else {
42 42
             $data = $this->display_front();
43
-            if ( !isset($data['template']) ) {
43
+            if (!isset($data['template'])) {
44 44
                 $data['template'] = 'section/recent';
45 45
             }
46 46
             $data['search_sections'] = $this->getSearchSections();
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
         $data['recess_major'] = $this->getRecessMajor($data);
60 60
 
61 61
         $nextprev = $DATA->page_metadata($this_page, 'nextprev');
62
-        if ( isset($nextprev['next']['url']) ) {
62
+        if (isset($nextprev['next']['url'])) {
63 63
             $data['next'] = $nextprev['next'];
64 64
         }
65
-        if ( isset($nextprev['prev']['url']) ) {
65
+        if (isset($nextprev['prev']['url'])) {
66 66
             $data['prev'] = $nextprev['prev'];
67 67
         }
68 68
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if (!isset($data['title']) && $parent_page != '') {
72 72
             $data['title'] = $DATA->page_metadata($parent_page, 'title');
73 73
         }
74
-        if ( $parent_page ) {
74
+        if ($parent_page) {
75 75
             $data['parent_title'] = $DATA->page_metadata($parent_page, 'title');
76 76
         }
77 77
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $urls = array_merge($urls, $this->getViewUrls());
89 89
 
90
-        if ( isset($data['info']['page']) ) {
90
+        if (isset($data['info']['page'])) {
91 91
             $day = new \MySociety\TheyWorkForYou\Url($data['info']['page']);
92 92
             $urls['day'] = $day;
93 93
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $DATA->set_page_metadata($this_page, 'title', $year);
134 134
         }
135 135
 
136
-        $args = array ( 'year' => $year );
136
+        $args = array('year' => $year);
137 137
         $data = $this->list->display('calendar', $args, 'none');
138 138
         return $data;
139 139
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     protected function display_column($date, $column) {
142 142
         global $this_page;
143 143
         $this_page = $this->page_base;
144
-        $args = array( 'date' => $date, 'column' => $column );
144
+        $args = array('date' => $date, 'column' => $column);
145 145
         $content = $this->list->display('column', $args, 'none');
146 146
 
147 147
         $data = array();
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
     protected function display_day($date) {
167 167
         global $this_page;
168 168
         $this_page = $this->page_base . 'day';
169
-        $args = array ( 'date' => get_http_var('d') );
169
+        $args = array('date' => get_http_var('d'));
170 170
         $data = $this->list->display('date', $args, 'none');
171 171
         list($year, $month, $day) = explode('-', $date);
172
-        $args = array( 'year' => $year, 'month' => $month, 'day' => $day);
172
+        $args = array('year' => $year, 'month' => $month, 'day' => $day);
173 173
         $calendar = $this->list->display('calendar', $args, 'none');
174
-        if ( isset($calendar['years']) ) {
174
+        if (isset($calendar['years'])) {
175 175
             $data['calendar'] = $calendar['years'];
176 176
         }
177 177
         return $data;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         global $DATA, $this_page, $THEUSER;
182 182
 
183 183
         # += as we *don't* want to override any already supplied argument
184
-        $args += array (
184
+        $args += array(
185 185
             'gid' => get_http_var('id'),
186 186
             's' => get_http_var('s'), // Search terms to be highlighted.
187 187
             'member_id' => get_http_var('m'), // Member's speeches to be highlighted.
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
             if ($this->major == 6) {
199 199
                 # Magically (as in I can't remember quite why), pbc_clause will
200 200
                 # contain the new URL without any change...
201
-                $URL->remove( array('id') );
201
+                $URL->remove(array('id'));
202 202
             } else {
203
-                $URL->insert( array('id'=>$e->getMessage()) );
203
+                $URL->insert(array('id'=>$e->getMessage()));
204 204
             }
205 205
             # put the search term back in so highlighting works.
206 206
             # NB: as we don't see the # part of the URL we lose this :(
207
-            if ( $args['s'] !== '' ) {
208
-                $URL->insert( array('s'=>$args['s']) );
207
+            if ($args['s'] !== '') {
208
+                $URL->insert(array('s'=>$args['s']));
209 209
             }
210 210
             redirect($URL->generate('none'));
211 211
         }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         if (array_key_exists('text_heading', $data['info'])) {
274 274
             // avoid having Clause 1 etc as the alert text search string on PBC pages as it's
275 275
             // almost certainly not what the person wants
276
-            if ( $this->major == 6 ) {
276
+            if ($this->major == 6) {
277 277
                 $data['email_alert_text'] = $data['section_title'];
278 278
             } else {
279 279
                 $data['email_alert_text'] = $data['info']['text_heading'];
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             $body = preg_replace('#<phrase class="honfriend" id="uk.org.publicwhip/member/(\d+)" name="([^"]*?)">(.*?\s*\((.*?)\))</phrase>#', '<a href="/mp/?m=$1" title="Our page on $2 - \'$3\'">$4</a>', $body);
321 321
             $body = preg_replace('#<phrase class="honfriend" name="([^"]*?)" person_id="uk.org.publicwhip/person/(\d+)">(.*?\s*\((.*?)\))</phrase>#', '<a href="/mp/?p=$2" title="Our page on $1 - \'$3\'">$4</a>', $body);
322 322
             $body = preg_replace_callback('#<phrase class="offrep" id="(.*?)/(\d+)-(\d+)-(\d+)\.(.*?)">(.*?)</phrase>#', function($matches) {
323
-                return '<a href="/search/?pop=1&s=date:' . $matches[2] . $matches[3] . $matches[4] . '+column:' . $matches[5] . '+section:' . $matches[1] .'">' . str_replace("Official Report", "Hansard", $matches[6]) . '</a>';
323
+                return '<a href="/search/?pop=1&s=date:' . $matches[2] . $matches[3] . $matches[4] . '+column:' . $matches[5] . '+section:' . $matches[1] . '">' . str_replace("Official Report", "Hansard", $matches[6]) . '</a>';
324 324
             }, $body);
325 325
             #$body = preg_replace('#<phrase class="offrep" id="((.*?)/(\d+)-(\d+)-(\d+)\.(.*?))">(.*?)</phrase>#e', "\"<a href='/search/?pop=1&amp;s=date:$3$4$5+column:$6+section:$2&amp;match=$1'>\" . str_replace('Official Report', 'Hansard', '$7') . '</a>'", $body);
326 326
             $bodies[] = $body;
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         $first_speech = null;
353 353
         $data['section_title'] = '';
354 354
         $subsection_title = '';
355
-        for ($i=0; $i<count($data['rows']); $i++) {
355
+        for ($i = 0; $i < count($data['rows']); $i++) {
356 356
             $row = $data['rows'][$i];
357 357
             $htype = $row['htype'];
358 358
             // HPOS should be defined below if it's needed; otherwise default to 0
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                 # Voting links
376 376
                 $data['rows'][$i]['voting_data'] = '';
377 377
                 if (isset($row['votes'])) {
378
-                    $data['rows'][$i]['voting_data'] = $this->generate_votes( $row['votes'], $row['epobject_id'], $row['gid'] );
378
+                    $data['rows'][$i]['voting_data'] = $this->generate_votes($row['votes'], $row['epobject_id'], $row['gid']);
379 379
                 }
380 380
 
381 381
                 # Annotation link
@@ -416,47 +416,47 @@  discard block
 block discarded – undo
416 416
 
417 417
     private function getCountryDetails() {
418 418
         $details = array(
419
-            1 => array (
419
+            1 => array(
420 420
                 'country' => 'UK',
421 421
                 'assembly' => 'uk-commons',
422 422
                 'location' => '&ndash; in the House of Commons'
423 423
             ),
424
-            2 => array (
424
+            2 => array(
425 425
                 'country' => 'UK',
426 426
                 'assembly' => 'uk-commons',
427 427
                 'location' => '&ndash; in Westminster Hall'
428 428
             ),
429
-            3 => array (
429
+            3 => array(
430 430
                 'country' => 'UK',
431 431
                 'assembly' => 'uk-commons',
432 432
                 'location' => 'written question &ndash; answered'
433 433
             ),
434
-            4 => array (
434
+            4 => array(
435 435
                 'country' => 'UK',
436 436
                 'assembly' => 'uk-commons',
437 437
                 'location' => 'written statement &ndash; made'
438 438
             ),
439
-            5 => array (
439
+            5 => array(
440 440
                 'country' => 'NORTHERN IRELAND',
441 441
                 'assembly' => 'ni',
442 442
                 'location' => '&ndash; in the Northern Ireland Assembly'
443 443
             ),
444
-            6 => array (
444
+            6 => array(
445 445
                 'country' => 'UK',
446 446
                 'assembly' => 'uk-commons',
447 447
                 'location' => '&ndash; in a Public Bill Committee'
448 448
             ),
449
-            7 => array (
449
+            7 => array(
450 450
                 'country' => 'SCOTLAND',
451 451
                 'assembly' => 'scotland',
452 452
                 'location' => '&ndash; in the Scottish Parliament'
453 453
             ),
454
-            8 => array (
454
+            8 => array(
455 455
                 'country' => 'SCOTLAND',
456 456
                 'assembly' => 'scotland',
457 457
                 'location' => '&ndash; Scottish Parliament written question &ndash; answered'
458 458
             ),
459
-            101 => array (
459
+            101 => array(
460 460
                 'country' => 'UK',
461 461
                 'assembly' => 'uk-lords',
462 462
                 'location' => '&ndash; in the House of Lords'
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         global $DATA, $this_page;
472 472
         $this_page = $this->page_base . 'front';
473 473
         $data = array();
474
-        if ( $this->index_template ) {
474
+        if ($this->index_template) {
475 475
             $data['template'] = $this->index_template;
476 476
         }
477 477
 
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 
482 482
         $content['calendar'] = $class->display('calendar', array('months' => 1), 'none');
483 483
 
484
-        if ( $rssurl = $DATA->page_metadata($this_page, 'rss') ) {
484
+        if ($rssurl = $DATA->page_metadata($this_page, 'rss')) {
485 485
             $content['rssurl'] = $rssurl;
486 486
         }
487 487
 
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
     }
497 497
 
498 498
     //$totalcomments, $comment, $commenturl
499
-    function generate_commentteaser ($row) {
499
+    function generate_commentteaser($row) {
500 500
         // Returns HTML for the one fragment of comment and link for the sidebar.
501 501
         // $totalcomments is the number of comments this item has on it.
502 502
         // $comment is an array like:
Please login to merge, or discard this patch.