Completed
Pull Request — master (#1450)
by Nick
06:22
created
www/includes/easyparliament/templates/html/divisions/_votes.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@
 block discarded – undo
38 38
 
39 39
 $vote_sets = array(
40 40
     'yes_votes' => array(
41
-      'title' => 'Aye',
42
-      'anchor' => 'for',
41
+        'title' => 'Aye',
42
+        'anchor' => 'for',
43 43
     ),
44 44
     'no_votes' => array(
45
-      'title' => 'No',
46
-      'anchor' => 'against',
45
+        'title' => 'No',
46
+        'anchor' => 'against',
47 47
     ),
48 48
     'absent_votes' => array(
49
-      'title' => 'Absent',
50
-      'anchor' => 'absent',
49
+        'title' => 'Absent',
50
+        'anchor' => 'absent',
51 51
     ),
52 52
     'both_votes' => array(
53
-      'title' => 'Abstained',
54
-      'anchor' => 'both',
53
+        'title' => 'Abstained',
54
+        'anchor' => 'both',
55 55
     ),
56 56
 );
57 57
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 });
25 25
 $sections_with_votes = array_values($sections_with_votes);
26 26
 
27
-for ($i=0; $i<count($sections_with_votes); $i+=2) {
27
+for ($i = 0; $i < count($sections_with_votes); $i += 2) {
28 28
     $l = $sections_with_votes[$i];
29
-    $r = $i+1 < count($sections_with_votes) ? $sections_with_votes[$i+1] : null;
29
+    $r = $i + 1 < count($sections_with_votes) ? $sections_with_votes[$i + 1] : null;
30 30
 
31 31
     $vote_title = $vote_sets[$l]['title'];
32 32
     $anchor = $vote_sets[$l]['anchor'];
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_your_mp.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,6 @@
 block discarded – undo
1 1
 <div class="debate-speech__division__your-mp">
2
-  <?php if ( !isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
2
+  <?php if ( !isset($main_vote_mp) || ! $main_vote_mp) {
3
+/* $main_vote_mp is true if an MP has been requested via the URL */ ?>
3 4
     <div class="your-mp__header">
4 5
       <h3>How your <?= $division['members']['singular'] ?> voted</h3>
5 6
       <p>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <div class="debate-speech__division__your-mp">
2
-  <?php if ( !isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
2
+  <?php if (!isset($main_vote_mp) || !$main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?>
3 3
     <div class="your-mp__header">
4 4
       <h3>How your <?= $division['members']['singular'] ?> voted</h3>
5 5
       <p>
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     </div>
10 10
   <?php } ?>
11 11
     <a href="<?= $data['mp_data']['mp_url'] ?>" class="your-mp__content">
12
-      <?php if ( isset($mp_vote) ) { ?>
12
+      <?php if (isset($mp_vote)) { ?>
13 13
         <span class="your-mp__vote your-mp__vote--<?= $mp_vote['vote'] ?>"><?php
14 14
           switch ($mp_vote['vote']) {
15 15
               case 'aye':
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                   echo 'N/A';
34 34
           }
35 35
         ?></span>
36
-      <?php } else if ( isset($before_mp) || isset($after_mp) ) { ?>
36
+      <?php } else if (isset($before_mp) || isset($after_mp)) { ?>
37 37
         <span class="your-mp__vote">N/A</span>
38 38
       <?php } ?>
39 39
         <img class="your-mp__image" src="<?= $data['mp_data']['image'] ?>">
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             <h2 class="people-list__person__name"><?= $data['mp_data']['name'] ?></h2>
42 42
             <p class="people-list__person__memberships">
43 43
                 <span class="people-list__person__constituency"><?= $data['mp_data']['constituency'] ?></span>
44
-                <span class="people-list__person__party <?= slugify( $data['mp_data']['party'] ) ?>"><?= $data['mp_data']['party'] ?></span>
44
+                <span class="people-list__person__party <?= slugify($data['mp_data']['party']) ?>"><?= $data['mp_data']['party'] ?></span>
45 45
             </p>
46 46
         </div>
47 47
     </a>
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
     <a href="<?= $data['mp_data']['mp_url'] ?>" class="your-mp__content">
12 12
       <?php if ( isset($mp_vote) ) { ?>
13 13
         <span class="your-mp__vote your-mp__vote--<?= $mp_vote['vote'] ?>"><?php
14
-          switch ($mp_vote['vote']) {
15
-              case 'aye':
14
+            switch ($mp_vote['vote']) {
15
+                case 'aye':
16 16
                   echo 'Aye';
17
-                  break;
18
-              case 'no':
17
+                    break;
18
+                case 'no':
19 19
                   echo 'No';
20
-                  break;
21
-              case 'absent':
20
+                    break;
21
+                case 'absent':
22 22
                   echo 'Absent';
23
-                  break;
24
-              case 'both':
23
+                    break;
24
+                case 'both':
25 25
                   echo 'Abstain';
26
-                  break;
27
-              case 'tellaye':
26
+                    break;
27
+                case 'tellaye':
28 28
                   echo 'Aye (Teller)';
29
-                  break;
30
-              case 'tellno':
29
+                    break;
30
+                case 'tellno':
31 31
                   echo 'No (Teller)';
32
-                  break;
33
-              default:
32
+                    break;
33
+                default:
34 34
                   echo 'N/A';
35
-          }
35
+            }
36 36
         ?></span>
37 37
       <?php } else if ( isset($before_mp) || isset($after_mp) ) { ?>
38 38
         <span class="your-mp__vote">N/A</span>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/alert/_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <h3>Your current email alerts</h3>
2 2
 
3 3
 <ul class="alerts-manage__list">
4
-  <?php foreach ( $alerts as $alert ) { ?>
4
+  <?php foreach ($alerts as $alert) { ?>
5 5
     <li>
6 6
         When <?= _htmlspecialchars($alert['criteria']) ?>.
7 7
         <form action="<?= $actionurl ?>" method="POST">
8 8
             <input type="hidden" name="t" value="<?= _htmlspecialchars($alert['token']) ?>">
9
-          <?php if ( $alert['status'] == 'unconfirmed' ) { ?>
9
+          <?php if ($alert['status'] == 'unconfirmed') { ?>
10 10
             <input type="submit" class="button small" name="action" value="Confirm">
11
-          <?php } elseif ( $alert['status'] == 'suspended' ) { ?>
11
+          <?php } elseif ($alert['status'] == 'suspended') { ?>
12 12
             <input type="submit" class="button small" name="action" value="Resume">
13 13
           <?php } else { ?>
14 14
             <input type="submit" class="button button--secondary small" name="action" value="Suspend">
Please login to merge, or discard this patch.
classes/Utility/Alert.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         }
20 20
 
21 21
         if (!empty($details['pid'])) {
22
-            $criteria[] = 'speaker:'.$details['pid'];
22
+            $criteria[] = 'speaker:' . $details['pid'];
23 23
         }
24 24
 
25 25
         $criteria = join(' ', $criteria);
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
             $token = $row['alert_id'] . '-' . $row['registrationtoken'];
42 42
 
43 43
             $status = 'confirmed';
44
-            if ( !$row['confirmed'] ) {
44
+            if (!$row['confirmed']) {
45 45
                 $status = 'unconfirmed';
46
-            } elseif ( $row['deleted'] == 2 ) {
46
+            } elseif ($row['deleted'] == 2) {
47 47
                 $status = 'suspended';
48 48
             }
49 49
 
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
 
61 61
     public static function prettifyCriteria($alert_criteria) {
62 62
         $text = '';
63
-        if ( $alert_criteria ) {
63
+        if ($alert_criteria) {
64 64
             $criteria = explode(' ', $alert_criteria);
65 65
             $words = array();
66 66
             $spokenby = array_values(\MySociety\TheyWorkForYou\Utility\Search::speakerNamesForIDs($alert_criteria));
67 67
 
68 68
             foreach ($criteria as $c) {
69
-                if (!preg_match('#^speaker:(\d+)#',$c,$m)) {
69
+                if (!preg_match('#^speaker:(\d+)#', $c, $m)) {
70 70
                     $words[] = $c;
71 71
                 }
72 72
             }
73
-            if ( $spokenby && count($words) ) {
73
+            if ($spokenby && count($words)) {
74 74
                 $text = implode(' or ', $spokenby) . ' mentions [' . implode(' ', $words) . ']';
75
-            } else if ( count( $words ) ) {
75
+            } else if (count($words)) {
76 76
                 $text = '[' . implode(' ', $words) . ']' . ' is mentioned';
77
-            } else if ( $spokenby ) {
77
+            } else if ($spokenby) {
78 78
                 $text = implode(' or ', $spokenby) . " speaks";
79 79
             }
80 80
         }
Please login to merge, or discard this patch.
www/docs/section.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@
 block discarded – undo
21 21
     if (isset($THEUSER) && $THEUSER->postcode_is_set()) {
22 22
         try {
23 23
             $MEMBER = new MySociety\TheyWorkForYou\Member(array('postcode' => $THEUSER->postcode(), 'house' => \MySociety\TheyWorkForYou\Utility\House::majorToHouse($view->major)[0]));
24
-        } catch ( MySociety\TheyWorkForYou\MemberException $e ) {
24
+        } catch (MySociety\TheyWorkForYou\MemberException $e) {
25 25
             $MEMBER = null;
26 26
         }
27 27
     }
28 28
 
29 29
     $data = $view->display();
30 30
     if ($data) {
31
-        if ( !empty($data['template']) ) {
31
+        if (!empty($data['template'])) {
32 32
             $template = $data['template'];
33 33
         } else {
34 34
             $template = 'section/section';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 }
14 14
 
15 15
 if ($type = ucfirst(get_http_var('type'))) {
16
-    $class_name = "MySociety\TheyWorkForYou\SectionView\\${type}View";
16
+    $class_name = "MySociety\TheyWorkForYou\SectionView\\${type}view";
17 17
     $view = new $class_name();
18 18
 
19 19
     // use this for generating member vote data
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/vote.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
                   <?php if (isset($data['mp_data'])) {
29 29
                     include('_your_mp.php');
30
-                  } ?>
30
+                    } ?>
31 31
 
32 32
                     <div class="debate-speech__division__details">
33 33
                       <p>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                           </span><br>
38 38
                       <?php } else { ?>
39 39
                           <?php if ($mp_vote['with_majority']) { ?>
40
-                              <?php $vote_prefix = 'A majority of ' . $division['members']['plural']  . ' <b>agreed</b> and'; include('_vote_description.php'); ?>
40
+                              <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>agreed</b> and'; include('_vote_description.php'); ?>
41 41
                           <?php } else { ?>
42 42
                               <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>disagreed</b> and'; include('_vote_description.php'); ?>
43 43
                           <?php } ?>
Please login to merge, or discard this patch.
www/docs/divisions/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 $data = $divisions->getRecentDivisions(30);
15 15
 
16 16
 if (isset($MEMBER)) {
17
-  $data['mp_name'] = ucfirst($MEMBER->full_name());
17
+    $data['mp_name'] = ucfirst($MEMBER->full_name());
18 18
 }
19 19
 
20 20
 $data['last_updated'] = MySociety\TheyWorkForYou\Divisions::getMostRecentDivisionDate()['latest'];
Please login to merge, or discard this patch.
tests/DivisionsTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@  discard block
 block discarded – undo
17 17
     }
18 18
 
19 19
     private function fetch_division_page() {
20
-        return $this->fetch_page( array( 'pagetype' => 'divisions', 'pid' => 2, 'policy' => 363, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/divisions' ) );
20
+        return $this->fetch_page(array('pagetype' => 'divisions', 'pid' => 2, 'policy' => 363, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/divisions'));
21 21
     }
22 22
 
23 23
     private function fetch_mp_recent_page()
24 24
     {
25
-        $vars = array( 'pagetype' => 'recent', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/recent' );
25
+        $vars = array('pagetype' => 'recent', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/recent');
26 26
         return $this->base_fetch_page($vars, 'mp', 'index.php', '/mp/recent.php');
27 27
     }
28 28
 
29 29
     private function fetch_recent_page() {
30
-        return $this->base_fetch_page( array('url' => '/divisions' ), 'divisions', 'index.php', '/divisions/index.php' );
30
+        return $this->base_fetch_page(array('url' => '/divisions'), 'divisions', 'index.php', '/divisions/index.php');
31 31
     }
32 32
 
33 33
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     }
114 114
 
115 115
     public function testNotEnoughInfoStatement() {
116
-        return $this->fetch_page( array( 'pagetype' => 'divisions', 'pid' => 2, 'policy' => 810, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/divisions' ) );
116
+        return $this->fetch_page(array('pagetype' => 'divisions', 'pid' => 2, 'policy' => 810, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/divisions'));
117 117
         $this->assertContains('we don&rsquo;t have enough information to calculate Test Current-MP&rsquo;s position', $page);
118 118
     }
119 119
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     }
125 125
 
126 126
     public function testSingleDivision() {
127
-        $page = $this->base_fetch_page( array('url' => '/divisions/division.php', 'vote' => 'pw-3012-01-01-1-commons' ), 'divisions', 'division.php', '/divisions/division.php' );
127
+        $page = $this->base_fetch_page(array('url' => '/divisions/division.php', 'vote' => 'pw-3012-01-01-1-commons'), 'divisions', 'division.php', '/divisions/division.php');
128 128
         $this->assertContains('A majority of MPs  <b>voted in favour</b> of a thing', $page);
129 129
         $this->assertContains('Aye: 200', $page);
130 130
         $this->assertNotContains('No:', $page); # Summary 100, but no actual votes. In reality, summary can only be <= actual.
Please login to merge, or discard this patch.
classes/Utility/Search.php 2 patches
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
             return $data;
30 30
         }
31
-        if (count($gids) == 5000)
32
-            $data['limit_reached'] = true;
31
+        if (count($gids) == 5000) {
32
+                    $data['limit_reached'] = true;
33
+        }
33 34
 
34 35
         # Fetch all the speakers of the results, count them up and get min/max date usage
35 36
         $speaker_count = array();
@@ -45,8 +46,12 @@  discard block
 block discarded – undo
45 46
                 $mindate[$person_id] = '9999-12-31';
46 47
             }
47 48
             $speaker_count[$person_id]++;
48
-            if ($hdate < $mindate[$person_id]) $mindate[$person_id] = $hdate;
49
-            if ($hdate > $maxdate[$person_id]) $maxdate[$person_id] = $hdate;
49
+            if ($hdate < $mindate[$person_id]) {
50
+                $mindate[$person_id] = $hdate;
51
+            }
52
+            if ($hdate > $maxdate[$person_id]) {
53
+                $maxdate[$person_id] = $hdate;
54
+            }
50 55
         }
51 56
 
52 57
         # Fetch details of all the speakers
@@ -80,8 +85,9 @@  discard block
 block discarded – undo
80 85
                 $dept = $row['dept'];
81 86
                 $posn = $row['position'];
82 87
                 $moffice_id = $row['moffice_id'];
83
-                if ($dept && $row['to_date'] == '9999-12-31')
84
-                    $speakers[$pid]['office'][$moffice_id] = prettify_office($posn, $dept);
88
+                if ($dept && $row['to_date'] == '9999-12-31') {
89
+                                    $speakers[$pid]['office'][$moffice_id] = prettify_office($posn, $dept);
90
+                }
85 91
                 if (!isset($speakers[$pid]['name'])) {
86 92
                     $speakers[$pid]['name'] = $full_name . ($house==1?' MP':'');
87 93
                 }
@@ -139,7 +145,9 @@  discard block
 block discarded – undo
139 145
      */
140 146
 
141 147
     public static function searchMemberDbLookup($searchstring, $current_only=false) {
142
-        if (!$searchstring) return false;
148
+        if (!$searchstring) {
149
+            return false;
150
+        }
143 151
         $searchwords = explode(' ', $searchstring, 3);
144 152
         $params = array();
145 153
         if (count($searchwords) == 1) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
                 if ($dept && $row['to_date'] == '9999-12-31')
84 84
                     $speakers[$pid]['office'][$moffice_id] = prettify_office($posn, $dept);
85 85
                 if (!isset($speakers[$pid]['name'])) {
86
-                    $speakers[$pid]['name'] = $full_name . ($house==1?' MP':'');
86
+                    $speakers[$pid]['name'] = $full_name . ($house == 1 ? ' MP' : '');
87 87
                 }
88
-                if ( !isset($speakers[$pid]['party']) && $party ) {
88
+                if (!isset($speakers[$pid]['party']) && $party) {
89 89
                     $speakers[$pid]['party'] = $party;
90 90
                 }
91 91
             }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * Return query result from looking for MPs
139 139
      */
140 140
 
141
-    public static function searchMemberDbLookup($searchstring, $current_only=false) {
141
+    public static function searchMemberDbLookup($searchstring, $current_only = false) {
142 142
         if (!$searchstring) return false;
143 143
         $searchwords = explode(' ', $searchstring, 3);
144 144
         $params = array();
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
             // And here we're assuming the user's put the names in the right order.
151 151
             $params[':like_0'] = '%' . $searchwords[0] . '%';
152 152
             $params[':like_1'] = '%' . $searchwords[1] . '%';
153
-            $params[':like_0_and_1'] = '%' . $searchwords[0] . ' '. $searchwords[1] . '%';
154
-            $params[':like_0_and_1_hyphen'] = '%' . $searchwords[0] . '-'. $searchwords[1] . '%';
153
+            $params[':like_0_and_1'] = '%' . $searchwords[0] . ' ' . $searchwords[1] . '%';
154
+            $params[':like_0_and_1_hyphen'] = '%' . $searchwords[0] . '-' . $searchwords[1] . '%';
155 155
             $where = "(given_name LIKE :like_0 AND family_name LIKE :like_1)";
156 156
             $where .= " OR (given_name LIKE :like_1 AND family_name LIKE :like_0)";
157 157
             $where .= " OR (title LIKE :like_0 AND family_name LIKE :like_1)";
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
             $params[':like_0'] = '%' . $searchwords[0] . '%';
167 167
             $params[':like_1'] = '%' . $searchwords[1] . '%';
168 168
             $params[':like_2'] = '%' . $searchwords[2] . '%';
169
-            $params[':like_0_and_1'] = '%' . $searchwords[0] . ' '. $searchwords[1] . '%';
170
-            $params[':like_1_and_2'] = '%' . $searchwords[1] . ' '. $searchwords[2] . '%';
171
-            $params[':like_1_and_2_hyphen'] = '%' . $searchwords[1] . '-'. $searchwords[2] . '%';
169
+            $params[':like_0_and_1'] = '%' . $searchwords[0] . ' ' . $searchwords[1] . '%';
170
+            $params[':like_1_and_2'] = '%' . $searchwords[1] . ' ' . $searchwords[2] . '%';
171
+            $params[':like_1_and_2_hyphen'] = '%' . $searchwords[1] . '-' . $searchwords[2] . '%';
172 172
             $where = "(given_name LIKE :like_0_and_1 AND family_name LIKE :like_2)";
173 173
             $where .= " OR (given_name LIKE :like_0 AND family_name LIKE :like_1_and_2)";
174 174
             $where .= " OR (given_name LIKE :like_0 AND family_name LIKE :like_1_and_2_hyphen)";
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         return $q;
184 184
     }
185 185
 
186
-    public static function searchMemberDbLookupWithNames($searchstring, $current_only=false) {
186
+    public static function searchMemberDbLookupWithNames($searchstring, $current_only = false) {
187 187
         $q = self::searchMemberDbLookup($searchstring, $current_only);
188 188
 
189 189
         if (!$q->rows()) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             // Looks like a postcode - can we find the constituency?
239 239
             $constituency = Postcode::postcodeToConstituency($searchterm);
240 240
             if ($constituency) {
241
-                return array( array($constituency), true );
241
+                return array(array($constituency), true);
242 242
             }
243 243
         }
244 244
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             $constituencies[] = $row['name'];
257 257
         }
258 258
 
259
-        return array( $constituencies, false );
259
+        return array($constituencies, false);
260 260
     }
261 261
 
262 262
     /**
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $speakers = [];
273 273
 
274 274
         foreach ($criteria as $c) {
275
-            if (preg_match('#^speaker:(\d+)#',$c,$m)) {
275
+            if (preg_match('#^speaker:(\d+)#', $c, $m)) {
276 276
                 $MEMBER = new \MEMBER(array('person_id'=>$m[1]));
277 277
                 $speakers[$m[1]] = $MEMBER->full_name();
278 278
             }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     public static function speakerIDsToNames($searchstring) {
292 292
         $speakers = self::speakerNamesForIDs($searchstring);
293 293
 
294
-        foreach ( $speakers as $id => $name ) {
294
+        foreach ($speakers as $id => $name) {
295 295
             $searchstring = str_replace('speaker:' . $id, "speaker:$name", $searchstring);
296 296
         }
297 297
 
Please login to merge, or discard this patch.