Passed
Pull Request — master (#1932)
by Struan
04:54
created
www/includes/easyparliament/page.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -816,16 +816,14 @@
 block discarded – undo
816 816
 
817 817
         if (isset($args['blankform']) && $args['blankform'] == 1) {
818 818
             $formcontent = "";
819
-        }
820
-        else {
819
+        } else {
821 820
             $formcontent = _htmlentities(get_http_var('g'));
822 821
         }
823 822
 
824 823
         if ($THEUSER->isloggedin()) {
825 824
             $URL = new \MySociety\TheyWorkForYou\Url($args['action']);
826 825
             $URL->remove(array('g'));
827
-        }
828
-        else {
826
+        } else {
829 827
             $URL = new \MySociety\TheyWorkForYou\Url('userprompt');
830 828
             $URL->remove(array('g'));
831 829
             $type = "<input type=\"hidden\" name=\"type\" value=\"2\">";
Please login to merge, or discard this patch.
www/docs/addlink/index.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
     // We're searching for something.
15 15
     $args['s'] = filter_user_input(get_http_var('g'), 'strict');
16 16
     $GLOSSARY = new GLOSSARY($args);
17
-}
18
-else {
17
+} else {
19 18
     $args['sort'] = "regexp_replace";
20 19
     $GLOSSARY = new GLOSSARY($args);
21 20
     $args['s'] = filter_user_input(get_http_var('g'), 'strict');
@@ -86,13 +85,11 @@  discard block
 block discarded – undo
86 85
             if ($args['count']) {
87 86
                 // Display the Add definition form
88 87
                 $PAGE->glossary_add_link_form($args);
89
-            }
90
-            else {
88
+            } else {
91 89
                 print "<h4>No dice!</h4><p>Much as we'd love you to add a definition for <strong></strong>, it doesn't seem to appear in hansard at all...</p>";
92 90
                 $PAGE->glossary_links();
93 91
             }
94
-        }
95
-        else {
92
+        } else {
96 93
             print "<h4>Humdinger!</h4><p>it would appear that you aren't allowed to add glossary terms. How odd...</p>";
97 94
             $PAGE->glossary_links();
98 95
         }
Please login to merge, or discard this patch.
www/docs/parsing/index.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,16 +36,21 @@  discard block
 block discarded – undo
36 36
     $out = array();
37 37
     $dh = opendir("$html$bit/");
38 38
     while (false !== ($filename = readdir($dh))) {
39
-        if (substr($filename, -5)!='.html' || substr($filename, -8, 3)=='tmp') continue;
39
+        if (substr($filename, -5)!='.html' || substr($filename, -8, 3)=='tmp') {
40
+            continue;
41
+        }
40 42
         #if ($bit=='lordspages' && substr($filename,7,4)!='2005') continue;
41 43
         preg_match('#^(.*?)(\d\d\d\d-\d\d-\d\d)(.*?)\.#', $filename, $m);
42 44
         $part = ucfirst($m[1]); $date = $m[2]; $version = $m[3];
43
-        if (!isset($out[$date])) $out[$date] = array();
45
+        if (!isset($out[$date])) {
46
+            $out[$date] = array();
47
+        }
44 48
         $stat = stat("$html$bit/$filename");
45 49
         $base = substr($filename, 0, -5);
46 50
         if (!is_file("$xml$bit/$base.xml")) {
47
-            if ($date>'2001-05-11')
48
-                $out[$date][] = "<li>$date : $part version $version, size $stat[7] bytes, last modified ".date('Y-m-d H:i:s', $stat[9])."</li>\n";
51
+            if ($date>'2001-05-11') {
52
+                            $out[$date][] = "<li>$date : $part version $version, size $stat[7] bytes, last modified ".date('Y-m-d H:i:s', $stat[9])."</li>\n";
53
+            }
49 54
         } else {
50 55
             if (!array_key_exists($date, $hdates) || !array_key_exists($majors[$k], $hdates[$date])) {
51 56
                 $notloaded .= "<li>$date : $part version $version</li>\n";
@@ -66,7 +71,9 @@  discard block
 block discarded – undo
66 71
 <p>Note this currently only works for new data - ie. if there's any data at all
67 72
 in the database for the date, it won't appear hear</p>
68 73
 <?php
69
-if ($notloaded) print "<ul>$notloaded</ul>";
74
+if ($notloaded) {
75
+    print "<ul>$notloaded</ul>";
76
+}
70 77
 
71 78
 $PAGE->stripe_end();
72 79
 $PAGE->page_end();
Please login to merge, or discard this patch.