Failed Conditions
Pull Request — master (#1327)
by Nick
69:15 queued 59:17
created
www/docs/admin/reporting_stats.php 1 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
 
8 8
 $PAGE->page_start();
9 9
 $PAGE->stripe_start();
10
-$PAGE->block_start(array ('id'=>'alerts', 'title'=>'Reporting Statistics'));
10
+$PAGE->block_start(array('id'=>'alerts', 'title'=>'Reporting Statistics'));
11 11
 $db = new ParlDB;
12 12
 $q = $db->query('select year(created) as the_year, month(created) as the_month, count(*) as c from alerts where confirmed and not deleted group by year(created) desc, month(created) desc');
13 13
 print '<h3>Alert signups per month</h3> <table>';
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 print '<thead><tr><th>Year</th><th style="padding-right: 15px;">Month</th><th>Sign Ups</th><tr></thead>';
17 17
 
18 18
 $row_count = $q->rows();
19
-for ($i=0; $i<$row_count; $i++) {
19
+for ($i = 0; $i < $row_count; $i++) {
20 20
     $year = $q->field($i, 'the_year');
21 21
     $month = $q->field($i, 'the_month');
22 22
     $count = $q->field($i, 'c');
Please login to merge, or discard this patch.
www/docs/admin/statistics.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
 <p>There are <b><?=number_format($debate_speeches)?></b> debate speeches (<?=number_format($debate_items)?> items including headers).
39 39
 <br>There are <b><?=number_format($wrans_questions)?></b> written questions (<?=number_format($wrans_items)?> items including headers and answers).
40 40
 
41
-<!-- Debate items / in-session day: <?=round($debate_items/$uniquedates,0)?>
42
-Wrans items / in-session day: <?=round($wrans_items/$uniquedates,0)?> -->
41
+<!-- Debate items / in-session day: <?=round($debate_items / $uniquedates, 0)?>
42
+Wrans items / in-session day: <?=round($wrans_items / $uniquedates, 0)?> -->
43 43
 
44
-<p>Per sitting day, MPs are producing <b><?=round($debate_speeches/$uniquedates,0)?></b> speeches, and <b><?=round($wrans_questions/$uniquedates,0)?></b> written answers.
44
+<p>Per sitting day, MPs are producing <b><?=round($debate_speeches / $uniquedates, 0)?></b> speeches, and <b><?=round($wrans_questions / $uniquedates, 0)?></b> written answers.
45 45
 </p>
46 46
 
47 47
 <?php
Please login to merge, or discard this patch.
www/docs/search-hansard/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $DATA->set_page_metadata($this_page, 'title', 'Hansard');
8 8
 $DATA->set_page_metadata($this_page, 'meta_description',
9
-             'Find the complete Hansard on TheyWorkForYou.com - transcripts from all UK parliamentary debates in easily-searchable form.');
9
+                'Find the complete Hansard on TheyWorkForYou.com - transcripts from all UK parliamentary debates in easily-searchable form.');
10 10
 $DATA->set_page_metadata($this_page, 'meta_keywords', "hansard, search hansard, hansard transcriptions, hansard record, parliamentary transcripts, parliament transcripts, parliament records, uk hansard, hansard uk, house of commons transcript, house of commons debates, house of commons records");
11 11
 
12 12
 $PAGE->supress_heading = true;
Please login to merge, or discard this patch.
www/docs/mps/multiple.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
 
29 29
 function out($h1, $h2, $title) {
30 30
     global $out;
31
-    if (!isset($out[$h1][$h2])) return;
31
+    if (!isset($out[$h1][$h2])) {
32
+        return;
33
+    }
32 34
     print "<h3>$title</h3>\n<ul>\n";
33 35
     foreach ($out[$h1][$h2] as $m) {
34 36
         print '<li><a href="' . $m->url() . '">' . $m->full_name() . "</a></li>\n";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     from member as m1, member as m2
13 13
     where m1.person_id = m2.person_id and m1.house != m2.house and m1.house < m2.house
14 14
         and m1.left_house='9999-12-31' and m2.left_house='9999-12-31'");
15
-for ($i=0; $i<$q->rows(); $i++) {
15
+for ($i = 0; $i < $q->rows(); $i++) {
16 16
     $pid = $q->field($i, 'person_id');
17 17
     $member = new MEMBER(array('person_id' => $pid));
18 18
     $h1 = $q->field($i, 'house1');
Please login to merge, or discard this patch.
www/docs/parliament/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $DATA->set_page_metadata($this_page, 'title', 'Parliament');
8 8
 $DATA->set_page_metadata($this_page, 'meta_description',
9
-             'What goes on in Parliament? Up-to-the-minute records on all MPs, debates, speeches and statements from the House of Commons, House of Lords, Scottish Parliament, and Northern Ireland Assembly.');
9
+                'What goes on in Parliament? Up-to-the-minute records on all MPs, debates, speeches and statements from the House of Commons, House of Lords, Scottish Parliament, and Northern Ireland Assembly.');
10 10
 $DATA->set_page_metadata($this_page, 'meta_keywords', 'parliament, uk parliament, parliamentary, house of commons, house commons, house of lords, house lords, house of parliament, parliment, houses parliament, parliament uk, member of parliament, welsh assembly, scottish parliament, the parliament, house of parliment, houses of parliment, parliment uk, uk parliment, houses of parliament, parliament houses, parliament of uk, parliament in uk, the house of parliament, scottish parliment, members of parliament, parliament members, scotish parliament, parliament scottish, the house of commons, british parliament, what is parliament, the house of lords, the scottish parliament, london parliament, parliament london, the houses of parliament, english parliament, northern ireland parliament, the british parliament, northern ireland assembly, history of parliament, parliament history, parliament of england, england parliament');
11 11
 
12 12
 $PAGE->supress_heading = true;
Please login to merge, or discard this patch.
www/docs/news/home_page_include.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
 
8 8
 $c = 0;
9 9
 foreach ($all_news as $id => $news_row) {
10
-    if ($c++ == 2) break;
10
+    if ($c++ == 2) {
11
+        break;
12
+    }
11 13
     list($title, $content, $date) = $news_row;
12 14
     $url = news_individual_link($date, $title);
13 15
     print "<h5><a href=\"$url\">" . $title . "</a></h5>";
Please login to merge, or discard this patch.
www/docs/news/rdf.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@  discard block
 block discarded – undo
25 25
 <?php
26 26
     $c = 0;
27 27
     foreach ($all_news as $id => $news_row) {
28
-        if ($c++ == 10) break;
28
+        if ($c++ == 10) {
29
+            break;
30
+        }
29 31
         list($title, $content, $date) = $news_row;
30 32
         $url = "https://www.theyworkforyou.com".news_individual_link($date, $title);
31 33
         print "<rdf:li rdf:resource=\"$url\" />\n";
@@ -39,7 +41,9 @@  discard block
 block discarded – undo
39 41
 <?php
40 42
     $c = 0;
41 43
     foreach ($all_news as $id => $news_row) {
42
-        if ($c++ == 10) break;
44
+        if ($c++ == 10) {
45
+            break;
46
+        }
43 47
         list($title, $content, $date) = $news_row;
44 48
         $url = "https://www.theyworkforyou.com".news_individual_link($date, $title);
45 49
         $excerpt = trim_characters(news_format_body($content), 0, 250);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     foreach ($all_news as $id => $news_row) {
28 28
         if ($c++ == 10) break;
29 29
         list($title, $content, $date) = $news_row;
30
-        $url = "https://www.theyworkforyou.com".news_individual_link($date, $title);
30
+        $url = "https://www.theyworkforyou.com" . news_individual_link($date, $title);
31 31
         print "<rdf:li rdf:resource=\"$url\" />\n";
32 32
     }
33 33
 ?>
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     foreach ($all_news as $id => $news_row) {
42 42
         if ($c++ == 10) break;
43 43
         list($title, $content, $date) = $news_row;
44
-        $url = "https://www.theyworkforyou.com".news_individual_link($date, $title);
44
+        $url = "https://www.theyworkforyou.com" . news_individual_link($date, $title);
45 45
         $excerpt = trim_characters(news_format_body($content), 0, 250);
46 46
         $date = str_replace(" ", "T", $date) . "+00:00";
47 47
 ?>
Please login to merge, or discard this patch.
www/docs/api/api_getAlerts.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function api_getAlerts_start_date($start_date) {
4
-  $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date'));
5
-  $alert = new ALERT();
6
-  $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']);
7
-  api_output($data);
4
+    $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date'));
5
+    $alert = new ALERT();
6
+    $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']);
7
+    api_output($data);
8 8
 }
9 9
 
10 10
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function api_getAlerts_start_date($start_date) {
4
-  $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date'));
4
+  $args = array('start_date' => $start_date, 'end_date' => get_http_var('end_date'));
5 5
   $alert = new ALERT();
6
-  $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']);
6
+  $data = $alert->fetch_between($confirmed = 1, $deleted = 0, $args['start_date'], $args['end_date']);
7 7
   api_output($data);
8 8
 }
9 9
 
Please login to merge, or discard this patch.
www/docs/api/api_getComments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 function api_getComments_start_date($start_date) {
27
-        $args = array (
27
+        $args = array(
28 28
             'start_date' => $start_date,
29 29
             'end_date' => get_http_var('end_date')
30 30
         );
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 function api_getComments_search($s) {
36
-        $args = array (
36
+        $args = array(
37 37
             's' => $s,
38 38
             'p' => get_http_var('page'),
39 39
             'num' => get_http_var('num'),
Please login to merge, or discard this patch.