@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | 'health', 'education', 'reform', 'home', 'environment', |
| 415 | 415 | 'transport', 'housing', 'justice', '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); |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | function person_error_page($message) { |
| 657 | 657 | global $this_page; |
| 658 | 658 | $SEARCHURL = ''; |
| 659 | - switch($this_page) { |
|
| 659 | + switch ($this_page) { |
|
| 660 | 660 | case 'peer': |
| 661 | 661 | $people = new MySociety\TheyWorkForYou\People\Peers(); |
| 662 | 662 | $MPSURL = new \MySociety\TheyWorkForYou\Url('peers'); |
@@ -844,16 +844,16 @@ discard block |
||
| 844 | 844 | $recent_speeches = $memcache->get($speeches_key); |
| 845 | 845 | |
| 846 | 846 | if (!$recent_speeches) { |
| 847 | - $searchstring_speeches = "speaker:$person_id -section:wrans"; // Exclude written answers section |
|
| 847 | + $searchstring_speeches = "speaker:$person_id -section:wrans"; // Exclude written answers section |
|
| 848 | 848 | $SEARCHENGINE = new \SEARCHENGINE($searchstring_speeches); |
| 849 | 849 | |
| 850 | 850 | // Search query excluding written questions |
| 851 | 851 | $args_speeches = [ |
| 852 | 852 | 's' => $searchstring_speeches, |
| 853 | - 'p' => 1, // First page |
|
| 854 | - 'num' => 8, // 8 recent speeches/debates |
|
| 855 | - 'pop' => 1, // Disable search logging |
|
| 856 | - 'o' => 'd', // Decending by date order |
|
| 853 | + 'p' => 1, // First page |
|
| 854 | + 'num' => 8, // 8 recent speeches/debates |
|
| 855 | + 'pop' => 1, // Disable search logging |
|
| 856 | + 'o' => 'd', // Decending by date order |
|
| 857 | 857 | ]; |
| 858 | 858 | $results_speeches = $hansard->search($searchstring_speeches, $args_speeches); |
| 859 | 859 | $recent_speeches = serialize($results_speeches['rows'] ?? []); |
@@ -866,7 +866,7 @@ discard block |
||
| 866 | 866 | $recent_wrans = $memcache->get($wrans_key); |
| 867 | 867 | |
| 868 | 868 | if (!$recent_wrans) { |
| 869 | - $searchstring_wrans = "speaker:$person_id section:wrans"; // Only written answers section |
|
| 869 | + $searchstring_wrans = "speaker:$person_id section:wrans"; // Only written answers section |
|
| 870 | 870 | $SEARCHENGINE = new \SEARCHENGINE($searchstring_wrans); |
| 871 | 871 | |
| 872 | 872 | // Search query for written questions only |
@@ -1191,7 +1191,7 @@ discard block |
||
| 1191 | 1191 | |
| 1192 | 1192 | $lang = LANGUAGE; |
| 1193 | 1193 | |
| 1194 | - $reg = ['chamber_registers' => [] ]; |
|
| 1194 | + $reg = ['chamber_registers' => []]; |
|
| 1195 | 1195 | |
| 1196 | 1196 | foreach ($valid_chambers as $chamber) { |
| 1197 | 1197 | $key = 'person_regmem_' . $chamber . '_' . $lang; |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | 1208 | // sort chamber registers by published_date |
| 1209 | - uasort($reg['chamber_registers'], function ($a, $b) { |
|
| 1209 | + uasort($reg['chamber_registers'], function($a, $b) { |
|
| 1210 | 1210 | return $a->published_date <=> $b->published_date; |
| 1211 | 1211 | }); |
| 1212 | 1212 | |
@@ -1300,8 +1300,8 @@ discard block |
||
| 1300 | 1300 | } |
| 1301 | 1301 | } |
| 1302 | 1302 | |
| 1303 | - foreach($mreg as $reg) { |
|
| 1304 | - $data['members'][] = [ |
|
| 1303 | + foreach ($mreg as $reg) { |
|
| 1304 | + $data['members'][] = [ |
|
| 1305 | 1305 | 'url' => '/' . $rep_type . '/?p=' . $reg['person_id'], |
| 1306 | 1306 | 'name' => $reg['given_name'] . ' ' . $reg['family_name'], |
| 1307 | 1307 | ]; |