Failed Conditions
Pull Request — master (#1327)
by Nick
69:15 queued 59:17
created
classes/Data.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -159,6 +159,9 @@
 block discarded – undo
159 159
         }
160 160
     }
161 161
 
162
+    /**
163
+     * @param string $type
164
+     */
162 165
     private function getMetadata($args="", $type) {
163 166
         // $type is either 'page' or 'section'
164 167
         global $this_page, $this_section;
Please login to merge, or discard this patch.
classes/Db/Query.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -175,6 +175,11 @@  discard block
 block discarded – undo
175 175
     }
176 176
 
177 177
     // After SELECT.
178
+
179
+    /**
180
+     * @param integer $row_index
181
+     * @param string $column_name
182
+     */
178 183
     public function field($row_index, $column_name) {
179 184
         if ($this->rows > 0)
180 185
             return $this->data[$row_index][$column_name];
@@ -187,6 +192,10 @@  discard block
 block discarded – undo
187 192
     }
188 193
 
189 194
     // After SELECT.
195
+
196
+    /**
197
+     * @param integer $row_index
198
+     */
190 199
     public function row($row_index) {
191 200
         if ($this->success && $this->rows > 0)
192 201
             return $this->data[$row_index];
@@ -224,6 +233,9 @@  discard block
 block discarded – undo
224 233
         return $html;
225 234
     }
226 235
 
236
+    /**
237
+     * @param string $errormsg
238
+     */
227 239
     public function error($errormsg) {
228 240
         // When a query goes wrong...
229 241
         $this->success = false;
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 MySociety\TheyWorkForYou\Db\Query $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.
classes/Db/Connection.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      * @param string $db_pass The password for the database user
56 56
      * @param string $db_name The name of the database
57 57
      *
58
-     * @return true If the connection has been created successfully.
58
+     * @return boolean If the connection has been created successfully.
59 59
      */
60 60
 
61 61
     public function init($db_host, $db_user, $db_pass, $db_name) {
Please login to merge, or discard this patch.
classes/Search/Normal.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -188,6 +188,9 @@
 block discarded – undo
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
 
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.
@@ -750,12 +757,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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";
Please login to merge, or discard this patch.
classes/Url.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.