@@ -240,6 +240,9 @@ discard block |
||
240 | 240 | return $this->call(CANVAS_API_PUT, $path, $data, $throwsExceptions); |
241 | 241 | } |
242 | 242 | |
243 | + /** |
|
244 | + * @param string $page |
|
245 | + */ |
|
243 | 246 | private function pageLink($page) { |
244 | 247 | if (array_key_exists($page, $this->lastCall['pagination'])) { |
245 | 248 | $this->pagePest = new Pest($this->lastCall['pagination'][$page]); |
@@ -264,6 +267,9 @@ discard block |
||
264 | 267 | return $this->pageLink('last'); |
265 | 268 | } |
266 | 269 | |
270 | + /** |
|
271 | + * @param string $page |
|
272 | + */ |
|
267 | 273 | private function getPageNumber($page) { |
268 | 274 | if (array_key_exists($page, $this->lastCall['pagination'])) { |
269 | 275 | parse_str(parse_url($this->lastCall['pagination'][$page], PHP_URL_QUERY), $query); |
@@ -217,7 +217,7 @@ |
||
217 | 217 | /** |
218 | 218 | * Do CURL request |
219 | 219 | * @param resource $curl |
220 | - * @return mixed |
|
220 | + * @return string |
|
221 | 221 | * @throws Pest_Curl_Exec |
222 | 222 | * @throws Pest_Curl_Meta |
223 | 223 | */ |
@@ -34,6 +34,9 @@ |
||
34 | 34 | return $basePath; |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + */ |
|
37 | 40 | function deletePath($absolutePath) { |
38 | 41 | $dirs = array(); |
39 | 42 | $paths = array(); |
@@ -208,6 +208,9 @@ |
||
208 | 208 | // |
209 | 209 | // arg0: string version of php to check against |
210 | 210 | // return boolean true if $version is >= current php version |
211 | +/** |
|
212 | + * @param string $version |
|
213 | + */ |
|
211 | 214 | function check_php_version($version) { |
212 | 215 | // intval used for version like "4.0.4pl1" |
213 | 216 | $testVer=intval(str_replace(".", "",$version)); |
@@ -75,6 +75,9 @@ discard block |
||
75 | 75 | * Resolve relative paths |
76 | 76 | * Utility function for remote_filemtime() |
77 | 77 | */ |
78 | +/** |
|
79 | + * @param string $rel_path |
|
80 | + */ |
|
78 | 81 | function resolve_path($url, $rel_path) { |
79 | 82 | if (parse_url($rel_path) !== FALSE) { |
80 | 83 | // Path is a URL |
@@ -224,6 +227,9 @@ discard block |
||
224 | 227 | // $have is the current offset (ie, '-0500') |
225 | 228 | // $want is the wanted offset (ie, '-0700') |
226 | 229 | // $time is the unixtime relative to $have |
230 | +/** |
|
231 | + * @param integer $time |
|
232 | + */ |
|
227 | 233 | function calcTime($have, $want, $time) { |
228 | 234 | if ($have == 'none' || $want == 'none') return $time; |
229 | 235 | $have_secs = calcOffset($have); |
@@ -233,6 +239,9 @@ discard block |
||
233 | 239 | return $time; |
234 | 240 | } |
235 | 241 | |
242 | +/** |
|
243 | + * @param integer $time |
|
244 | + */ |
|
236 | 245 | function chooseOffset($time, $timezone = '') { |
237 | 246 | global $tz_array, $summary; |
238 | 247 | switch ($timezone) { |
@@ -38,6 +38,9 @@ discard block |
||
38 | 38 | |
39 | 39 | // word wrap function that returns specified number of lines |
40 | 40 | // when lines is 0, it returns the entire string as wordwrap() does it |
41 | +/** |
|
42 | + * @param integer $length |
|
43 | + */ |
|
41 | 44 | function word_wrap($str, $length, $lines=0) { |
42 | 45 | if ($lines > 0) { |
43 | 46 | $len = $length * $lines; |
@@ -51,6 +54,10 @@ discard block |
||
51 | 54 | |
52 | 55 | // String intercept By Bleakwind |
53 | 56 | // utf-8:$byte=3 | gb2312:$byte=2 | big5:$byte=2 |
57 | +/** |
|
58 | + * @param integer $start |
|
59 | + * @param double $len |
|
60 | + */ |
|
54 | 61 | function bite_str($string, $start, $len, $byte=3){ |
55 | 62 | $str = ""; |
56 | 63 | $count = 0; |
@@ -35,6 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Truncate a string to a specific number of words |
38 | + * @param integer $count |
|
38 | 39 | */ |
39 | 40 | function chopToWordCount($string, $count) { |
40 | 41 | $wc = str_word_count($string); |
@@ -49,6 +50,7 @@ discard block |
||
49 | 50 | |
50 | 51 | /** |
51 | 52 | * Strip "dangerous" HTML to make it safe to print to web browsers |
53 | + * @param string $string |
|
52 | 54 | */ |
53 | 55 | function sanitizeForWeb($string) { |
54 | 56 | $string = preg_replace('/<br\s*\/?>/', "\n", $string); |
@@ -2,6 +2,9 @@ |
||
2 | 2 | /* values are offset in hhmm (not seconds!) relative to GMT |
3 | 3 | case The first value is for standard, and the second value is for daylight |
4 | 4 | */ |
5 | +/** |
|
6 | + * @param string $timezone |
|
7 | + */ |
|
5 | 8 | function is_daylight($time, $timezone){ |
6 | 9 | global $tz_array, $summary; |
7 | 10 | # default to std time, overwrite if daylight. |
@@ -1,6 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | // function to determine maximum necessary columns per day |
3 | 3 | // actually an algorithm to get the smallest multiple for two numbers |
4 | +/** |
|
5 | + * @param integer $b |
|
6 | + */ |
|
4 | 7 | function kgv($a, $b) { |
5 | 8 | $x = $a; |
6 | 9 | $y = $b; |