Completed
Pull Request — master (#1450)
by Nick
06:22
created
classes/Divisions.php 3 patches
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param Member   $member   The member to get positions for.
30 30
      */
31 31
 
32
-    public function __construct(Member $member = NULL, PolicyPositions $positions = NULL, Policies $policies = NULL)
32
+    public function __construct(Member $member = null, PolicyPositions $positions = null, Policies $policies = null)
33 33
     {
34 34
         $this->member = $member;
35 35
         $this->positions = $positions;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param  string|string[]  $houses  House name (eg: "commons") or array of
60 60
      *                                   house names. Optional.
61 61
      */
62
-    public function getRecentDivisions($number = 20, $houses = NULL) {
62
+    public function getRecentDivisions($number = 20, $houses = null) {
63 63
         $select = '';
64 64
         $where = '';
65 65
         $order = 'ORDER BY division_date DESC, division_number DESC';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param  int|int[]        $majors  Major types (e.g. 1) or array of
124 124
      *                                   major types. Optional.
125 125
      */
126
-    public function getRecentDebatesWithDivisions($number = 20, $majors = NULL) {
126
+    public function getRecentDebatesWithDivisions($number = 20, $majors = null) {
127 127
         global $hansardmajors;
128 128
 
129 129
         if (!is_array($majors)) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
               $summary['absent'] += $row['total'];
277 277
           } else if ( $vote == 'both' ) {
278 278
               $summary['both'] += $row['total'];
279
-          } else if ( strpos($vote, 'tell') !== FALSE ) {
279
+          } else if ( strpos($vote, 'tell') !== false ) {
280 280
               $summary['tell'] += $row['total'];
281 281
           } else if ( $policy_vote == $vote ) {
282 282
               $summary['for'] += $row['total'];
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
               'teller' => false
366 366
             );
367 367
 
368
-            if (strpos($vote['vote'], 'tell') !== FALSE) {
368
+            if (strpos($vote['vote'], 'tell') !== false) {
369 369
                 $detail['teller'] = true;
370 370
             }
371 371
 
@@ -568,10 +568,10 @@  discard block
 block discarded – undo
568 568
 
569 569
         if (array_key_exists('direction', $row)) {
570 570
             $division['direction'] = $row['direction'];
571
-            if ( strpos( $row['direction'], 'strong') !== FALSE ) {
572
-                $division['strong'] = TRUE;
571
+            if ( strpos( $row['direction'], 'strong') !== false ) {
572
+                $division['strong'] = true;
573 573
             } else {
574
-                $division['strong'] = FALSE;
574
+                $division['strong'] = false;
575 575
             }
576 576
         }
577 577
 
Please login to merge, or discard this patch.
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         $divisions = array();
194 194
         foreach ($q as $row) {
195
-          $divisions[] = $this->getParliamentDivisionDetails($row);
195
+            $divisions[] = $this->getParliamentDivisionDetails($row);
196 196
         }
197 197
 
198 198
         return $divisions;
@@ -247,44 +247,44 @@  discard block
 block discarded – undo
247 247
         );
248 248
 
249 249
         foreach ($q as $row) {
250
-          $policy_id = $row['policy_id'];
250
+            $policy_id = $row['policy_id'];
251 251
 
252
-          if (!array_key_exists($policy_id, $policy_divisions)) {
252
+            if (!array_key_exists($policy_id, $policy_divisions)) {
253 253
             $summary = array(
254
-              'max' => $row['latest'],
255
-              'min' => $row['earliest'],
256
-              'total' => $row['total'],
257
-              'for' => 0, 'against' => 0, 'absent' => 0, 'both' => 0, 'tell' => 0
254
+                'max' => $row['latest'],
255
+                'min' => $row['earliest'],
256
+                'total' => $row['total'],
257
+                'for' => 0, 'against' => 0, 'absent' => 0, 'both' => 0, 'tell' => 0
258 258
             );
259 259
 
260 260
             $policy_divisions[$policy_id] = $summary;
261
-          }
262
-
263
-          $summary = $policy_divisions[$policy_id];
264
-
265
-          $summary['total'] += $row['total'];
266
-          if ($summary['max'] < $row['latest']) {
267
-              $summary['max'] = $row['latest'];
268
-          }
269
-          if ($summary['min'] > $row['latest']) {
270
-              $summary['min'] = $row['latest'];
271
-          }
272
-
273
-          $vote = $row['vote'];
274
-          $policy_vote = str_replace('3', '', $row['policy_vote']);
275
-          if ( $vote == 'absent' ) {
276
-              $summary['absent'] += $row['total'];
277
-          } else if ( $vote == 'both' ) {
278
-              $summary['both'] += $row['total'];
279
-          } else if ( strpos($vote, 'tell') !== FALSE ) {
280
-              $summary['tell'] += $row['total'];
281
-          } else if ( $policy_vote == $vote ) {
282
-              $summary['for'] += $row['total'];
283
-          } else if ( $policy_vote != $vote ) {
284
-              $summary['against'] += $row['total'];
285
-          }
286
-
287
-          $policy_divisions[$policy_id] = $summary;
261
+            }
262
+
263
+            $summary = $policy_divisions[$policy_id];
264
+
265
+            $summary['total'] += $row['total'];
266
+            if ($summary['max'] < $row['latest']) {
267
+                $summary['max'] = $row['latest'];
268
+            }
269
+            if ($summary['min'] > $row['latest']) {
270
+                $summary['min'] = $row['latest'];
271
+            }
272
+
273
+            $vote = $row['vote'];
274
+            $policy_vote = str_replace('3', '', $row['policy_vote']);
275
+            if ( $vote == 'absent' ) {
276
+                $summary['absent'] += $row['total'];
277
+            } else if ( $vote == 'both' ) {
278
+                $summary['both'] += $row['total'];
279
+            } else if ( strpos($vote, 'tell') !== FALSE ) {
280
+                $summary['tell'] += $row['total'];
281
+            } else if ( $policy_vote == $vote ) {
282
+                $summary['for'] += $row['total'];
283
+            } else if ( $policy_vote != $vote ) {
284
+                $summary['against'] += $row['total'];
285
+            }
286
+
287
+            $policy_divisions[$policy_id] = $summary;
288 288
         }
289 289
 
290 290
         return $policy_divisions;
@@ -338,17 +338,17 @@  discard block
 block discarded – undo
338 338
         );
339 339
 
340 340
         $votes = array(
341
-          'yes_votes' => array(),
342
-          'no_votes' => array(),
343
-          'absent_votes' => array(),
344
-          'both_votes' => array()
341
+            'yes_votes' => array(),
342
+            'no_votes' => array(),
343
+            'absent_votes' => array(),
344
+            'both_votes' => array()
345 345
         );
346 346
 
347 347
         $party_breakdown = array(
348
-          'yes_votes' => array(),
349
-          'no_votes' => array(),
350
-          'absent_votes' => array(),
351
-          'both_votes' => array()
348
+            'yes_votes' => array(),
349
+            'no_votes' => array(),
350
+            'absent_votes' => array(),
351
+            'both_votes' => array()
352 352
         );
353 353
 
354 354
         # Sort Lords specially
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
 
360 360
         foreach ($data as $vote) {
361 361
             $detail = array(
362
-              'person_id' => $vote['person_id'],
363
-              'name' => ucfirst(member_full_name($args['house'], $vote['title'], $vote['given_name'],
362
+                'person_id' => $vote['person_id'],
363
+                'name' => ucfirst(member_full_name($args['house'], $vote['title'], $vote['given_name'],
364 364
                     $vote['family_name'], $vote['lordofname'])),
365
-              'party' => $vote['party'],
366
-              'proxy' => false,
367
-              'teller' => false
365
+                'party' => $vote['party'],
366
+                'proxy' => false,
367
+                'teller' => false
368 368
             );
369 369
 
370 370
             if (strpos($vote['vote'], 'tell') !== FALSE) {
@@ -385,23 +385,23 @@  discard block
 block discarded – undo
385 385
             }
386 386
 
387 387
             if ($vote['vote'] == 'aye' or $vote['vote'] == 'tellaye') {
388
-              $votes['yes_votes'][] = $detail;
389
-              @$party_breakdown['yes_votes'][$detail['party']]++;
388
+                $votes['yes_votes'][] = $detail;
389
+                @$party_breakdown['yes_votes'][$detail['party']]++;
390 390
             } else if ($vote['vote'] == 'no' or $vote['vote'] == 'tellno') {
391
-              $votes['no_votes'][] = $detail;
392
-              @$party_breakdown['no_votes'][$detail['party']]++;
391
+                $votes['no_votes'][] = $detail;
392
+                @$party_breakdown['no_votes'][$detail['party']]++;
393 393
             } else if ($vote['vote'] == 'absent') {
394
-              $votes['absent_votes'][] = $detail;
395
-              @$party_breakdown['absent_votes'][$detail['party']]++;
394
+                $votes['absent_votes'][] = $detail;
395
+                @$party_breakdown['absent_votes'][$detail['party']]++;
396 396
             } else if ($vote['vote'] == 'both') {
397
-              $votes['both_votes'][] = $detail;
398
-              @$party_breakdown['both_votes'][$detail['party']]++;
397
+                $votes['both_votes'][] = $detail;
398
+                @$party_breakdown['both_votes'][$detail['party']]++;
399 399
             }
400 400
         }
401 401
 
402 402
         foreach ($votes as $vote => $count) { // array('yes_votes', 'no_votes', 'absent_votes', 'both_votes') as $vote) {
403
-          $votes[$vote . '_by_party'] = $votes[$vote];
404
-          usort($votes[$vote . '_by_party'], function ($a, $b) {
403
+            $votes[$vote . '_by_party'] = $votes[$vote];
404
+            usort($votes[$vote . '_by_party'], function ($a, $b) {
405 405
                 return $a['party']>$b['party'];
406 406
             });
407 407
         }
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
             ':count' => $number
69 69
         );
70 70
 
71
-        if ( is_string($houses) ) {
72
-            $houses = array( $houses );
71
+        if (is_string($houses)) {
72
+            $houses = array($houses);
73 73
         }
74 74
 
75
-        if ( is_array($houses) && count($houses) > 0 ) {
75
+        if (is_array($houses) && count($houses) > 0) {
76 76
             $where = 'WHERE house IN ("' . implode('", "', $houses) . '")';
77 77
         }
78 78
 
79
-        if ( $this->member ) {
79
+        if ($this->member) {
80 80
             $select = "SELECT divisions.*, vote FROM divisions
81 81
                 LEFT JOIN persondivisionvotes ON divisions.division_id=persondivisionvotes.division_id AND person_id=:person_id";
82 82
             $params[':person_id'] = $this->member->person_id;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public function getMemberDivisionsForPolicy($policyID = null) {
216 216
         $where_extra = '';
217 217
         $args = array(':person_id' => $this->member->person_id);
218
-        if ( $policyID ) {
218
+        if ($policyID) {
219 219
             $where_extra = 'AND policy_id = :policy_id';
220 220
             $args[':policy_id'] = $policyID;
221 221
         }
@@ -272,15 +272,15 @@  discard block
 block discarded – undo
272 272
 
273 273
           $vote = $row['vote'];
274 274
           $policy_vote = str_replace('3', '', $row['policy_vote']);
275
-          if ( $vote == 'absent' ) {
275
+          if ($vote == 'absent') {
276 276
               $summary['absent'] += $row['total'];
277
-          } else if ( $vote == 'both' ) {
277
+          } else if ($vote == 'both') {
278 278
               $summary['both'] += $row['total'];
279
-          } else if ( strpos($vote, 'tell') !== FALSE ) {
279
+          } else if (strpos($vote, 'tell') !== FALSE) {
280 280
               $summary['tell'] += $row['total'];
281
-          } else if ( $policy_vote == $vote ) {
281
+          } else if ($policy_vote == $vote) {
282 282
               $summary['for'] += $row['total'];
283
-          } else if ( $policy_vote != $vote ) {
283
+          } else if ($policy_vote != $vote) {
284 284
               $summary['against'] += $row['total'];
285 285
           }
286 286
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                     FROM person_names AS pn
378 378
                     WHERE person_id = :person_id
379 379
                     AND start_date <= :division_date AND end_date >= :division_date",
380
-                    [ ':person_id' => $vote['proxy'], ':division_date' => $row['division_date'] ]
380
+                    [':person_id' => $vote['proxy'], ':division_date' => $row['division_date']]
381 381
                 )->first();
382 382
                 $detail['proxy'] = ucfirst(member_full_name(
383 383
                     HOUSE_TYPE_COMMONS, $q['title'], $q['given_name'],
@@ -401,8 +401,8 @@  discard block
 block discarded – undo
401 401
 
402 402
         foreach ($votes as $vote => $count) { // array('yes_votes', 'no_votes', 'absent_votes', 'both_votes') as $vote) {
403 403
           $votes[$vote . '_by_party'] = $votes[$vote];
404
-          usort($votes[$vote . '_by_party'], function ($a, $b) {
405
-                return $a['party']>$b['party'];
404
+          usort($votes[$vote . '_by_party'], function($a, $b) {
405
+                return $a['party'] > $b['party'];
406 406
             });
407 407
         }
408 408
 
@@ -456,10 +456,10 @@  discard block
 block discarded – undo
456 456
             $votes['against'] . ' ' . make_plural('vote', $votes['against']) . ' against'
457 457
         );
458 458
 
459
-        if ( $votes['both'] ) {
459
+        if ($votes['both']) {
460 460
             $actions[] = $votes['both'] . ' ' . make_plural('abstention', $votes['both']);
461 461
         }
462
-        if ( $votes['absent'] ) {
462
+        if ($votes['absent']) {
463 463
             $actions[] = $votes['absent'] . ' ' . make_plural('absence', $votes['absent']);
464 464
         }
465 465
         if ($max == $min) {
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 
518 518
     private function constructYesNoVoteDescription($direction, $title, $short_text) {
519 519
         $text = ' voted ';
520
-        if ( $short_text ) {
520
+        if ($short_text) {
521 521
             $text .= $short_text;
522 522
         } else {
523 523
             $text .= "$direction on <em>$title</em>";
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
          * votes so we need to generate some text using the title of the division
536 536
          */
537 537
 
538
-        switch ( strtolower($vote) ) {
538
+        switch (strtolower($vote)) {
539 539
             case 'yes':
540 540
             case 'aye':
541 541
                 $description = $this->constructYesNoVoteDescription('yes', $division_title, $yes_text);
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 
584 584
         if (array_key_exists('direction', $row)) {
585 585
             $division['direction'] = $row['direction'];
586
-            if ( strpos( $row['direction'], 'strong') !== FALSE ) {
586
+            if (strpos($row['direction'], 'strong') !== FALSE) {
587 587
                 $division['strong'] = TRUE;
588 588
             } else {
589 589
                 $division['strong'] = FALSE;
@@ -615,24 +615,24 @@  discard block
 block discarded – undo
615 615
         foreach ($q as $row) {
616 616
             $policy_id = $row['policy_id'];
617 617
 
618
-            if ( !array_key_exists($policy_id, $policies) ) {
618
+            if (!array_key_exists($policy_id, $policies)) {
619 619
                 $policies[$policy_id] = array(
620 620
                     'policy_id' => $policy_id,
621 621
                     'weak_count' => 0,
622 622
                     'divisions' => array()
623 623
                 );
624
-                if ( $this->policies ) {
624
+                if ($this->policies) {
625 625
                     $policies[$policy_id]['desc'] = $this->policies->getPolicies()[$policy_id];
626 626
                     $policies[$policy_id]['header'] = $this->policies->getPolicyDetails($policy_id);
627 627
                 }
628
-                if ( $this->positions ) {
628
+                if ($this->positions) {
629 629
                     $policies[$policy_id]['position'] = $this->positions->positionsById[$policy_id];
630 630
                 }
631 631
             }
632 632
 
633 633
             $division = $this->getDivisionDetails($row);
634 634
 
635
-            if ( !$division['strong'] ) {
635
+            if (!$division['strong']) {
636 636
                 $policies[$policy_id]['weak_count']++;
637 637
             }
638 638
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 
648 648
         $gid = get_canonical_gid($gid);
649 649
 
650
-        $q = $this->db->query("SELECT gid, major FROM hansard WHERE epobject_id = ( SELECT subsection_id FROM hansard WHERE gid = :gid )", array( ':gid' => $gid ))->first();
650
+        $q = $this->db->query("SELECT gid, major FROM hansard WHERE epobject_id = ( SELECT subsection_id FROM hansard WHERE gid = :gid )", array(':gid' => $gid))->first();
651 651
         if (!$q) {
652 652
             return '';
653 653
         }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/homepage/recent-votes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( count($divisions) > 0 ) { ?>
1
+<?php if (count($divisions) > 0) { ?>
2 2
     <h2 style="position: relative;">
3 3
         Recent Votes
4 4
         <div class="meta excerpt__category"><a href="/divisions/">Show all recent votes</a></div>
Please login to merge, or discard this patch.
www/docs/admin/wikipedia.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 remove_form();
10 10
 list_ignored();
11 11
 $PAGE->stripe_end([
12
-    [ 'type' => 'html', 'content' => $PAGE->admin_menu() ],
12
+    ['type' => 'html', 'content' => $PAGE->admin_menu()],
13 13
 ]);
14 14
 $PAGE->page_end();
15 15
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_name_vote_list.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!function_exists('print_voter')) {
4
-  function print_voter($vote){
4
+  function print_voter($vote) {
5 5
     echo sprintf(
6 6
       '<li><a href="/mp/?p=%d">%s</a> <span class="party">%s%s</span></li>',
7 7
       $vote['person_id'],
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     <?php if (count($tellers) > 0) { ?>
29 29
       <h4>Tellers</h4>
30 30
       <ul class="division-names">
31
-        <?php foreach($tellers as $teller) {
31
+        <?php foreach ($tellers as $teller) {
32 32
           print_voter($teller);
33 33
         } ?>
34 34
       </p>
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!function_exists('print_voter')) {
4
-  function print_voter($vote){
4
+    function print_voter($vote){
5 5
     echo sprintf(
6
-      '<li><a href="/mp/?p=%d">%s</a> <span class="party">%s%s</span></li>',
7
-      $vote['person_id'],
8
-      $vote['name'],
9
-      $vote['party'],
10
-      $vote['proxy'] ? " (proxy vote cast by $vote[proxy])" : ''
6
+        '<li><a href="/mp/?p=%d">%s</a> <span class="party">%s%s</span></li>',
7
+        $vote['person_id'],
8
+        $vote['name'],
9
+        $vote['party'],
10
+        $vote['proxy'] ? " (proxy vote cast by $vote[proxy])" : ''
11 11
     );
12
-  }
12
+    }
13 13
 }
14 14
 
15 15
 if (count($votes) > 0) { ?>
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
       <?php $tellers = array(); ?>
19 19
       <ul class="division-names js-vote-accordion">
20 20
         <?php foreach ($votes as $vote) {
21
-          if ($vote['teller']) {
22
-              $tellers[] = $vote;
23
-          } else {
21
+            if ($vote['teller']) {
22
+                $tellers[] = $vote;
23
+            } else {
24 24
             print_voter($vote);
25
-          }
25
+            }
26 26
         } ?>
27 27
       </ul>
28 28
     <?php if (count($tellers) > 0) { ?>
29 29
       <h4>Tellers</h4>
30 30
       <ul class="division-names">
31 31
         <?php foreach($tellers as $teller) {
32
-          print_voter($teller);
32
+            print_voter($teller);
33 33
         } ?>
34 34
       </p>
35 35
     <?php } ?>
Please login to merge, or discard this patch.
www/includes/dbtypes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 // $Id: dbtypes.php,v 1.8 2009-04-28 13:13:04 matthew Exp $
4 4
 
5 5
 // The type field in the epobject database table
6
-define ('EPTYPE_HANSARD', 1);
7
-define ('EPTYPE_GLOSSARY', 2);
6
+define('EPTYPE_HANSARD', 1);
7
+define('EPTYPE_GLOSSARY', 2);
8 8
 
9 9
 // The major field in the hansard database table
10 10
 $hansardmajors = array(
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 );
122 122
 $hansardmajors[104] = $hansardmajors[4];
123 123
 
124
-$parties = array (
124
+$parties = array(
125 125
     'Bp'    => 'Bishop',
126 126
     'Con'   => 'Conservative',
127 127
     'CWM'   => 'Deputy Speaker',
Please login to merge, or discard this patch.
tests/HousesTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Test that the Royal edge-case house is correctly defined.
11 11
      */
12
-	public function testRoyalHouseDefined()
12
+    public function testRoyalHouseDefined()
13 13
     {
14 14
         $this->assertEquals(0, HOUSE_TYPE_ROYAL);
15 15
     }
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * Test that the House of Commons is correctly defined.
19 19
      */
20
-	public function testCommonsHouseDefined()
20
+    public function testCommonsHouseDefined()
21 21
     {
22 22
         $this->assertEquals(1, HOUSE_TYPE_COMMONS);
23 23
     }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * Test that the House of Lords is correctly defined.
27 27
      */
28
-	public function testLordsHouseDefined()
28
+    public function testLordsHouseDefined()
29 29
     {
30 30
         $this->assertEquals(2, HOUSE_TYPE_LORDS);
31 31
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Test that the Northern Ireland Assembly is correctly defined.
35 35
      */
36
-	public function testNIHouseDefined()
36
+    public function testNIHouseDefined()
37 37
     {
38 38
         $this->assertEquals(3, HOUSE_TYPE_NI);
39 39
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Test that the Scottish Parliament is correctly defined.
43 43
      */
44
-	public function testScotlandHouseDefined()
44
+    public function testScotlandHouseDefined()
45 45
     {
46 46
         $this->assertEquals(4, HOUSE_TYPE_SCOTLAND);
47 47
     }
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * Test that the Assembly for Wales is correctly defined.
51 51
      */
52
-	public function testWalesHouseDefined()
52
+    public function testWalesHouseDefined()
53 53
     {
54 54
         $this->assertEquals(5, HOUSE_TYPE_WALES);
55 55
     }
56 56
 
57
-	/**
57
+    /**
58 58
      * Test that the London Assembly is correctly defined.
59 59
      */
60
-	public function testLondonAssemblyHouseDefined()
60
+    public function testLondonAssemblyHouseDefined()
61 61
     {
62 62
         $this->assertEquals(6, HOUSE_TYPE_LONDON_ASSEMBLY);
63 63
     }
Please login to merge, or discard this patch.
classes/Utility/House.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,24 +24,24 @@
 block discarded – undo
24 24
     public static function house_to_members($house) {
25 25
         $house_to_members = array(
26 26
             HOUSE_TYPE_COMMONS => array(
27
-              'singular' => 'MP',
28
-              'plural'   => 'MPs'
27
+                'singular' => 'MP',
28
+                'plural'   => 'MPs'
29 29
             ),
30 30
             HOUSE_TYPE_LORDS => array(
31
-              'singular' => 'Member of the House of Lords',
32
-              'plural'   => 'Members of the House of Lords'
31
+                'singular' => 'Member of the House of Lords',
32
+                'plural'   => 'Members of the House of Lords'
33 33
             ),
34 34
             HOUSE_TYPE_NI => array(
35
-              'singular' => 'MLA',
36
-              'plural'   => 'MLAs'
35
+                'singular' => 'MLA',
36
+                'plural'   => 'MLAs'
37 37
             ),
38 38
             HOUSE_TYPE_SCOTLAND => array(
39
-              'singular' => 'MSP',
40
-              'plural'   => 'MSPs'
41
-          ),
39
+                'singular' => 'MSP',
40
+                'plural'   => 'MSPs'
41
+            ),
42 42
             HOUSE_TYPE_LONDON_ASSEMBLY => array(
43
-              'singular' => 'Member of the London Assembly',
44
-              'plural'   => 'Members of the London Assembly'
43
+                'singular' => 'Member of the London Assembly',
44
+                'plural'   => 'Members of the London Assembly'
45 45
             )
46 46
         );
47 47
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,35 +50,35 @@
 block discarded – undo
50 50
 
51 51
     public static function getCountryDetails($house) {
52 52
         $details = array(
53
-            HOUSE_TYPE_COMMONS => array (
53
+            HOUSE_TYPE_COMMONS => array(
54 54
                 'country' => 'UK',
55 55
                 'assembly' => 'uk-commons',
56 56
                 'location' => '&ndash; in the House of Commons',
57 57
                 'cons_type' => 'WMC',
58 58
                 'assembly_name' => 'House of Commons',
59 59
             ),
60
-            HOUSE_TYPE_NI => array (
60
+            HOUSE_TYPE_NI => array(
61 61
                 'country' => 'NORTHERN IRELAND',
62 62
                 'assembly' => 'ni',
63 63
                 'location' => '&ndash; in the Northern Ireland Assembly',
64 64
                 'cons_type' => 'NIE',
65 65
                 'assembly_name' => 'Northern Ireland Assembly',
66 66
             ),
67
-            HOUSE_TYPE_SCOTLAND => array (
67
+            HOUSE_TYPE_SCOTLAND => array(
68 68
                 'country' => 'SCOTLAND',
69 69
                 'assembly' => 'scotland',
70 70
                 'location' => '&ndash; in the Scottish Parliament',
71 71
                 'cons_type' => 'SPC',
72 72
                 'assembly_name' => 'Scottish Parliament',
73 73
             ),
74
-            HOUSE_TYPE_LORDS => array (
74
+            HOUSE_TYPE_LORDS => array(
75 75
                 'country' => 'UK',
76 76
                 'assembly' => 'uk-lords',
77 77
                 'location' => '&ndash; in the House of Lords',
78 78
                 'cons_type' => '',
79 79
                 'assembly_name' => 'House of Lords',
80 80
             ),
81
-            HOUSE_TYPE_LORDS => array (
81
+            HOUSE_TYPE_LORDS => array(
82 82
                 'country' => 'UK',
83 83
                 'assembly' => 'london-assembly',
84 84
                 'location' => '&ndash; in the London Assembly',
Please login to merge, or discard this patch.