Passed
Pull Request — master (#1428)
by Nick
06:09
created
www/docs/user/password/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
 
92 92
 
93
-function display_page ($errors=array()) {
93
+function display_page($errors = array()) {
94 94
     global $this_page, $PAGE;
95 95
 
96 96
     if (isset($errors["sending"])) {
Please login to merge, or discard this patch.
www/docs/user/confirm/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
 
70 70
         $PAGE->stripe_end(array(
71
-            array (
71
+            array(
72 72
                 'type'		=> 'include',
73 73
                 'content'	=> 'userconfirmed'
74 74
             )
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
     // The user's first visit to this page, and they have a registration token.
81 81
     // So let's confirm them and hope they get logged in...
82 82
 
83
-    if (get_http_var('c') == 'email' ) {
84
-        $success = $THEUSER->confirm_email( get_http_var('t') );
83
+    if (get_http_var('c') == 'email') {
84
+        $success = $THEUSER->confirm_email(get_http_var('t'));
85 85
     } else {
86
-        $success = $THEUSER->confirm( get_http_var('t') );
86
+        $success = $THEUSER->confirm(get_http_var('t'));
87 87
     }
88 88
 
89 89
     if (!$success) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     $this_page = 'userconfirmfailed';
104 104
 
105
-    if ( !$PAGE->page_started() ) {
105
+    if (!$PAGE->page_started()) {
106 106
         $PAGE->page_start();
107 107
 
108 108
         $PAGE->stripe_start();
Please login to merge, or discard this patch.
www/docs/404.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 <?php
33 33
 
34 34
 $includes = array(
35
-    array (
35
+    array(
36 36
         'type' => 'include',
37 37
         'content' => 'whatisthissite'
38 38
     ),
Please login to merge, or discard this patch.
www/docs/vote/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         voteerror("Your browser must be able to accept cookies before you can register a vote.");
32 32
     } else {
33 33
         // Delete the test cookie.
34
-        setcookie ('testcookie', '');
34
+        setcookie('testcookie', '');
35 35
     }
36 36
     // On with the voting...!
37 37
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     // We need to check the user can accept cookies, so...
41 41
 
42 42
     // Set a cookie
43
-    setcookie ('testcookie', 'true');
43
+    setcookie('testcookie', 'true');
44 44
 
45 45
     $ret = get_http_var('ret');
46 46
     $id = get_http_var('id');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     $PAGE->page_start();
69 69
 
70
-    $message = array (
70
+    $message = array(
71 71
         'title'	=> 'Sorry',
72 72
         'text'	=> $text
73 73
     );
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         $prev_epvotes[] = $epobject_id;
159 159
         $new_cookie = implode('+', $prev_epvotes);
160 160
 
161
-        setcookie ("epvotes", $new_cookie, time()+60*60*24*365, "/", COOKIEDOMAIN);
161
+        setcookie("epvotes", $new_cookie, time() + 60 * 60 * 24 * 365, "/", COOKIEDOMAIN);
162 162
 
163 163
 
164 164
     } else {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 $PAGE->page_start();
191 191
 
192
-$message = array (
192
+$message = array(
193 193
     'title'	=> "Thanks for your vote",
194 194
     'text'	=> "<strong>Would you like to ask a question like this yourself?</strong> Use our <a href=\"http://www.whatdotheyknow.com\">Freedom of Information site</a>."
195 195
 );
Please login to merge, or discard this patch.
www/docs/news/sidebar_archives.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 
13 13
     $ym = substr($date, 0, 7);
14 14
     if ($ym != $last) {
15
-        $url = WEBPATH . "news/archives/".str_replace("-", "/", $ym);
16
-        print "<a href=\"$url\">".format_date($ym."-01", "F Y")."</a>";
15
+        $url = WEBPATH . "news/archives/" . str_replace("-", "/", $ym);
16
+        print "<a href=\"$url\">" . format_date($ym . "-01", "F Y") . "</a>";
17 17
         print "<br>";
18 18
         $last = $ym;
19 19
     }
Please login to merge, or discard this patch.
www/docs/written-answers-and-statements/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 $view = new MySociety\TheyWorkForYou\SectionView\WransView();
12 12
 $data = $view->display();
13 13
 if ($data) {
14
-    if ( $data['template'] ) {
14
+    if ($data['template']) {
15 15
         $template = $data['template'];
16 16
     } else {
17 17
         $template = 'section/section';
Please login to merge, or discard this patch.
www/docs/admin/websites.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $sysretval = 0;
108 108
     $personid = get_http_var('editperson');
109 109
 
110
-    $q  = $db->query("DELETE FROM personinfo WHERE data_key = 'mp_website' AND personinfo.person_id = :person_id", array(
110
+    $q = $db->query("DELETE FROM personinfo WHERE data_key = 'mp_website' AND personinfo.person_id = :person_id", array(
111 111
         ':person_id' => $personid
112 112
         ));
113 113
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     if ($q->success()) {
122 122
         exec($scriptpath . "/db2xml.pl --update_person --personid=" . escapeshellarg($personid) . " --debug", $exec_output);
123 123
         $out = '<p id="warning">';
124
-        foreach ($exec_output as $message) {$out .= $message . "<br>";}
124
+        foreach ($exec_output as $message) {$out .= $message . "<br>"; }
125 125
         $out .= '</p>';
126 126
         # ../../../scripts/db2xml.pl  --update_person --personid=10001
127 127
     }
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 
141 141
     $rettext .= '<div id="subnav_websites">';
142 142
     foreach ($subnav as $label => $path) {
143
-        $rettext .=  '<a href="'. $path . '">'. $label .'</a>';
143
+        $rettext .= '<a href="' . $path . '">' . $label . '</a>';
144 144
     }
145
-    $rettext .=  '</div>';
145
+    $rettext .= '</div>';
146 146
 
147 147
     return $rettext;
148 148
 }
Please login to merge, or discard this patch.
www/docs/admin/popularsearches.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/searchlog.php");
4
+include_once (INCLUDESPATH . "easyparliament/searchlog.php");
5 5
 
6 6
 $this_page = "admin_popularsearches";
7 7
 
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 
15 15
 $rows = array();
16 16
 foreach ($search_popular as $row) {
17
-    $rows[] = array (
18
-        '<a href="'.$row['url'].'">' . _htmlentities($row['query']) . '</a>',
17
+    $rows[] = array(
18
+        '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
19 19
         $row['c'],
20 20
     );
21 21
 }
22 22
 
23
-$tabledata = array (
24
-    'header' => array (
23
+$tabledata = array(
24
+    'header' => array(
25 25
         'Query',
26 26
         'Count'
27 27
     ),
Please login to merge, or discard this patch.
www/docs/admin/searchlogs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/searchlog.php");
4
+include_once (INCLUDESPATH . "easyparliament/searchlog.php");
5 5
 
6 6
 $this_page = "admin_searchlogs";
7 7
 
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
     $host = trim_characters($host, strlen($host) - 25, 100);
19 19
     $time = relative_time($row['query_time']);
20 20
     $time = str_replace(" ago", "", $time);
21
-    $rows[] = array (
22
-        '<a href="'.$row['url'].'">' . _htmlentities($row['query']) . '</a>',
21
+    $rows[] = array(
22
+        '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
23 23
         $row['page_number'],
24 24
         $row['count_hits'],
25 25
         $host,
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     );
28 28
 }
29 29
 
30
-$tabledata = array (
31
-    'header' => array (
30
+$tabledata = array(
31
+    'header' => array(
32 32
         'Query',
33 33
         'Page',
34 34
         'Hits',
Please login to merge, or discard this patch.