Failed Conditions
Branch master (215e8c)
by Johannes
04:26
created
www/includes/mysql.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -196,6 +196,11 @@  discard block
 block discarded – undo
196 196
     }
197 197
 
198 198
     // After SELECT.
199
+
200
+    /**
201
+     * @param integer $row_index
202
+     * @param string $column_name
203
+     */
199 204
     public function field($row_index, $column_name) {
200 205
         if ($this->rows > 0)
201 206
             return $this->data[$row_index][$column_name];
@@ -208,6 +213,10 @@  discard block
 block discarded – undo
208 213
     }
209 214
 
210 215
     // After SELECT.
216
+
217
+    /**
218
+     * @param integer $row_index
219
+     */
211 220
     public function row($row_index) {
212 221
         if ($this->success && $this->rows > 0)
213 222
             return $this->data[$row_index];
@@ -245,6 +254,9 @@  discard block
 block discarded – undo
245 254
         return $html;
246 255
     }
247 256
 
257
+    /**
258
+     * @param string $errormsg
259
+     */
248 260
     public function error($errormsg) {
249 261
         // When a query goes wrong...
250 262
         $this->success = false;
@@ -305,6 +317,9 @@  discard block
 block discarded – undo
305 317
         twfy_debug ("TIME", "Total time for MySQL queries on this page: " . $mysqltotalduration . " seconds.");
306 318
     }
307 319
 
320
+    /**
321
+     * @param string $error
322
+     */
308 323
     public function fatal_error($error) {
309 324
         echo '
310 325
 <html><head><title>TheyWorkForYou - Database Error</title></head>
Please login to merge, or discard this patch.
www/includes/technorati.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@
 block discarded – undo
29 29
   public $xPermalink;
30 30
 }
31 31
 
32
+/**
33
+ * @param string $url
34
+ */
32 35
 function technorati($url) {
33 36
   global $arItems, $itemCount;
34 37
 
Please login to merge, or discard this patch.
classes/Member.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -207,6 +207,10 @@  discard block
 block discarded – undo
207 207
 
208 208
     }
209 209
 
