@@ -11,7 +11,7 @@ |
||
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 | /** |
@@ -17,7 +17,7 @@ |
||
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() { |
@@ -11,7 +11,7 @@ |
||
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()) |
@@ -11,7 +11,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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'])); |
@@ -6,17 +6,17 @@ |
||
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 |
@@ -5,12 +5,12 @@ discard block |
||
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 |
||
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, |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | $this_page = "commentreport"; |
6 | 6 | |
7 | 7 | include_once '../../includes/easyparliament/init.php'; |
8 | -include_once (INCLUDESPATH."easyparliament/commentreport.php"); |
|
8 | +include_once (INCLUDESPATH . "easyparliament/commentreport.php"); |
|
9 | 9 | |
10 | 10 | $PAGE->page_start(); |
11 | 11 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $REPORT = new COMMENTREPORT; |
58 | 58 | |
59 | - $reportdata = array ( |
|
59 | + $reportdata = array( |
|
60 | 60 | 'body' => get_http_var('body'), |
61 | 61 | 'firstname' => get_http_var('firstname'), |
62 | 62 | 'lastname' => get_http_var('lastname'), |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | |
86 | 86 | } else { |
87 | - $PAGE->error_message ("Sorry, we were unable to add the report to the database."); |
|
87 | + $PAGE->error_message("Sorry, we were unable to add the report to the database."); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | |
101 | 101 | |
102 | -function display_form($COMMENT, $errors=array()) { |
|
102 | +function display_form($COMMENT, $errors = array()) { |
|
103 | 103 | global $this_page, $THEUSER, $PAGE; |
104 | 104 | |
105 | 105 | ?> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | "; |
39 | 39 | $subject = "Help make the laws we have to obey better! - TheyWorkForYou.com"; |
40 | 40 | |
41 | - print '<a href="mailto:?subject=' . rawurlencode($subject) . '&body='. rawurlencode($email) . '">Click here to open a new email and invite your friends, family and colleagues to get involved.</a>'; |
|
41 | + print '<a href="mailto:?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($email) . '">Click here to open a new email and invite your friends, family and colleagues to get involved.</a>'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | function freeourbills_share_page() { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | print '<p><a href="/freeourbills/doshare"'; |
59 | 59 | #print 'onclick="share(this); return false;"'; |
60 | 60 | print ' title="' . |
61 | - _('E-mail this, post to del.icio.us, etc.'). '" class="share_link" rel="nofollow">'. |
|
62 | - _('Share this'). '</a></p>'; |
|
61 | + _('E-mail this, post to del.icio.us, etc.') . '" class="share_link" rel="nofollow">' . |
|
62 | + _('Share this') . '</a></p>'; |
|
63 | 63 | #freeourbills_share_form(); |
64 | 64 | } |
@@ -90,7 +90,7 @@ |
||
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"])) { |