@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | $o = get_http_var('o'); |
15 | - $args = [ |
|
15 | + $args = [ |
|
16 | 16 | 's' => $this->searchstring, |
17 | 17 | 'p' => $pagenum, |
18 | 18 | 'num' => get_http_var('num'), |
@@ -246,22 +246,22 @@ discard block |
||
246 | 246 | |
247 | 247 | if ($page != 1) { |
248 | 248 | $prev_page = $page - 1; |
249 | - $URL->insert([ 'p' => $prev_page ]); |
|
249 | + $URL->insert(['p' => $prev_page]); |
|
250 | 250 | $pagelinks['prev'] = [ |
251 | 251 | 'url' => $URL->generate(), |
252 | 252 | ]; |
253 | - $URL->insert([ 'p' => 1 ]); |
|
253 | + $URL->insert(['p' => 1]); |
|
254 | 254 | $pagelinks['firstpage'] = [ |
255 | 255 | 'url' => $URL->generate(), |
256 | 256 | ]; |
257 | 257 | } |
258 | 258 | if ($page != $numpages) { |
259 | 259 | $next_page = $page + 1; |
260 | - $URL->insert([ 'p' => $next_page ]); |
|
260 | + $URL->insert(['p' => $next_page]); |
|
261 | 261 | $pagelinks['next'] = [ |
262 | 262 | 'url' => $URL->generate(), |
263 | 263 | ]; |
264 | - $URL->insert([ 'p' => $numpages ]); |
|
264 | + $URL->insert(['p' => $numpages]); |
|
265 | 265 | $pagelinks['lastpage'] = [ |
266 | 266 | 'url' => $URL->generate(), |
267 | 267 | ]; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $where = []; |
69 | 69 | if ($houses) { |
70 | 70 | if (is_string($houses)) { |
71 | - $houses = [ $houses ]; |
|
71 | + $houses = [$houses]; |
|
72 | 72 | } |
73 | 73 | $where[] = 'house IN ("' . implode('", "', $houses) . '")'; |
74 | 74 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | FROM person_names AS pn |
411 | 411 | WHERE person_id = :person_id |
412 | 412 | AND start_date <= :division_date AND end_date >= :division_date", |
413 | - [ ':person_id' => $vote['proxy'], ':division_date' => $row['division_date'] ] |
|
413 | + [':person_id' => $vote['proxy'], ':division_date' => $row['division_date']] |
|
414 | 414 | )->first(); |
415 | 415 | $detail['proxy'] = ucfirst(member_full_name( |
416 | 416 | HOUSE_TYPE_COMMONS, |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | |
439 | 439 | foreach ($votes as $vote => $count) { // array('yes_votes', 'no_votes', 'absent_votes', 'both_votes') as $vote) { |
440 | 440 | $votes[$vote . '_by_party'] = $votes[$vote]; |
441 | - usort($votes[$vote . '_by_party'], function ($a, $b) { |
|
441 | + usort($votes[$vote . '_by_party'], function($a, $b) { |
|
442 | 442 | return $a['party'] > $b['party']; |
443 | 443 | }); |
444 | 444 | } |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | } |
562 | 562 | |
563 | 563 | private function constructYesNoVoteDescription($direction, $title, $short_text) { |
564 | - $text = ' ' ; |
|
564 | + $text = ' '; |
|
565 | 565 | if ($short_text) { |
566 | 566 | $text .= sprintf(gettext('voted %s'), $short_text); |
567 | 567 | } else { |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | |
712 | 712 | $gid = get_canonical_gid($gid); |
713 | 713 | |
714 | - $q = $this->db->query("SELECT gid, major FROM hansard WHERE epobject_id = ( SELECT subsection_id FROM hansard WHERE gid = :gid )", [ ':gid' => $gid ])->first(); |
|
714 | + $q = $this->db->query("SELECT gid, major FROM hansard WHERE epobject_id = ( SELECT subsection_id FROM hansard WHERE gid = :gid )", [':gid' => $gid])->first(); |
|
715 | 715 | if (!$q) { |
716 | 716 | return ''; |
717 | 717 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // These stores an associative array of key/value pairs that |
43 | 43 | // we'll want passed on to other pages. |
44 | - $this->session_vars = []; |
|
44 | + $this->session_vars = []; |
|
45 | 45 | |
46 | 46 | // Prevent things using $DATA running if it hasn't been set, ie in testing |
47 | 47 | if (isset($DATA)) { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public function reset() { |
94 | 94 | // Call this to remove all the session_vars. |
95 | - $this->session_vars = []; |
|
95 | + $this->session_vars = []; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | global $DATA; |
167 | 167 | |
168 | - $url_args = []; |
|
168 | + $url_args = []; |
|
169 | 169 | |
170 | 170 | foreach (array_merge($this->session_vars, $overrideVars) as $key => $var) { |
171 | 171 | if (is_array($var)) { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | class Footer { |
13 | 13 | public $data; |
14 | 14 | |
15 | - private $about_links = ['help', 'about', 'linktous', 'news', 'privacy']; |
|
15 | + private $about_links = ['help', 'about', 'linktous', 'news', 'privacy']; |
|
16 | 16 | private $assemblies_links = ['hansard', 'sp_home', 'wales_home', 'ni_home', 'london_home']; |
17 | 17 | private $international_links = ['australia', 'ireland', 'mzalendo']; |
18 | 18 | private $tech_links = ['code', 'api', 'data', 'devmailinglist', 'contact']; |
@@ -148,20 +148,20 @@ discard block |
||
148 | 148 | |
149 | 149 | $urls['plain'] = $URL->generate(); |
150 | 150 | |
151 | - $URL->insert([ 'o' => 'n']); |
|
151 | + $URL->insert(['o' => 'n']); |
|
152 | 152 | $urls['by_name'] = $URL->generate(); |
153 | 153 | |
154 | - $URL->insert([ 'o' => 'l']); |
|
154 | + $URL->insert(['o' => 'l']); |
|
155 | 155 | $urls['by_last'] = $URL->generate(); |
156 | 156 | |
157 | - $URL->insert([ 'o' => 'f']); |
|
157 | + $URL->insert(['o' => 'f']); |
|
158 | 158 | $urls['by_first'] = $URL->generate(); |
159 | 159 | |
160 | - $URL->insert([ 'o' => 'p']); |
|
160 | + $URL->insert(['o' => 'p']); |
|
161 | 161 | $urls['by_party'] = $URL->generate(); |
162 | 162 | |
163 | - $URL->insert([ 'f' => 'csv']); |
|
164 | - $URL->remove([ 'o']); |
|
163 | + $URL->insert(['f' => 'csv']); |
|
164 | + $URL->remove(['o']); |
|
165 | 165 | if ($date = get_http_var('date')) { |
166 | 166 | $URL->insert(['date' => $date]); |
167 | 167 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $constituency = $row['constituency'] ? gettext($row['constituency']) : ''; |
214 | 214 | $party = $row['party'] ? gettext($row['party']) : ''; |
215 | 215 | $url = make_member_url($name, $constituency, $this->house, $p_id); |
216 | - $narray = [ |
|
216 | + $narray = [ |
|
217 | 217 | 'person_id' => $p_id, |
218 | 218 | 'given_name' => $row['given_name'], |
219 | 219 | 'family_name' => $row['family_name'], |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | uasort($data, 'by_peer_name'); |
232 | 232 | } |
233 | 233 | |
234 | - $data = [ |
|
234 | + $data = [ |
|
235 | 235 | 'info' => [ |
236 | 236 | 'order' => $order, |
237 | 237 | ], |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | protected function getSearchSections() { |
26 | 26 | return [ |
27 | - [ 'section' => 'sp' ], |
|
27 | + ['section' => 'sp'], |
|
28 | 28 | ]; |
29 | 29 | } |
30 | 30 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $data = []; |
20 | 20 | |
21 | - $args = [ 'months' => 1 ]; |
|
21 | + $args = ['months' => 1]; |
|
22 | 22 | $WRANSLIST = new \WRANSLIST(); |
23 | 23 | |
24 | 24 | $wrans = []; |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function getSearchSections() { |
52 | 52 | $sections = [ |
53 | - [ 'section' => 'wrans', 'title' => 'Written Answers' ], |
|
53 | + ['section' => 'wrans', 'title' => 'Written Answers'], |
|
54 | 54 | ]; |
55 | 55 | if (get_http_var('type') == '') { |
56 | - $sections[] = [ 'section' => 'wms', 'title' => 'Written Ministerial Statements' ]; |
|
56 | + $sections[] = ['section' => 'wms', 'title' => 'Written Ministerial Statements']; |
|
57 | 57 | } |
58 | 58 | return $sections; |
59 | 59 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | protected function getSearchSections() { |
34 | 34 | return [ |
35 | - [ 'section' => 'ni' ], |
|
35 | + ['section' => 'ni'], |
|
36 | 36 | ]; |
37 | 37 | } |
38 | 38 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $debates = $DEBATELIST->display('recent_debates', ['days' => 30, 'num' => 6], 'none'); |
53 | 53 | $MOREURL = new \MySociety\TheyWorkForYou\Url('nidebatesfront'); |
54 | - $MOREURL->insert([ 'more' => 1 ]); |
|
54 | + $MOREURL->insert(['more' => 1]); |
|
55 | 55 | |
56 | 56 | // this makes sure that we don't repeat this debate in the list below |
57 | 57 | $random_debate = null; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | $data['featured'] = $featured; |
88 | - $data['debates'] = [ 'recent' => $recent]; |
|
88 | + $data['debates'] = ['recent' => $recent]; |
|
89 | 89 | |
90 | 90 | $data['regional'] = $this->getMLAList(); |
91 | 91 | $data['search_box'] = $this->getSearchBox($data); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $DEBATELIST = new \DEBATELIST(); |
17 | 17 | $debates = []; |
18 | 18 | $debates['data'] = $DEBATELIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
19 | - $args = [ 'months' => 1 ]; |
|
19 | + $args = ['months' => 1]; |
|
20 | 20 | $debates['calendar'] = $DEBATELIST->display('calendar', $args, 'none'); |
21 | 21 | $debates['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
22 | 22 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $WHALLLIST = new \WHALLLIST(); |
28 | 28 | $whall['data'] = $WHALLLIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
29 | - $args = [ 'months' => 1 ]; |
|
29 | + $args = ['months' => 1]; |
|
30 | 30 | $whall['calendar'] = $WHALLLIST->display('calendar', $args, 'none'); |
31 | 31 | $whall['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
32 | 32 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $LORDSDEBATELIST = new \LORDSDEBATELIST(); |
38 | 38 | $lords['data'] = $LORDSDEBATELIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
39 | - $args = [ 'months' => 1 ]; |
|
39 | + $args = ['months' => 1]; |
|
40 | 40 | $lords['calendar'] = $LORDSDEBATELIST->display('calendar', $args, 'none'); |
41 | 41 | |
42 | 42 | $lords['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | |
56 | 56 | protected function getSearchSections() { |
57 | 57 | return [ |
58 | - [ 'section' => 'debates', 'title' => 'House of Commons' ], |
|
59 | - [ 'section' => 'lords', 'title' => 'House of Lords' ], |
|
60 | - [ 'section' => 'whall', 'title' => 'Westminster Hall' ], |
|
58 | + ['section' => 'debates', 'title' => 'House of Commons'], |
|
59 | + ['section' => 'lords', 'title' => 'House of Lords'], |
|
60 | + ['section' => 'whall', 'title' => 'Westminster Hall'], |
|
61 | 61 | ]; |
62 | 62 | } |
63 | 63 | } |