@@ -188,6 +188,9 @@ |
||
| 188 | 188 | return $items; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | + /** |
|
| 192 | + * @param \MySociety\TheyWorkForYou\Url $url |
|
| 193 | + */ |
|
| 191 | 194 | private function generate_pagination_links($data, $url, $first, $last) { |
| 192 | 195 | $links = array(); |
| 193 | 196 | |
@@ -318,6 +318,9 @@ discard block |
||
| 318 | 318 | $format_date_months = array('', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); |
| 319 | 319 | $format_date_months_short = array('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
| 320 | 320 | |
| 321 | +/** |
|
| 322 | + * @param string $format |
|
| 323 | + */ |
|
| 321 | 324 | function format_date($date, $format) { |
| 322 | 325 | global $format_date_months, $format_date_months_short; |
| 323 | 326 | // Pass it a date (YYYY-MM-DD) and a |
@@ -342,6 +345,9 @@ discard block |
||
| 342 | 345 | } |
| 343 | 346 | |
| 344 | 347 | |
| 348 | +/** |
|
| 349 | + * @param string $format |
|
| 350 | + */ |
|
| 345 | 351 | function format_time($time, $format) { |
| 346 | 352 | // Pass it a time (HH:MM:SS) and a |
| 347 | 353 | // PHP date format string (eg, "H:i") |
@@ -486,6 +492,7 @@ discard block |
||
| 486 | 492 | |
| 487 | 493 | /** |
| 488 | 494 | * Filters user input to remove unwanted HTML tags etc |
| 495 | + * @param string $filter_type |
|
| 489 | 496 | */ |
| 490 | 497 | function filter_user_input($text, $filter_type) { |
| 491 | 498 | // We use this to filter any major user input, especially comments. |
@@ -750,12 +757,18 @@ discard block |
||
| 750 | 757 | /* verp_envelope_sender RECIPIENT |
| 751 | 758 | * Construct a VERP envelope sender for an email to RECIPIENT |
| 752 | 759 | */ |
| 760 | +/** |
|
| 761 | + * @return string|null |
|
| 762 | + */ |
|
| 753 | 763 | function twfy_verp_envelope_sender($recipient) { |
| 754 | 764 | $envelope_sender = verp_envelope_sender($recipient, 'twfy', EMAILDOMAIN); |
| 755 | 765 | |
| 756 | 766 | return $envelope_sender; |
| 757 | 767 | } |
| 758 | 768 | |
| 769 | +/** |
|
| 770 | + * @param string $message |
|
| 771 | + */ |
|
| 759 | 772 | function send_email($to, $subject, $message, $bulk = false, $from = '', $want_bounces = false) { |
| 760 | 773 | // Use this rather than PHP's mail() direct, so we can make alterations |
| 761 | 774 | // easily to all the emails we send out from the site. |
@@ -814,6 +827,9 @@ discard block |
||
| 814 | 827 | } |
| 815 | 828 | |
| 816 | 829 | // Call this with a key name to get a COOKIE variable. |
| 830 | +/** |
|
| 831 | + * @param string $name |
|
| 832 | + */ |
|
| 817 | 833 | function get_cookie_var($name, $default='') { |
| 818 | 834 | if (array_key_exists($name, $_COOKIE)) { |
| 819 | 835 | return clean_var($_COOKIE[$name]); |
@@ -1058,6 +1074,10 @@ discard block |
||
| 1058 | 1074 | } |
| 1059 | 1075 | } |
| 1060 | 1076 | |
| 1077 | +/** |
|
| 1078 | + * @param integer $major |
|
| 1079 | + * @param MySociety\TheyWorkForYou\Url $LISTURL |
|
| 1080 | + */ |
|
| 1061 | 1081 | function _major_summary_title($major, $data, $LISTURL, $daytext) { |
| 1062 | 1082 | global $hansardmajors; |
| 1063 | 1083 | |
@@ -1107,6 +1127,9 @@ discard block |
||
| 1107 | 1127 | return $return; |
| 1108 | 1128 | } |
| 1109 | 1129 | |
| 1130 | +/** |
|
| 1131 | + * @param string|null $url |
|
| 1132 | + */ |
|
| 1110 | 1133 | function redirect($url) { |
| 1111 | 1134 | if (defined('TESTING')) { |
| 1112 | 1135 | print "Location: $url"; |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | /** |
| 115 | 115 | * Remove Session Key/Value Pair |
| 116 | 116 | * |
| 117 | - * @param array $arr A list array of key names to remove |
|
| 117 | + * @param string[] $arr A list array of key names to remove |
|
| 118 | 118 | */ |
| 119 | 119 | |
| 120 | 120 | public function remove($arr) { |