@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | |
132 | 132 | <ul class="vote-descriptions"> |
133 | 133 | <?php foreach ($sig_diff_policy->policy_pairs as $policy_pair) { |
134 | - include '_vote_description.php'; |
|
135 | - } ?> |
|
134 | + include '_vote_description.php'; |
|
135 | + } ?> |
|
136 | 136 | </ul> |
137 | 137 | |
138 | 138 | <?php } ?> |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | <ul class="vote-descriptions"> |
166 | 166 | <?php foreach ($segment->policy_pairs as $policy_pair) { |
167 | 167 | |
168 | - include '_vote_description.php'; |
|
168 | + include '_vote_description.php'; |
|
169 | 169 | |
170 | - } ?> |
|
170 | + } ?> |
|
171 | 171 | </ul> |
172 | 172 | |
173 | 173 | <p class="voting-information-provenance"> |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | <h3 class="browse-content">Comparison periods</h3> |
25 | 25 | <ul> |
26 | - <?php foreach($available_periods as $period) { ?> |
|
26 | + <?php foreach ($available_periods as $period) { ?> |
|
27 | 27 | <li class="active"><a href="?comparison_period=<?= $period->lslug() ?>"><?= $period->description ?></a></li> |
28 | 28 | <?php } ?> |
29 | 29 | </ul> |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $group_name = $policies->getSetDescriptions()[$set_slug]; |
67 | 67 | $group_slug = $set_slug; |
68 | 68 | $comparison_period_slug = $period_slug; |
69 | - $policy_pairs = array_filter($pairs, function ($pair) use ($policy_ids) { |
|
69 | + $policy_pairs = array_filter($pairs, function($pair) use ($policy_ids) { |
|
70 | 70 | return in_array($pair->getPolicyID(), $policy_ids) && !$pair->member_distribution->noDataAvailable(); |
71 | 71 | }); |
72 | 72 | $collection = new PolicyDistributionCollection($group_slug, $group_name, $comparison_period_slug, $person_id, $party_slug, $policy_pairs); |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | function person_error_page($message) { |
616 | 616 | global $this_page; |
617 | 617 | $SEARCHURL = ''; |
618 | - switch($this_page) { |
|
618 | + switch ($this_page) { |
|
619 | 619 | case 'peer': |
620 | 620 | $people = new MySociety\TheyWorkForYou\People\Peers(); |
621 | 621 | $MPSURL = new \MySociety\TheyWorkForYou\Url('peers'); |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | $SEARCHENGINE = new \SEARCHENGINE($searchstring); |
802 | 802 | |
803 | 803 | $hansard = new MySociety\TheyWorkForYou\Hansard(); |
804 | - $args = [ |
|
804 | + $args = [ |
|
805 | 805 | 's' => $searchstring, |
806 | 806 | 'p' => 1, |
807 | 807 | 'num' => 3, |
@@ -1017,7 +1017,7 @@ discard block |
||
1017 | 1017 | |
1018 | 1018 | $lang = LANGUAGE; |
1019 | 1019 | |
1020 | - $reg = ['chamber_registers' => [] ]; |
|
1020 | + $reg = ['chamber_registers' => []]; |
|
1021 | 1021 | |
1022 | 1022 | foreach ($valid_chambers as $chamber) { |
1023 | 1023 | $key = 'person_regmem_' . $chamber . '_' . $lang; |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | } |
1033 | 1033 | |
1034 | 1034 | // sort chamber registers by published_date |
1035 | - uasort($reg['chamber_registers'], function ($a, $b) { |
|
1035 | + uasort($reg['chamber_registers'], function($a, $b) { |
|
1036 | 1036 | return $a->published_date <=> $b->published_date; |
1037 | 1037 | }); |
1038 | 1038 | |
@@ -1126,8 +1126,8 @@ discard block |
||
1126 | 1126 | } |
1127 | 1127 | } |
1128 | 1128 | |
1129 | - foreach($mreg as $reg) { |
|
1130 | - $data['members'][] = [ |
|
1129 | + foreach ($mreg as $reg) { |
|
1130 | + $data['members'][] = [ |
|
1131 | 1131 | 'url' => '/' . $rep_type . '/?p=' . $reg['person_id'], |
1132 | 1132 | 'name' => $reg['given_name'] . ' ' . $reg['family_name'], |
1133 | 1133 | ]; |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | } |
14 | 14 | |
15 | 15 | private function fetch_mp_recent_page() { |
16 | - $vars = [ 'pagetype' => 'recent', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/recent' ]; |
|
16 | + $vars = ['pagetype' => 'recent', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/recent']; |
|
17 | 17 | return $this->base_fetch_page($vars, 'mp', 'index.php', '/mp/recent.php'); |
18 | 18 | } |
19 | 19 | |
20 | 20 | private function fetch_recent_page() { |
21 | - return $this->base_fetch_page(['url' => '/divisions' ], 'divisions', 'index.php', '/divisions/index.php'); |
|
21 | + return $this->base_fetch_page(['url' => '/divisions'], 'divisions', 'index.php', '/divisions/index.php'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | public function testSingleDivision() { |
57 | - $page = $this->base_fetch_page(['url' => '/divisions/division.php', 'vote' => 'pw-3012-01-01-1-commons' ], 'divisions', 'division.php', '/divisions/division.php'); |
|
57 | + $page = $this->base_fetch_page(['url' => '/divisions/division.php', 'vote' => 'pw-3012-01-01-1-commons'], 'divisions', 'division.php', '/divisions/division.php'); |
|
58 | 58 | $this->assertStringContainsString('A majority of MPs <b>voted in favour</b> of a thing', $page); |
59 | 59 | $this->assertStringContainsString('Aye: 200', $page); |
60 | 60 | $this->assertStringNotContainsString('No:', $page); # Summary 100, but no actual votes. In reality, summary can only be <= actual. |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | |
110 | 110 | private function getMemberFromPersonId($person_id) { |
111 | - return new MySociety\TheyWorkForYou\Member([ "person_id" => $person_id ]); |
|
111 | + return new MySociety\TheyWorkForYou\Member(["person_id" => $person_id]); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | public function testMPPartyPolicyTextWhenDiffersVotes() { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | // this is a single person party i think - so no party comparison? |
140 | 140 | // need to check what votes would actually produce |
141 | 141 | |
142 | - $page = $this->fetch_page(['pid' => 4, 'pagetype' => 'votes','url' => '/mp/4/test_mp_d/test_westminster_constituency/votes']); |
|
142 | + $page = $this->fetch_page(['pid' => 4, 'pagetype' => 'votes', 'url' => '/mp/4/test_mp_d/test_westminster_constituency/votes']); |
|
143 | 143 | $this->assertStringContainsString('Test MP D', $page); |
144 | 144 | $this->assertStringContainsString('<li class="vote-description"', $page); |
145 | 145 | $this->assertStringNotContainsString('comparable B Party MPs voted', $page); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | // this is just a boring, person aligned with party example |
152 | 152 | |
153 | - $page = $this->fetch_page(['pagetype' => 'votes', 'pid' => 16, 'url' => '/mp/16/test_mp_g_party_2/test_westminster_constituency/votes']); |
|
153 | + $page = $this->fetch_page(['pagetype' => 'votes', 'pid' => 16, 'url' => '/mp/16/test_mp_g_party_2/test_westminster_constituency/votes']); |
|
154 | 154 | $this->assertStringContainsString('Test MP G Party 2', $page); |
155 | 155 | |
156 | 156 | $this->assertStringNotContainsString('sometimes <b>differs</b> from their party colleagues', $page); |