Failed Conditions
Pull Request — master (#1327)
by Nick
69:15 queued 59:17
created
tests/PeopleTest.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
      */
12 12
     public function getDataSet()
13 13
     {
14
-        return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/people.xml');
14
+        return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/people.xml');
15 15
     }
16 16
 
17 17
     /**
Please login to merge, or discard this patch.
tests/HansardTest.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
      */
12 12
     public function getDataSet()
13 13
     {
14
-        return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/hansard.xml');
14
+        return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/hansard.xml');
15 15
     }
16 16
 
17 17
     /**
Please login to merge, or discard this patch.
tests/VotesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     }
18 18
 
19 19
     private function fetch_votes_page() {
20
-        return $this->fetch_page( array( 'pagetype' => 'votes', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/votes' ) );
20
+        return $this->fetch_page(array('pagetype' => 'votes', 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency/votes'));
21 21
     }
22 22
 
23 23
     public function testVoteSummary() {
Please login to merge, or discard this patch.
tests/AcceptBasicTest.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
      */
12 12
     public function getDataSet()
13 13
     {
14
-        return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/acceptance.xml');
14
+        return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/acceptance.xml');
15 15
     }
16 16
 
17 17
     private function fetch_page($path, $file = 'index.php', $vars = array())
Please login to merge, or discard this patch.
tests/AlertsTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function getDataSet()
13 13
     {
14
-        return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/alerts.xml');
14
+        return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/alerts.xml');
15 15
     }
16 16
 
17 17
     /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $ALERT = new ALERT();
33 33
 
34
-        $response = $ALERT->fetch(0,0);
34
+        $response = $ALERT->fetch(0, 0);
35 35
 
36 36
         // Make sure we only get one response
37 37
         $this->assertEquals(1, count($response['data']));
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $ALERT = new ALERT();
50 50
 
51
-        $response = $ALERT->fetch(1,0);
51
+        $response = $ALERT->fetch(1, 0);
52 52
 
53 53
         // Make sure we only get two responses
54 54
         $this->assertEquals(2, count($response['data']));
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $ALERT = new ALERT();
67 67
 
68
-        $response = $ALERT->fetch(0,1);
68
+        $response = $ALERT->fetch(0, 1);
69 69
 
70 70
         // Make sure we only get one response
71 71
         $this->assertEquals(1, count($response['data']));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $ALERT = new ALERT();
84 84
 
85
-        $response = $ALERT->fetch(1,1);
85
+        $response = $ALERT->fetch(1, 1);
86 86
 
87 87
         // Make sure we only get one response
88 88
         $this->assertEquals(1, count($response['data']));
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $ALERT = new ALERT();
101 101
 
102
-        $response = $ALERT->fetch_between(1,1, '2014-02-01', '2014-02-02');
102
+        $response = $ALERT->fetch_between(1, 1, '2014-02-01', '2014-02-02');
103 103
 
104 104
         // Make sure we only get one response
105 105
         $this->assertEquals(1, count($response['alerts']));
Please login to merge, or discard this patch.
scripts/generate_party_positions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 $policies = new MySociety\TheyWorkForYou\Policies;
7 7
 
8 8
 $party_count = 0;
9
-foreach ( $parties as $party ) {
9
+foreach ($parties as $party) {
10 10
     $party = new MySociety\TheyWorkForYou\Party($party);
11 11
 
12 12
     $positions = $party->calculateAllPolicyPositions($policies);
13 13
 
14
-    if ( count( $positions ) ) {
14
+    if (count($positions)) {
15 15
         $party_count++;
16 16
     }
17 17
 
18
-    foreach ( $positions as $position ) {
19
-        $party->cache_position( $position );
18
+    foreach ($positions as $position) {
19
+        $party->cache_position($position);
20 20
     }
21 21
 }
22 22
 
Please login to merge, or discard this patch.
scripts/video-availability.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@
 block discarded – undo
22 22
     if ($start_date == $end_date) {
23 23
         $qq = $db->query("update hansard set video_status = video_status | 1
24 24
 	    where hdate='$start_date' and htime>='$start_time' and htime<'$end_time' and major=1");
25
-    } else {
25
+    }
26
+    else {
26 27
         $qq = $db->query("update hansard set video_status = video_status | 1
27 28
 	    where ((hdate='$start_date' and htime>='$start_time')
28 29
 	       or (hdate='$end_date' and htime<'$end_time')) and major=1");
Please login to merge, or discard this patch.
www/docs/trackback/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@  discard block
 block discarded – undo
5 5
 $this_page = 'trackback';
6 6
 
7 7
 // The gid is the gid of the thing being trackedback to.
8
-$epobject_id= get_http_var('e');			// eg, '3424'
8
+$epobject_id = get_http_var('e'); // eg, '3424'
9 9
 
10
-$url 		= get_http_var('url');
10
+$url = get_http_var('url');
11 11
 $blog_name 	= get_http_var('blog_name');
12
-$title 		= get_http_var('title');
13
-$excerpt 	= get_http_var('excerpt');
12
+$title = get_http_var('title');
13
+$excerpt = get_http_var('excerpt');
14 14
 
15 15
 if ($title == '' && $url == '' && $blog_name == '') {
16 16
     // If it doesn't look like a trackback at all...
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
     exit;
24 24
 }
25 25
 
26
-if ((strlen(''.$epobject_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$url))) {
26
+if ((strlen('' . $epobject_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen('' . $url))) {
27 27
 
28 28
     header('Content-Type: text/xml');
29 29
 
30
-    $trackbackdata = array (
30
+    $trackbackdata = array(
31 31
         'epobject_id' 	=> $epobject_id,
32 32
         'url' 			=> $url,
33 33
         'blog_name'		=> $blog_name,
Please login to merge, or discard this patch.
www/docs/alert/authed.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@  discard block
 block discarded – undo
16 16
 $email = get_http_var('email');
17 17
 $sign = get_http_var('sign');
18 18
 $pid = get_http_var('pid');
19
-if (!$pid || !ctype_digit($pid)) print 'not valid';
19
+if (!$pid || !ctype_digit($pid)) {
20
+    print 'not valid';
21
+}
20 22
 else {
21 23
     $authed = auth_verify_with_shared_secret($email, OPTION_AUTH_SHARED_SECRET, $sign);
22 24
     if ($authed) {
@@ -26,11 +28,14 @@  discard block
 block discarded – undo
26 28
             ':criteria' => 'speaker:' . $pid
27 29
             ));
28 30
         $already_signed = $q->rows();
29
-        if ($already_signed)
30
-            print "already signed";
31
-        else
32
-            print "not signed";
33
-    } else {
31
+        if ($already_signed) {
32
+                    print "already signed";
33
+        }
34
+        else {
35
+                    print "not signed";
36
+        }
37
+    }
38
+    else {
34 39
         print "not authed";
35 40
     }
36 41
 }
Please login to merge, or discard this patch.