Passed
Push — master ( 4c090a...f12e7b )
by Struan
06:21
created
www/docs/addcomment/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             'posted' => date('Y-m-d H:i:s', time()),
67 67
             'modflagged' => null,
68 68
             'visible' => 1,
69
-            'preview' => true,	// Extra tag so we know this is just a preview.
69
+            'preview' => true, // Extra tag so we know this is just a preview.
70 70
         ];
71 71
 
72 72
         $COMMENTLIST = new COMMENTLIST();
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/register/_register_field.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,14 @@
 block discarded – undo
12 12
         <?php $detail = $upper_detail; ?>
13 13
     </ul>
14 14
     </li>
15
-<?php else : ?>
15
+<?php else {
16
+    : ?>
16 17
     <li class="interest-detail">
17 18
     <?php if ($detail->has_value()): ?>
18 19
         <span class="interest-detail-name"><?= $detail->display_as ?>: </span>
19 20
         <span class="interest-detail-value"><?= htmlspecialchars($detail->value) ?></span>
20
-    <?php endif; ?>
21
+    <?php endif;
22
+}
23
+?>
21 24
     </li>
22 25
 <?php endif; ?>
23 26
\ No newline at end of file
Please login to merge, or discard this patch.
classes/GlossaryView/AtoZView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $url->insert(['gl' => $glossary->next_term['glossary_id']]);
46 46
         $next_link = $url->generate('url');
47 47
 
