Failed Conditions
Pull Request — master (#1325)
by Nick
26:10 queued 21:10
created
www/includes/easyparliament/templates/html/comments_user.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,20 +39,20 @@
 block discarded – undo
39 39
 
40 40
         // Get the name of the member whose epobject was commented upon (if any).
41 41
         if (isset($comment['speaker']) && $comment['speaker']['name'] != '') {
42
-            $member_name = $comment['speaker']['name'] . ': ';
42
+            $member_name = $comment['speaker']['name'].': ';
43 43
         } else {
44 44
             $member_name = '';
45 45
         }
46 46
 
47
-        $user_name = _htmlentities($comment['firstname'] . ' ' . $comment['lastname']);
47
+        $user_name = _htmlentities($comment['firstname'].' '.$comment['lastname']);
48 48
 
49 49
         // We're grouping things by epobject_id, so we're going to display the number
50 50
         // of comments on this epobject.
51 51
         $plural = $comment['total_comments'] == 1 ? ' annotation' : ' annotations';
52 52
 
53
-        echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>" . $member_name . $hansardtext . "</strong><br>\n";
53
+        echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>".$member_name.$hansardtext."</strong><br>\n";
54 54
         echo "\t\t\t\t<small>(posted on $date)</small><br>\n";
55
-        echo "\t\t\t\t" . prepare_comment_for_display($comment['body']) . "</p>"; ?>
55
+        echo "\t\t\t\t".prepare_comment_for_display($comment['body'])."</p>"; ?>
56 56
 
57 57
 <?php
58 58
         $PAGE->stripe_end();
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/calendar_date.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
         print "<h2 class='calendar'>$chamber";
26 26
         if (in_array($major[$i], $data['majors'])) {
27 27
             $URL = new URL($hansardmajors[$major[$i]]['page_all']);
28
-            $URL->insert( array( 'd' => $date ) );
29
-            print ' &nbsp; <a href="' . $URL->generate() . '">See this day &rarr;</a>';
28
+            $URL->insert(array('d' => $date));
29
+            print ' &nbsp; <a href="'.$URL->generate().'">See this day &rarr;</a>';
30 30
         }
31 31
         print "</h2>\n";
32 32
         print $list[$i] ? "<ul class='calendar'>\n" : "<dl class='calendar'>\n";
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,10 +18,13 @@
 block discarded – undo
18 18
 # Content goes here
19 19
 foreach ($data['dates'] as $date => $day_events) {
20 20
     foreach ($order as $i => $chamber) {
21
-        if (!array_key_exists($chamber, $day_events))
22
-            continue;
21
+        if (!array_key_exists($chamber, $day_events)) {
22
+                    continue;
23
+        }
23 24
         $events = $day_events[$chamber];
24
-        if ($plural[$i]) $chamber .= 's';
25
+        if ($plural[$i]) {
26
+            $chamber .= 's';
27
+        }
25 28
         print "<h2 class='calendar'>$chamber";
26 29
         if (in_array($major[$i], $data['majors'])) {
27 30
             $URL = new URL($hansardmajors[$major[$i]]['page_all']);
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/scotland/index.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
                 </div>
12 12
                 <div class="row">
13 13
                     <div class="medium-9 columns">
14
-                    <?php if ( count($data['regional']) > 0 ) { ?>
14
+                    <?php if (count($data['regional']) > 0) { ?>
15 15
                         <ul class="homepage-rep-list">
16 16
                         <li>Your Regional MSPs:</li>
17
-                        <?php foreach ( $data['regional'] as $msp ) { ?>
17
+                        <?php foreach ($data['regional'] as $msp) { ?>
18 18
                             <li class="homepage-rep-list__rep"><a href="/msp/?p=<?= $msp['person_id'] ?>"><?= $msp['name'] ?></a></li>
19 19
                         <?php } ?>
20 20
                         </ul>
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
             <div class="panel panel--flushtop clearfix">
58 58
                 <div class="row nested-row">
59 59
                     <div class="homepage-in-the-news homepage-content-section">
60
-                        <?php if ( $featured ) {
61
-                             include dirname(__FILE__) . "/../homepage/featured.php";
60
+                        <?php if ($featured) {
61
+                             include dirname(__FILE__)."/../homepage/featured.php";
62 62
                         } ?>
63 63
                     </div>
64 64
                     <div class="homepage-create-alert homepage-content-section">
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
                     <div class="homepage-recently homepage-content-section">
103 103
                         <h2>Recently in Parliament</h2>
104 104
                         <ul class="recently__list"><?php
105
-                            foreach ( $debates['recent'] as $recent ) {
106
-                                include dirname(__FILE__) . '/../homepage/recent-debates.php';
105
+                            foreach ($debates['recent'] as $recent) {
106
+                                include dirname(__FILE__).'/../homepage/recent-debates.php';
107 107
                             }
108 108
                         ?></ul>
109 109
                     </div>
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                 <div class="row nested-row">
42 42
                     <div class="homepage-in-the-news homepage-content-section">
43 43
                         <?php if ( $featured ) {
44
-                             include dirname(__FILE__) . "/../homepage/featured.php";
44
+                                include dirname(__FILE__) . "/../homepage/featured.php";
45 45
                         } ?>
46 46
                     </div>
47 47
                     <div class="homepage-create-alert homepage-content-section">
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/hansard_search_video.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,28 +24,28 @@
 block discarded – undo
24 24
     foreach ($data['rows'] as $n => $row) {
25 25
         echo '<dt>';
26 26
         if (isset($row['parent']) && count($row['parent']) > 0) {
27
-            echo ('<strong>' . $row['parent']['body'] . '</strong>');
27
+            echo ('<strong>'.$row['parent']['body'].'</strong>');
28 28
         }
29 29
         echo '</dt> <dd>';
30 30
         if (isset($row['speaker']) && count($row['speaker'])) {
31
-            echo "<em>" . ucfirst($row['speaker']['name']) . "</em>: ";
31
+            echo "<em>".ucfirst($row['speaker']['name'])."</em>: ";
32 32
         }
33 33
 
34
-        echo '&#8220;' . $row['extract'] . "&#8221;</dd>\n";
34
+        echo '&#8220;'.$row['extract']."&#8221;</dd>\n";
35 35
         echo '<dd><em><small>This speech is ';
36
-        if ($row['hpos']-$want['hpos']>0) {
37
-            echo ($row['hpos']-$want['hpos']) . ' later than';
36
+        if ($row['hpos'] - $want['hpos'] > 0) {
37
+            echo ($row['hpos'] - $want['hpos']).' later than';
38 38
         } else {
39
-            echo ($want['hpos']-$row['hpos']) . ' earlier than';
39
+            echo ($want['hpos'] - $row['hpos']).' earlier than';
40 40
         }
41 41
         echo ' the one you want &ndash; ';
42
-        if ($row['video_status']&8 || !($row['video_status']&1)) {
42
+        if ($row['video_status'] & 8 || !($row['video_status'] & 1)) {
43 43
             echo ' it doesn\'t have any video';
44
-        } elseif ($row['video_status']&4) {
44
+        } elseif ($row['video_status'] & 4) {
45 45
             echo ' it has already been matched';
46
-        } elseif ($row['video_status']&1) {
46
+        } elseif ($row['video_status'] & 1) {
47 47
             # Only for Commons currently
48
-            echo ' if you prefer, <a target="_top" onclick="t = parent.document[\'video\'].currentTime(); this.href += t;" href="/video/?gid=debate/' . $row['gid'] . '&amp;file=' . $want['file'] . '&amp;start=">switch to matching this speech instead</a>';
48
+            echo ' if you prefer, <a target="_top" onclick="t = parent.document[\'video\'].currentTime(); this.href += t;" href="/video/?gid=debate/'.$row['gid'].'&amp;file='.$want['file'].'&amp;start=">switch to matching this speech instead</a>';
49 49
         }
50 50
         echo '</small></em></dd>';
51 51
     }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/trackbacks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 if (count($data) > 0) {
39 39
 
40 40
     if ($info['view'] == 'recent') {
41
-        $title = $info['num'] . ' most recent trackbacks';
41
+        $title = $info['num'].' most recent trackbacks';
42 42
     } else {
43 43
         $title = 'Some sites linking to this page';
44 44
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         ?>
65 65
         <dt><a href="<?php echo _htmlentities($trackback['url']); ?>"><?php echo _htmlentities($trackback['title']); ?></a></dt>
66 66
         <dd><?php echo _htmlentities($trackback['excerpt']); ?><br>
67
-            <small>At <?php echo _htmlentities($trackback['blog_name']); ?> on <?php echo $date . ' ' . $time; ?></small>
67
+            <small>At <?php echo _htmlentities($trackback['blog_name']); ?> on <?php echo $date.' '.$time; ?></small>
68 68
         </dd>
69 69
 <?php
70 70
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/vote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             </div>
114 114
 
115 115
              <ul class="debate-speech__meta debate-speech__links">
116
-             <?php if ( $division['debate_url'] ) { ?>
116
+             <?php if ($division['debate_url']) { ?>
117 117
                   <li class="link-to-speech">
118 118
                       <a class="link debate-speech__meta__link" href="<?= $division['debate_url'] ?>">Show full debate</a>
119 119
                   </li>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/_vote_list.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
                     ?>
10 10
                     <ul class="division-list">
11 11
                         <?php foreach ($votes as $vote) {
12
-                          $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']);
13
-                          if ($vote['teller']) {
14
-                              $tellers[] = $voter;
15
-                          } else { ?>
12
+                            $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']);
13
+                            if ($vote['teller']) {
14
+                                $tellers[] = $voter;
15
+                            } else { ?>
16 16
                             <li><?= $voter ?></li>
17 17
                         <?php
18 18
                             }
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/divisions/index.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
           </div>
8 8
           <div class="business-section__primary">
9 9
                <?php
10
-               if ( isset($divisions) && $divisions ) {
11
-                 $current_date = '';
12
-               ?>
10
+                if ( isset($divisions) && $divisions ) {
11
+                    $current_date = '';
12
+                ?>
13 13
                <ul class="business-list">
14 14
                     <?php foreach ($divisions as $division) { ?>
15 15
                     <li id="<?= $division['division_id'] ?>">
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
                         <h3><?= format_date($division['date'], LONGERDATEFORMAT) ?></h3>
19 19
                         </span>
20 20
                         <?php
21
-                          $current_date = $division['date'];
21
+                            $current_date = $division['date'];
22 22
                         } ?>
23 23
                         <a href="/divisions/<?= $division['division_id'] ?>" class="business-list__title">
24 24
                             <h3><?= $division['division_title'] ?></h3>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
           </div>
8 8
           <div class="business-section__primary">
9 9
                <?php
10
-               if ( isset($divisions) && $divisions ) {
10
+               if (isset($divisions) && $divisions) {
11 11
                  $current_date = '';
12 12
                ?>
13 13
                <ul class="business-list">
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                             <br>
30 30
                             <span class="business-list__meta">
31 31
                                 <?= $division['summary'] ?>
32
-                                <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>': '' ?>
32
+                                <?= $division['mp_vote'] !== '' ? '. <b>Your MP, '.$mp_name.', '.$division['mp_vote'].'.</b>' : '' ?>
33 33
                             </span>
34 34
                         </p>
35 35
                     </li>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/comments_recent.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 if (isset($data['comments']) && count($data['comments']) > 0) {
15 15
     $title = 'Most recent annotations';
16 16
     if (isset($data['full_name'])) {
17
-        $title .= ' on things by ' . $data['full_name'];
17
+        $title .= ' on things by '.$data['full_name'];
18 18
     }
19 19
     $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title));
20 20
 
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         $date = format_date($date, SHORTDATEFORMAT);
34 34
         $time = format_time($time, TIMEFORMAT);
35 35
 
36
-        $count = $n+1;
36
+        $count = $n + 1;
37 37
 
38 38
         $USERURL->insert(array('u'=>$comment['user_id']));
39 39
 
40
-        ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'] . ' ' . $comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li>
40
+        ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'].' '.$comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li>
41 41
 <?php
42 42
     }
43 43
     ?>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     if ($this_page == 'home') {
48 48
         $MOREURL = new URL('comments_recent');
49 49
         ?>
50
-                        <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p>
50
+                        <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments']) + 1; ?>">See more annotations posted recently</a></p>
51 51
 <?php
52 52
     }
53 53
     if ($this_page != 'home') $PAGE->page_links($data);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@  discard block
 block discarded – undo
18 18
     }
19 19
     $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title));
20 20
 
21
-    if ($this_page != 'home') $PAGE->page_links($data);
21
+    if ($this_page != 'home') {
22
+        $PAGE->page_links($data);
23
+    }
22 24
     $USERURL = new URL('userview');
23 25
     ?>
24 26
                         <ul>
@@ -50,7 +52,9 @@  discard block
 block discarded – undo
50 52
                         <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p>
51 53
 <?php
52 54
     }
53
-    if ($this_page != 'home') $PAGE->page_links($data);
55
+    if ($this_page != 'home') {
56
+        $PAGE->page_links($data);
57
+    }
54 58
     $PAGE->block_end();
55 59
 }
56 60
 ?>
Please login to merge, or discard this patch.