Passed
Pull Request — master (#1958)
by
unknown
04:52
created
classes/AlertView/Standard.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
         // Determine if we should fetch alert counts
76 76
         // We skip counts when in form workflows (step, mp_step, disambiguation)
77
-        $in_active_workflow = $this->data['step'] ||           // Alert creation wizard steps
78
-                             $this->data['mp_step'] ||         // MP alert creation
77
+        $in_active_workflow = $this->data['step'] || // Alert creation wizard steps
78
+                             $this->data['mp_step'] || // MP alert creation
79 79
                              ($this->data['members'] && is_array($this->data['members']) && count($this->data['members']) > 0) || // Member disambiguation
80
-                             (isset($this->data['constituencies']) && count($this->data['constituencies']) > 0) ||  // Constituency disambiguation
80
+                             (isset($this->data['constituencies']) && count($this->data['constituencies']) > 0) || // Constituency disambiguation
81 81
                              ($this->data['alertsearch'] && !$this->data['results']); // Search disambiguation (but not if showing results)
82 82
 
83 83
         $this->data['showing_main_alert_list'] = !$in_active_workflow;
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
             return;
469 469
         }
470 470
 
471
-        $cons_sort = function ($a, $b) {
471
+        $cons_sort = function($a, $b) {
472 472
             if ($a['rep_name'] == $b['rep_name']) {
473 473
                 if ($a['constituency'] == $b['constituency']) {
474 474
                     if ($a['member']->family_name == $b['member']->family_name) {
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
             foreach ($this->data['member_constituencies'] as $pid) {
546 546
                 try {
547 547
                     $MEMBER = new \MySociety\TheyWorkForYou\Member(['person_id' => $pid]);
548
-                    $cons[] = [ 'member' => $MEMBER, 'constituency' => $MEMBER->constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name'] ];
548
+                    $cons[] = ['member' => $MEMBER, 'constituency' => $MEMBER->constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name']];
549 549
                 } catch (\MySociety\TheyWorkForYou\MemberException $e) {
550 550
                     // do nothing
551 551
                 }
@@ -563,12 +563,12 @@  discard block
 block discarded – undo
563 563
                         $q = $db->query("SELECT person_id FROM member WHERE constituency = :constituency AND house = :house and left_reason = 'still_in_office'", [':constituency' => $constituency, ':house' => $house]);
564 564
                         foreach ($q as $row) {
565 565
                             $MEMBER = new \MySociety\TheyWorkForYou\Member(['person_id' => $row['person_id'], 'house' => $house]);
566
-                            $cons[] = [ 'member' => $MEMBER, 'constituency' => $constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name'] ];
566
+                            $cons[] = ['member' => $MEMBER, 'constituency' => $constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name']];
567 567
                         }
568 568
 
569 569
                     } else {
570 570
                         $MEMBER = new \MySociety\TheyWorkForYou\Member(['constituency' => $constituency, 'house' => $house]);
571
-                        $cons[] = [ 'member' => $MEMBER, 'constituency' => $constituency ];
571
+                        $cons[] = ['member' => $MEMBER, 'constituency' => $constituency];
572 572
                     }
573 573
                 } catch (\MySociety\TheyWorkForYou\MemberException $e) {
574 574
                     // do nothing
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
                 if ($this->data['pid']) {
735 735
                     $criteria .= " speaker:" . $this->data['pid'];
736 736
                 }
737
-                $this->data['search_results']  = $this->getRecentResults($criteria);
737
+                $this->data['search_results'] = $this->getRecentResults($criteria);
738 738
             }
739 739
 
740 740
             $this->data['criteria'] = $criteria;
Please login to merge, or discard this patch.