48
-        $nextprev =  [
48
+        $nextprev = [
49 49
             'next'	=>  [
50 50
                 'url'	=> $next_link,
51 51
                 'title'	=> 'Next term',
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/mp/memberships.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,10 @@
 block discarded – undo
92 92
                                                             E-mail correspondence with APPG
93 93
                                                         <?php } ?>
94 94
                                                     </li>
95
-                                                    <li><span class="appg-property-label">APPG Website:</span> <?php if ($membership->appg->website): ?><a href="<?= $membership->appg->website ?>"><?= $membership->appg->website ?></a><?php else: ?>N/A<?php endif; ?></li>
95
+                                                    <li><span class="appg-property-label">APPG Website:</span> <?php if ($membership->appg->website): ?><a href="<?= $membership->appg->website ?>"><?= $membership->appg->website ?></a><?php else {
96
+    : ?>N/A<?php endif;
97
+}
98
+?></li>
96 99
                                                     <li><span class="appg-property-label">APPG register:</span> <a href="<?= $membership->appg->source_url ?>">Parliament website</a></li>
97 100
                                                 </ul>
98 101
                                             </div>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/glossary/addterm_matches.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
             <p>It seems we already have <?= ngettext('a definition', 'some definitions', $glossary->num_search_matches) ?> for that. Would you care to see <?= ngettext('it', 'them', $glossary->num_search_matches) ?>?</p>
22 22
             <ul class="glossary">
23 23
             <?php
24
-              foreach ($glossary->search_matches as $match) {
25
-                  $URL = new \MySociety\TheyWorkForYou\Url('glossary');
26
-                  $URL->insert(['gl' => $match['glossary_id']]);
27
-                  $URL->remove(['g']);
28
-                  $term_link = $URL->generate('url');
29
-                  ?>
24
+                foreach ($glossary->search_matches as $match) {
25
+                    $URL = new \MySociety\TheyWorkForYou\Url('glossary');
26
+                    $URL->insert(['gl' => $match['glossary_id']]);
27
+                    $URL->remove(['g']);
28
+                    $term_link = $URL->generate('url');
29
+                    ?>
30 30
                   <li>
31 31
                     <a href="<?= $term_link ?>"><?= $match['title']?></a>
32 32
                   </li>
Please login to merge, or discard this patch.
classes/GlossaryView/TermView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $url->insert(['gl' => $glossary->next_term['glossary_id']]);
46 46
         $next_link = $url->generate('url');
47 47
 
48
-        $nextprev =  [
48
+        $nextprev = [
49 49
             'next'	=>  [
50 50
                 'url'	=> $next_link,
51 51
                 'title'	=> 'Next term',
Please login to merge, or discard this patch.
www/includes/easyparliament/page.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 $THISPAGE = new \MySociety\TheyWorkForYou\Url($this_page);
52 52
 
53 53
                 $LOGINURL = new \MySociety\TheyWorkForYou\Url('userlogin');
54
-                $LOGINURL->insert(['ret' => $THISPAGE->generate('none') ]);
54
+                $LOGINURL->insert(['ret' => $THISPAGE->generate('none')]);
55 55
 
56 56
                 $text = "<a href=\"" . $LOGINURL->generate() . '">' . gettext('You’d better sign in!') . '</a>';
57 57
             } else {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         if (is_string($message)) {
392 392
             // Sometimes we're just sending a single line to this function
393 393
             // rather like the bigger array...
394
-            $message =  [
394
+            $message = [
395 395
                 'text' => $message,
396 396
             ];
397 397
         }
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
             if (!isset($page_errors)) {
406 406
                 $page_errors = [];
407 407
             }
408
-            $page_errors[]  = $message;
408
+            $page_errors[] = $message;
409 409
         }
410 410
 
411 411
         if ($fatal) {
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
 
1023 1023
                 $body = trim_characters($report['body'], 0, 40);
1024 1024
 
1025
-                $tabledata['rows'][] =  [
1025
+                $tabledata['rows'][] = [
1026 1026
                     _htmlentities($report['firstname'] . ' ' . $report['lastname']),
1027 1027
                     _htmlentities($body),
1028 1028
                     $report['reported'],
@@ -1104,11 +1104,11 @@  discard block
 block discarded – undo
1104 1104
         // Returns HTML suitable for putting in the sidebar on Admin pages.
1105 1105
         global $this_page, $DATA;
1106 1106
 
1107
-        $pages =  ['admin_home',
1107
+        $pages = ['admin_home',
1108 1108
             'admin_comments', 'admin_searchlogs', 'admin_popularsearches', 'admin_failedsearches',
1109 1109
             'alert_stats', 'admin_statistics', 'admin_reportstats',
1110 1110
             'admin_commentreports', 'admin_glossary', 'admin_glossary_pending', 'admin_badusers',
1111
-            'admin_profile_message', 'admin_photos', 'admin_mpurls', 'admin_policies', 'admin_banner', 'admin_announcement','admin_featured', 'admin_topics',
1111
+            'admin_profile_message', 'admin_photos', 'admin_mpurls', 'admin_policies', 'admin_banner', 'admin_announcement', 'admin_featured', 'admin_topics',
1112 1112
             'admin_wikipedia',
1113 1113
         ];
1114 1114
 
Please login to merge, or discard this patch.
tests/CommentTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         $commentId = $comment->create($data);
134 134
 
135
-        $page = $this->fetch_page([ 'type' => 'debates', 'id' => '2014-01-01b.1.2' ]);
135
+        $page = $this->fetch_page(['type' => 'debates', 'id' => '2014-01-01b.1.2']);
136 136
         $this->assertStringContainsString('This is a...', $page);
137 137
 
138 138
         $THEUSER->_update([
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             'organisation' => '',
147 147
         ]);
148 148
 
149
-        $page = $this->fetch_page([ 'type' => 'debates', 'id' => '2014-01-01b.1.2' ]);
149
+        $page = $this->fetch_page(['type' => 'debates', 'id' => '2014-01-01b.1.2']);
150 150
         $this->assertStringNotContainsString('This is a...', $page);
151 151
     }
152 152
 
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
 
170 170
         self::$db->query("UPDATE comments SET user_id = 2 WHERE comment_id = $commentId");
171 171
 
172
-        $page = $this->fetch_page([ 'type' => 'debates', 'id' => '2014-01-01b.1.2' ]);
172
+        $page = $this->fetch_page(['type' => 'debates', 'id' => '2014-01-01b.1.2']);
173 173
         $this->assertStringNotContainsString('This is a...', $page);
174 174
 
175 175
         self::$db->query("UPDATE comments SET posted = '2024-10-09 12:42:11' WHERE comment_id = $commentId");
176 176
 
177
-        $page = $this->fetch_page([ 'type' => 'debates', 'id' => '2014-01-01b.1.2' ]);
177
+        $page = $this->fetch_page(['type' => 'debates', 'id' => '2014-01-01b.1.2']);
178 178
         $this->assertStringContainsString('This is a...', $page);
179 179
     }
180 180
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/alert/_mp_alert_form.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
   <h3><?= sprintf(gettext('Sign up for alerts when people matching <i>%s</i> speaks'), _htmlspecialchars($search_term)) ?></h3>
21 21
   <ul>
22 22
     <?php
23
-      foreach ($members as $row) {
24
-          ?>
23
+        foreach ($members as $row) {
24
+            ?>
25 25
       <li>
26 26
           <form action="<?= $actionurl ?>" method="post">
27 27
               <input type="hidden" name="t" value="<?= _htmlspecialchars($token) ?>">
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
               <input type="hidden" name="ignore_speaker_votes" value="<?= $ignore_speaker_votes ?>">
31 31
               <?php
32 32
                     $name = member_full_name($row['house'], $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']);
33
-          if ($row['constituency']) {
34
-              $name .= ' (' . gettext($row['constituency']) . ')';
35
-          }
36
-          printf(gettext('When %s speaks.'), $name);
37
-          ?>
33
+            if ($row['constituency']) {
34
+                $name .= ' (' . gettext($row['constituency']) . ')';
35
+            }
36
+            printf(gettext('When %s speaks.'), $name);
37
+            ?>
38 38
               <input type="submit" class="button small" value="<?= gettext('Subscribe') ?>"></form>
39 39
           </form>
40 40
       </li>
Please login to merge, or discard this patch.