Failed Conditions
Pull Request — master (#965)
by Nick
34:10
created
tests/HousesTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Test that the Royal edge-case house is correctly defined.
11 11
      */
12
-	public function testRoyalHouseDefined()
12
+    public function testRoyalHouseDefined()
13 13
     {
14 14
         $this->assertEquals(0, HOUSE_TYPE_ROYAL);
15 15
     }
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * Test that the House of Commons is correctly defined.
19 19
      */
20
-	public function testCommonsHouseDefined()
20
+    public function testCommonsHouseDefined()
21 21
     {
22 22
         $this->assertEquals(1, HOUSE_TYPE_COMMONS);
23 23
     }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * Test that the House of Lords is correctly defined.
27 27
      */
28
-	public function testLordsHouseDefined()
28
+    public function testLordsHouseDefined()
29 29
     {
30 30
         $this->assertEquals(2, HOUSE_TYPE_LORDS);
31 31
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Test that the Northern Ireland Assembly is correctly defined.
35 35
      */
36
-	public function testNIHouseDefined()
36
+    public function testNIHouseDefined()
37 37
     {
38 38
         $this->assertEquals(3, HOUSE_TYPE_NI);
39 39
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Test that the Scottish Parliament is correctly defined.
43 43
      */
44
-	public function testScotlandHouseDefined()
44
+    public function testScotlandHouseDefined()
45 45
     {
46 46
         $this->assertEquals(4, HOUSE_TYPE_SCOTLAND);
47 47
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * Test that the Assembly for Wales is correctly defined.
51 51
      */
52
-	public function testWalesHouseDefined()
52
+    public function testWalesHouseDefined()
53 53
     {
54 54
         $this->assertEquals(5, HOUSE_TYPE_WALES);
55 55
     }
Please login to merge, or discard this patch.
classes/Db/Query.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,6 @@
 block discarded – undo
72 72
  * - `$this->field(n,col)` returns an empty string.
73 73
  * - `$this->insert_id()` returns `null`.
74 74
  * - `$this->affected_rows()` returns `null`.
75
-
76 75
  */
77 76
 
78 77
 class Query {
Please login to merge, or discard this patch.
scripts/mprss.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -20,49 +20,49 @@  discard block
 block discarded – undo
20 20
 
21 21
 $starttime = time();
22 22
 for ($personrow=0; $personrow<$q->rows(); $personrow++) {
23
-	$person_id = $q->field($personrow, 'person_id');
23
+    $person_id = $q->field($personrow, 'person_id');
24 24
 
25
-	$args = array ( 'person_id' => $person_id );
26
-	$speeches = $HANSARDLIST->display('person', $args, 'none');
25
+    $args = array ( 'person_id' => $person_id );
26
+    $speeches = $HANSARDLIST->display('person', $args, 'none');
27 27
 
28
-	// Some data about this person that we'll need for the feed.
29
-	$MEMBER = new MEMBER(array('person_id' => $person_id));
30
-	$MPURL = new \MySociety\TheyWorkForYou\Url('mp');
31
-	$MPURL->insert(array('pid'=>$person_id));
32
-	$mpurl = $MPURL->generate();
28
+    // Some data about this person that we'll need for the feed.
29
+    $MEMBER = new MEMBER(array('person_id' => $person_id));
30
+    $MPURL = new \MySociety\TheyWorkForYou\Url('mp');
31
+    $MPURL->insert(array('pid'=>$person_id));
32
+    $mpurl = $MPURL->generate();
33 33
 
34
-	$date = gmdate('Y-m-d');
35
-	$time = gmdate('H:i:s');
36
-	$datenow = $date . 'T' . $time . '+00:00';
34
+    $date = gmdate('Y-m-d');
35
+    $time = gmdate('H:i:s');
36
+    $datenow = $date . 'T' . $time . '+00:00';
37 37
 
38
-	// Prepare the meat of the RSS file.
39
-	$items = '';
40
-	$entries = '';
41
-	if (isset ($speeches['rows']) && count($speeches['rows']) > 0) {
38
+    // Prepare the meat of the RSS file.
39
+    $items = '';
40
+    $entries = '';
41
+    if (isset ($speeches['rows']) && count($speeches['rows']) > 0) {
42 42
 
43
-		foreach ($speeches['rows'] as $n => $row) {
43
+        foreach ($speeches['rows'] as $n => $row) {
44 44
 
45
-			// While we're linking to individual speeches,
46
-			// the text is the body of the parent, ie (sub)section.
47
-			$title = _htmlentities(str_replace('&#8212;', '-', $row['parent']['body']));
45
+            // While we're linking to individual speeches,
46
+            // the text is the body of the parent, ie (sub)section.
47
+            $title = _htmlentities(str_replace('&#8212;', '-', $row['parent']['body']));
48 48
 
49
-			$link = isset($row['listurl']) ? $row['listurl'] : '';
50
-			$link = 'https://' . DOMAIN . $link;
49
+            $link = isset($row['listurl']) ? $row['listurl'] : '';
50
+            $link = 'https://' . DOMAIN . $link;
51 51
 
52
-			$description = _htmlentities(trim_characters($row['body'], 0, 200));
53
-			$contentencoded = $row['body'];
52
+            $description = _htmlentities(trim_characters($row['body'], 0, 200));
53
+            $contentencoded = $row['body'];
54 54
 
55
-			$hdate = format_date($row['hdate'], 'Y-m-d');
56
-			if ($row['htime'] != NULL) {
57
-				$htime = format_time($row['htime'], 'H:i:s');
58
-			} else {
59
-				$htime = '00:00:00';
60
-			}
55
+            $hdate = format_date($row['hdate'], 'Y-m-d');
56
+            if ($row['htime'] != NULL) {
57
+                $htime = format_time($row['htime'], 'H:i:s');
58
+            } else {
59
+                $htime = '00:00:00';
60
+            }
61 61
 
62
-			$date = $hdate . 'T' . $htime . '+00:00';
62
+            $date = $hdate . 'T' . $htime . '+00:00';
63 63
 
64
-			$items .= '<rdf:li rdf:resource="' . $link . '" />' . "\n";
65
-			$entries .= "<item rdf:about=\"$link\">
64
+            $items .= '<rdf:li rdf:resource="' . $link . '" />' . "\n";
65
+            $entries .= "<item rdf:about=\"$link\">
66 66
 	<title>$title</title>
67 67
 	<link>$link</link>
68 68
 	<description>$description</description>
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 </item>
72 72
 ";
73 73
 
74
-		}
75
-	}
74
+        }
75
+    }
76 76
 
77
-	// Prepare the whole text of the RSS file.
78
-	$rsstext = '<?xml version="1.0" encoding="utf-8"?>
77
+    // Prepare the whole text of the RSS file.
78
+    $rsstext = '<?xml version="1.0" encoding="utf-8"?>
79 79
 <rdf:RDF
80 80
   xmlns:dc="http://purl.org/dc/elements/1.1/"
81 81
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
 
102 102
 </rdf:RDF>';
103 103
 
104
-	// Write the text to the file...
105
-	$filename = $rsspath . $person_id . '.rdf';
106
-	$fh = @fopen($filename, "w");
107
-	if (!$fh) { # Problem writing, just carry on
108
-		echo "Could not write to file ($filename)\n";
109
-		continue;
110
-	}
111
-	fwrite($fh, $rsstext);
112
-	fclose ($fh);
104
+    // Write the text to the file...
105
+    $filename = $rsspath . $person_id . '.rdf';
106
+    $fh = @fopen($filename, "w");
107
+    if (!$fh) { # Problem writing, just carry on
108
+        echo "Could not write to file ($filename)\n";
109
+        continue;
110
+    }
111
+    fwrite($fh, $rsstext);
112
+    fclose ($fh);
113 113
 }
114 114
 
115 115
 #print "Took " . (time()-$starttime) . " seconds\n";
Please login to merge, or discard this patch.