@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | 'health', 'education', 'reform', 'home', 'environment', |
415 | 415 | 'transport', 'housing', 'misc', |
416 | 416 | ]; |
417 | - $sets = array_filter($sets, function ($v) use ($set_descriptions) { |
|
417 | + $sets = array_filter($sets, function($v) use ($set_descriptions) { |
|
418 | 418 | return array_key_exists($v, $set_descriptions); |
419 | 419 | }); |
420 | 420 | shuffle($sets); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | function person_error_page($message) { |
651 | 651 | global $this_page; |
652 | 652 | $SEARCHURL = ''; |
653 | - switch($this_page) { |
|
653 | + switch ($this_page) { |
|
654 | 654 | case 'peer': |
655 | 655 | $people = new MySociety\TheyWorkForYou\People\Peers(); |
656 | 656 | $MPSURL = new \MySociety\TheyWorkForYou\Url('peers'); |
@@ -838,16 +838,16 @@ discard block |
||
838 | 838 | $recent_speeches = $memcache->get($speeches_key); |
839 | 839 | |
840 | 840 | if (!$recent_speeches) { |
841 | - $searchstring_speeches = "speaker:$person_id -section:wrans"; // Exclude written answers section |
|
841 | + $searchstring_speeches = "speaker:$person_id -section:wrans"; // Exclude written answers section |
|
842 | 842 | $SEARCHENGINE = new \SEARCHENGINE($searchstring_speeches); |
843 | 843 | |
844 | 844 | // Search query excluding written questions |
845 | 845 | $args_speeches = [ |
846 | 846 | 's' => $searchstring_speeches, |
847 | - 'p' => 1, // First page |
|
848 | - 'num' => 8, // 8 recent speeches/debates |
|
849 | - 'pop' => 1, // Disable search logging |
|
850 | - 'o' => 'd', // Decending by date order |
|
847 | + 'p' => 1, // First page |
|
848 | + 'num' => 8, // 8 recent speeches/debates |
|
849 | + 'pop' => 1, // Disable search logging |
|
850 | + 'o' => 'd', // Decending by date order |
|
851 | 851 | ]; |
852 | 852 | $results_speeches = $hansard->search($searchstring_speeches, $args_speeches); |
853 | 853 | $recent_speeches = serialize($results_speeches['rows'] ?? []); |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | $recent_wrans = $memcache->get($wrans_key); |
861 | 861 | |
862 | 862 | if (!$recent_wrans) { |
863 | - $searchstring_wrans = "speaker:$person_id section:wrans"; // Only written answers section |
|
863 | + $searchstring_wrans = "speaker:$person_id section:wrans"; // Only written answers section |
|
864 | 864 | $SEARCHENGINE = new \SEARCHENGINE($searchstring_wrans); |
865 | 865 | |
866 | 866 | // Search query for written questions only |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | |
1179 | 1179 | $lang = LANGUAGE; |
1180 | 1180 | |
1181 | - $reg = ['chamber_registers' => [] ]; |
|
1181 | + $reg = ['chamber_registers' => []]; |
|
1182 | 1182 | |
1183 | 1183 | foreach ($valid_chambers as $chamber) { |
1184 | 1184 | $key = 'person_regmem_' . $chamber . '_' . $lang; |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | } |
1194 | 1194 | |
1195 | 1195 | // sort chamber registers by published_date |
1196 | - uasort($reg['chamber_registers'], function ($a, $b) { |
|
1196 | + uasort($reg['chamber_registers'], function($a, $b) { |
|
1197 | 1197 | return $a->published_date <=> $b->published_date; |
1198 | 1198 | }); |
1199 | 1199 | |
@@ -1287,8 +1287,8 @@ discard block |
||
1287 | 1287 | } |
1288 | 1288 | } |
1289 | 1289 | |
1290 | - foreach($mreg as $reg) { |
|
1291 | - $data['members'][] = [ |
|
1290 | + foreach ($mreg as $reg) { |
|
1291 | + $data['members'][] = [ |
|
1292 | 1292 | 'url' => '/' . $rep_type . '/?p=' . $reg['person_id'], |
1293 | 1293 | 'name' => $reg['given_name'] . ' ' . $reg['family_name'], |
1294 | 1294 | ]; |
@@ -12,11 +12,14 @@ |
||
12 | 12 | <?php $detail = $upper_detail; ?> |
13 | 13 | </ul> |
14 | 14 | </li> |
15 | -<?php else : ?> |
|
15 | +<?php else { |
|
16 | + : ?> |
|
16 | 17 | <li class="interest-detail"> |
17 | 18 | <?php if ($detail->has_value()): ?> |
18 | 19 | <span class="interest-detail-name"><?= $detail->display_as ?>: </span> |
19 | 20 | <span class="interest-detail-value"><?= htmlspecialchars($detail->value) ?></span> |
20 | - <?php endif; ?> |
|
21 | + <?php endif; |
|
22 | +} |
|
23 | +?> |
|
21 | 24 | </li> |
22 | 25 | <?php endif; ?> |
23 | 26 | \ No newline at end of file |