210
+    /**
211
+     * @param string|null $include_only
212
+     * @param boolean $ignore_committees
213
+     */
210 214
     private function getOfficeObject($include_only, $ignore_committees, $row) {
211 215
         if (!$this->includeOffice($include_only, $row['to_date'])) {
212 216
             return null;
@@ -338,6 +342,10 @@  discard block
 block discarded – undo
338 342
         return $output;
339 343
     }
340 344
 
345
+    /**
346
+     * @param integer $house
347
+     * @param string $house_name
348
+     */
341 349
     private function entered_house_line($house, $house_name) {
342 350
         if (isset($this->entered_house[$house]['date'])) {
343 351
             $string = "<strong>Entered the $house_name ";
@@ -350,6 +358,10 @@  discard block
 block discarded – undo
350 358
         }
351 359
     }
352 360
 
361
+    /**
362
+     * @param integer $house
363
+     * @param string $house_name
364
+     */
353 365
     private function left_house_line($house, $house_name) {
354 366
         if ($this->house($house) && !$this->current_member($house)) {
355 367
             $string = "<strong>Left the $house_name ";
Please login to merge, or discard this patch.
www/docs/mp/index.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -590,6 +590,7 @@  discard block
 block discarded – undo
590 590
  * Member Redirect
591 591
  *
592 592
  * Redirect to the canonical page for a member.
593
+ * @param MySociety\TheyWorkForYou\Member $MEMBER
593 594
  */
594 595
 
595 596
 function member_redirect (&$MEMBER, $code = 301, $pagetype = NULL) {
@@ -1056,6 +1057,12 @@  discard block
 block discarded – undo
1056 1057
 
1057 1058
 }
1058 1059
 
1060
+/**
1061
+ * @param string $blurb
1062
+ * @param string $type
1063
+ * @param string $inwhat
1064
+ * @param string $afterstuff
1065
+ */
1059 1066
 function display_stats_line($category, $blurb, $type, $inwhat, $afterstuff, $extra_info, $minister = false, $Lminister = false) {
1060 1067
     $return = false;
1061 1068
     if (isset($extra_info[$category]))
@@ -1065,6 +1072,10 @@  discard block
 block discarded – undo
1065 1072
     return $return;
1066 1073
 }
1067 1074
 
1075
+/**
1076
+ * @param integer $house
1077
+ * @param boolean $minister
1078
+ */
1068 1079
 function display_stats_line_house($house, $category, $blurb, $type, $inwhat, $extra_info, $minister, $afterstuff) {
1069 1080
     if ($category == 'wrans_asked_inlastyear' || $category == 'debate_sectionsspoken_inlastyear' || $category =='comments_on_speeches' ||
1070 1081
         $category == 'Lwrans_asked_inlastyear' || $category == 'Ldebate_sectionsspoken_inlastyear' || $category =='Lcomments_on_speeches') {
@@ -1163,6 +1174,9 @@  discard block
 block discarded – undo
1163 1174
     return $reg;
1164 1175
 }
1165 1176
 
1177
+/**
1178
+ * @param string $area_type
1179
+ */
1166 1180
 function regional_list($pc, $area_type, $rep_type) {
1167 1181
     $constituencies = MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituencies($pc);
1168 1182
     if ($constituencies == 'CONNECTION_TIMED_OUT') {
Please login to merge, or discard this patch.
www/docs/api/api_getPerson.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -77,6 +77,9 @@  discard block
 block discarded – undo
77 77
     }
78 78
 }
79 79
 
80
+/**
81
+ * @param MySQLQuery $q
82
+ */
80 83
 function _api_getPerson_output($q, $flatten=false) {
81 84
     $output = array();
82 85
     $last_mod = 0;
@@ -95,10 +98,16 @@  discard block
 block discarded – undo
95 98
     api_output($output, $last_mod);
96 99
 }
97 100
 
101
+/**
102
+ * @param integer $house
103
+ */
98 104
 function api_getPerson_constituency($constituency, $house) {
99 105
     _api_getPerson_constituency(array($constituency), $house);
100 106
 }
101 107
 
108
+/**
109
+ * @param integer $house
110
+ */
102 111
 function api_getPerson_postcode($pc, $house) {
103 112
     $pc = preg_replace('#[^a-z0-9 ]#i', '', $pc);
104 113
     $types = array();
Please login to merge, or discard this patch.
www/includes/utility.php 1 patch
Doc Comments   +23 added lines patch added patch discarded remove patch
@@ -318,6 +318,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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.
@@ -735,12 +742,18 @@  discard block
 block discarded – undo
735 742
 /* verp_envelope_sender RECIPIENT
736 743
  * Construct a VERP envelope sender for an email to RECIPIENT
737 744
  */
745
+/**
746
+ * @return string|null
747
+ */
738 748
 function twfy_verp_envelope_sender($recipient) {
739 749
     $envelope_sender = verp_envelope_sender($recipient, 'twfy', EMAILDOMAIN);
740 750
 
741 751
     return $envelope_sender;
742 752
 }
743 753
 
754
+/**
755
+ * @param string $message
756
+ */
744 757
 function send_email($to, $subject, $message, $bulk = false, $from = '', $want_bounces = false) {
745 758
     // Use this rather than PHP's mail() direct, so we can make alterations
746 759
     // easily to all the emails we send out from the site.
@@ -799,6 +812,9 @@  discard block
 block discarded – undo
799 812
 }
800 813
 
801 814
 // Call this with a key name to get a COOKIE variable.
815
+/**
816
+ * @param string $name
817
+ */
802 818
 function get_cookie_var($name, $default='') {
803 819
     if (array_key_exists($name, $_COOKIE)) {
804 820
         return clean_var($_COOKIE[$name]);
@@ -1039,6 +1055,10 @@  discard block
 block discarded – undo
1039 1055
     }
1040 1056
 }
1041 1057
 
1058
+/**
1059
+ * @param integer $major
1060
+ * @param URL $LISTURL
1061
+ */
1042 1062
 function _major_summary_title($major, $data, $LISTURL, $daytext) {
1043 1063
     global $hansardmajors;
1044 1064
 
@@ -1088,6 +1108,9 @@  discard block
 block discarded – undo
1088 1108
     return $return;
1089 1109
 }
1090 1110
 
1111
+/**
1112
+ * @param string|null $url
1113
+ */
1091 1114
 function redirect($url) {
1092 1115
     if (defined('TESTING')) {
1093 1116
         print "Location: $url";
Please login to merge, or discard this patch.
classes/PolicyPositions.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,6 @@
 block discarded – undo
53 53
      *
54 54
      * @param Policies $policies The list of policies to get the positions for.
55 55
      * @param Member   $member   The member to get positions for.
56
-     * @param int      $limit    The number of policies to limit the list to.
57 56
      */
58 57
 
59 58
     public function __construct(Policies $policies, Member $member, $options = array())
Please login to merge, or discard this patch.
www/includes/easyparliament/member.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -489,6 +489,10 @@  discard block
 block discarded – undo
489 489
     public function house_text($house) {
490 490
         return $this->houses_pretty[$house];
491 491
     }
492
+
493
+    /**
494
+     * @return string
495
+     */
492 496
     public function constituency() { return $this->constituency; }
493 497
     public function party() { return $this->party; }
494 498
     public function party_text($party = null) {
@@ -607,6 +611,9 @@  discard block
 block discarded – undo
607 611
         }
608 612
     }
609 613
 
614
+    /**
615
+     * @param string $direction
616
+     */
610 617
     private function _previous_future_mps_query($direction) {
611 618
         $entered_house = $this->entered_house(HOUSE_TYPE_COMMONS);
612 619
         if (is_null($entered_house)) return '';
Please login to merge, or discard this patch.