@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | protected function getSearchSections() { |
| 26 | 26 | return [ |
| 27 | - [ 'section' => 'sp' ], |
|
| 27 | + ['section' => 'sp'], |
|
| 28 | 28 | ]; |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $data = []; |
| 20 | 20 | |
| 21 | - $args = [ 'months' => 1 ]; |
|
| 21 | + $args = ['months' => 1]; |
|
| 22 | 22 | $WRANSLIST = new \WRANSLIST(); |
| 23 | 23 | |
| 24 | 24 | $wrans = []; |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | protected function getSearchSections() { |
| 52 | 52 | $sections = [ |
| 53 | - [ 'section' => 'wrans', 'title' => 'Written Answers' ], |
|
| 53 | + ['section' => 'wrans', 'title' => 'Written Answers'], |
|
| 54 | 54 | ]; |
| 55 | 55 | if (get_http_var('type') == '') { |
| 56 | - $sections[] = [ 'section' => 'wms', 'title' => 'Written Ministerial Statements' ]; |
|
| 56 | + $sections[] = ['section' => 'wms', 'title' => 'Written Ministerial Statements']; |
|
| 57 | 57 | } |
| 58 | 58 | return $sections; |
| 59 | 59 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | protected function getSearchSections() { |
| 34 | 34 | return [ |
| 35 | - [ 'section' => 'ni' ], |
|
| 35 | + ['section' => 'ni'], |
|
| 36 | 36 | ]; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $debates = $DEBATELIST->display('recent_debates', ['days' => 30, 'num' => 6], 'none'); |
| 53 | 53 | $MOREURL = new \MySociety\TheyWorkForYou\Url('nidebatesfront'); |
| 54 | - $MOREURL->insert([ 'more' => 1 ]); |
|
| 54 | + $MOREURL->insert(['more' => 1]); |
|
| 55 | 55 | |
| 56 | 56 | // this makes sure that we don't repeat this debate in the list below |
| 57 | 57 | $random_debate = null; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $data['featured'] = $featured; |
| 88 | - $data['debates'] = [ 'recent' => $recent]; |
|
| 88 | + $data['debates'] = ['recent' => $recent]; |
|
| 89 | 89 | |
| 90 | 90 | $data['regional'] = $this->getMLAList(); |
| 91 | 91 | $data['search_box'] = $this->getSearchBox($data); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $DEBATELIST = new \DEBATELIST(); |
| 17 | 17 | $debates = []; |
| 18 | 18 | $debates['data'] = $DEBATELIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
| 19 | - $args = [ 'months' => 1 ]; |
|
| 19 | + $args = ['months' => 1]; |
|
| 20 | 20 | $debates['calendar'] = $DEBATELIST->display('calendar', $args, 'none'); |
| 21 | 21 | $debates['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
| 22 | 22 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $WHALLLIST = new \WHALLLIST(); |
| 28 | 28 | $whall['data'] = $WHALLLIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
| 29 | - $args = [ 'months' => 1 ]; |
|
| 29 | + $args = ['months' => 1]; |
|
| 30 | 30 | $whall['calendar'] = $WHALLLIST->display('calendar', $args, 'none'); |
| 31 | 31 | $whall['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
| 32 | 32 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $LORDSDEBATELIST = new \LORDSDEBATELIST(); |
| 38 | 38 | $lords['data'] = $LORDSDEBATELIST->display('biggest_debates', ['days' => 7, 'num' => 10], 'none'); |
| 39 | - $args = [ 'months' => 1 ]; |
|
| 39 | + $args = ['months' => 1]; |
|
| 40 | 40 | $lords['calendar'] = $LORDSDEBATELIST->display('calendar', $args, 'none'); |
| 41 | 41 | |
| 42 | 42 | $lords['rssurl'] = $DATA->page_metadata($this_page, 'rss'); |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | protected function getSearchSections() { |
| 57 | 57 | return [ |
| 58 | - [ 'section' => 'debates', 'title' => 'House of Commons' ], |
|
| 59 | - [ 'section' => 'lords', 'title' => 'House of Lords' ], |
|
| 60 | - [ 'section' => 'whall', 'title' => 'Westminster Hall' ], |
|
| 58 | + ['section' => 'debates', 'title' => 'House of Commons'], |
|
| 59 | + ['section' => 'lords', 'title' => 'House of Lords'], |
|
| 60 | + ['section' => 'whall', 'title' => 'Westminster Hall'], |
|
| 61 | 61 | ]; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $this_page = 'spwransfront'; |
| 22 | 22 | $data = []; |
| 23 | 23 | |
| 24 | - $args = [ 'months' => 1 ]; |
|
| 24 | + $args = ['months' => 1]; |
|
| 25 | 25 | $WRANSLIST = new \SPWRANSLIST(); |
| 26 | 26 | |
| 27 | 27 | $wrans = []; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | protected function getSearchSections() { |
| 45 | 45 | return [ |
| 46 | - [ 'section' => 'spwrans' ], |
|
| 46 | + ['section' => 'spwrans'], |
|
| 47 | 47 | ]; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | protected function get_question_mentions_html($row_data) { |
| 79 | - if(count($row_data) == 0) { |
|
| 79 | + if (count($row_data) == 0) { |
|
| 80 | 80 | return ''; |
| 81 | 81 | } |
| 82 | 82 | $result = ''; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | // Keep the references until after the history that's in a timeline: |
| 86 | 86 | $references = []; |
| 87 | 87 | foreach ($row_data as $row) { |
| 88 | - if(! $row["date"]) { |
|
| 88 | + if (!$row["date"]) { |
|
| 89 | 89 | // If this mention isn't associated with a date, the difference won't be interesting. |
| 90 | 90 | $last_date = null; |
| 91 | 91 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $daysdiff = (int) ((strtotime($row["date"]) - strtotime($last_date)) / 86400); |
| 96 | 96 | $daysstring = ($daysdiff == 1) ? "day" : "days"; |
| 97 | 97 | $further = ""; |
| 98 | - if($first_difference_output) { |
|
| 98 | + if ($first_difference_output) { |
|
| 99 | 99 | $first_difference_output = false; |
| 100 | 100 | } else { |
| 101 | 101 | $further = " a further"; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $inner = "Mentioned in <a class=\"debate-speech__meta__link\" href=\"$url\">tabled written questions on $date</a>"; |
| 121 | 121 | break; |
| 122 | 122 | case 4: |
| 123 | - if(preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['gid'], $m)) { |
|
| 123 | + if (preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['gid'], $m)) { |
|
| 124 | 124 | $URL = new \MySociety\TheyWorkForYou\Url("spwrans"); |
| 125 | 125 | $URL->insert(['spid' => $m[1]]); |
| 126 | 126 | $relative_url = $URL->generate("none"); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $inner = "Given a holding answer on $date"; |
| 132 | 132 | break; |
| 133 | 133 | case 6: |
| 134 | - if(preg_match('/^uk.org.publicwhip\/spor\/(.*)$/', $row['mentioned_gid'], $m)) { |
|
| 134 | + if (preg_match('/^uk.org.publicwhip\/spor\/(.*)$/', $row['mentioned_gid'], $m)) { |
|
| 135 | 135 | $URL = new \MySociety\TheyWorkForYou\Url("spdebates"); |
| 136 | 136 | $URL->insert(['id' => $m[1]]); |
| 137 | 137 | $relative_url = $URL->generate("none"); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | break; |
| 141 | 141 | case 7: |
| 142 | - if(preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['mentioned_gid'], $m)) { |
|
| 142 | + if (preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['mentioned_gid'], $m)) { |
|
| 143 | 143 | $referencing_spid = $m[1]; |
| 144 | 144 | $URL = new \MySociety\TheyWorkForYou\Url("spwrans"); |
| 145 | 145 | $URL->insert(['spid' => $referencing_spid]); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | } |
| 150 | 150 | break; |
| 151 | 151 | } |
| 152 | - if($reference) { |
|
| 152 | + if ($reference) { |
|
| 153 | 153 | $references[] = "\n<li>$inner."; |
| 154 | 154 | } else { |
| 155 | 155 | $result .= "\n<li class=\"link-to-hansard\">$description$inner</span>"; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } elseif ($bill_id) { |
| 51 | 51 | # Display the page for a particular bill |
| 52 | 52 | $this_page = 'pbc_bill'; |
| 53 | - $args = [ |
|
| 53 | + $args = [ |
|
| 54 | 54 | 'id' => $bill_id, |
| 55 | 55 | 'title' => $this->bill, |
| 56 | 56 | 'session' => $this->session, |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | # Display the bills for a particular session |
| 70 | 70 | $this_page = 'pbc_session'; |
| 71 | 71 | $DATA->set_page_metadata($this_page, 'title', "Session $this->session"); |
| 72 | - $args = [ |
|
| 72 | + $args = [ |
|
| 73 | 73 | 'session' => $this->session, |
| 74 | 74 | ]; |
| 75 | 75 | $data = []; |
@@ -91,12 +91,12 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | protected function getSearchSections() { |
| 93 | 93 | return [ |
| 94 | - [ 'section' => 'pbc' ], |
|
| 94 | + ['section' => 'pbc'], |
|
| 95 | 95 | ]; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | protected function front_content() { |
| 99 | - return $this->list->display('recent_pbc_debates', [ 'num' => 50 ], 'none'); |
|
| 99 | + return $this->list->display('recent_pbc_debates', ['num' => 50], 'none'); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | protected function display_front() { |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | } elseif ($this->session) { |
| 69 | 69 | # Display the bills for a particular session |
| 70 | 70 | $this_page = 'pbc_session'; |
| 71 | - $DATA->set_page_metadata($this_page, 'title', "Session $this->session"); |
|
| 71 | + $DATA->set_page_metadata($this_page, 'title', "session $this->session"); |
|
| 72 | 72 | $args = [ |
| 73 | 73 | 'session' => $this->session, |
| 74 | 74 | ]; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected function getSearchSections() { |
| 22 | 22 | return [ |
| 23 | - [ 'section' => 'lmqs', 'title' => 'Mayoral Questions' ], |
|
| 23 | + ['section' => 'lmqs', 'title' => 'Mayoral Questions'], |
|
| 24 | 24 | ]; |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | protected function getSearchSections() { |
| 42 | 42 | return [ |
| 43 | - [ 'section' => 'wales' ], |
|
| 43 | + ['section' => 'wales'], |
|
| 44 | 44 | ]; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $debates = $DEBATELIST->display('recent_debates', ['days' => 30, 'num' => 6], 'none'); |
| 63 | 63 | $MOREURL = new \MySociety\TheyWorkForYou\Url('senedddebatesfront'); |
| 64 | - $MOREURL->insert([ 'more' => 1 ]); |
|
| 64 | + $MOREURL->insert(['more' => 1]); |
|
| 65 | 65 | |
| 66 | 66 | // this makes sure that we don't repeat this debate in the list below |
| 67 | 67 | $random_debate = null; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $data['featured'] = $featured; |
| 98 | - $data['debates'] = [ 'recent' => $recent]; |
|
| 98 | + $data['debates'] = ['recent' => $recent]; |
|
| 99 | 99 | |
| 100 | 100 | $data['regional'] = $this->getMSList(); |
| 101 | 101 | $data['search_box'] = $this->getSearchBox($data); |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | global $globalsuccess, $sentemails, $nomail, $start_time; |
| 155 | 155 | |
| 156 | 156 | $sentemails++; |
| 157 | - mlog("SEND $sentemails : Sending email to $current[email] ... "); |
|
| 157 | + mlog("send $sentemails : Sending email to $current[email] ... "); |
|
| 158 | 158 | $d = ['to' => $current['email'], 'template' => $template]; |
| 159 | 159 | $m = [ |
| 160 | 160 | 'DATA' => join("\n", $data), |