@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | return null; |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param string $name |
|
82 | + */ |
|
80 | 83 | protected function fileExists($name) { |
81 | 84 | return is_file($name); |
82 | 85 | } |
@@ -260,6 +263,9 @@ discard block |
||
260 | 263 | return $scope; |
261 | 264 | } |
262 | 265 | |
266 | + /** |
|
267 | + * @param string[] $selectors |
|
268 | + */ |
|
263 | 269 | protected function compileNestedBlock($block, $selectors) { |
264 | 270 | $this->pushEnv($block); |
265 | 271 | $this->scope = $this->makeOutputBlock($block->type, $selectors); |
@@ -278,6 +284,9 @@ discard block |
||
278 | 284 | $this->popEnv(); |
279 | 285 | } |
280 | 286 | |
287 | + /** |
|
288 | + * @param stdClass $out |
|
289 | + */ |
|
281 | 290 | protected function compileProps($block, $out) { |
282 | 291 | foreach ($this->sortProps($block->props) as $prop) { |
283 | 292 | $this->compileProp($prop, $block, $out); |
@@ -388,6 +397,9 @@ discard block |
||
388 | 397 | return $out; |
389 | 398 | } |
390 | 399 | |
400 | + /** |
|
401 | + * @param stdClass $env |
|
402 | + */ |
|
391 | 403 | protected function multiplyMedia($env, $childQueries = null) { |
392 | 404 | if (is_null($env) || |
393 | 405 | !empty($env->block->type) && $env->block->type != "media") |
@@ -1288,6 +1300,9 @@ discard block |
||
1288 | 1300 | $this->throwError($error); |
1289 | 1301 | } |
1290 | 1302 | |
1303 | + /** |
|
1304 | + * @param integer $expectedArgs |
|
1305 | + */ |
|
1291 | 1306 | public function assertArgs($value, $expectedArgs, $name="") { |
1292 | 1307 | if ($expectedArgs == 1) { |
1293 | 1308 | return $value; |
@@ -1342,6 +1357,11 @@ discard block |
||
1342 | 1357 | return $out; |
1343 | 1358 | } |
1344 | 1359 | |
1360 | + /** |
|
1361 | + * @param double $comp |
|
1362 | + * @param double $temp1 |
|
1363 | + * @param double $temp2 |
|
1364 | + */ |
|
1345 | 1365 | protected function toRGB_helper($comp, $temp1, $temp2) { |
1346 | 1366 | if ($comp < 0) $comp += 1.0; |
1347 | 1367 | elseif ($comp > 1) $comp -= 1.0; |
@@ -2317,6 +2337,9 @@ discard block |
||
2317 | 2337 | // caches preg escaped literals |
2318 | 2338 | static protected $literalCache = array(); |
2319 | 2339 | |
2340 | + /** |
|
2341 | + * @param lessc $lessc |
|
2342 | + */ |
|
2320 | 2343 | public function __construct($lessc, $sourceName = null) { |
2321 | 2344 | $this->eatWhiteDefault = true; |
2322 | 2345 | // reference to less needed for vPrefix, mPrefix, and parentSelector |
@@ -2617,6 +2640,7 @@ discard block |
||
2617 | 2640 | |
2618 | 2641 | /** |
2619 | 2642 | * recursively parse infix equation with $lhs at precedence $minP |
2643 | + * @param integer $minP |
|
2620 | 2644 | */ |
2621 | 2645 | protected function expHelper($lhs, $minP) { |
2622 | 2646 | $this->inExp = true; |
@@ -2843,6 +2867,11 @@ discard block |
||
2843 | 2867 | } |
2844 | 2868 | |
2845 | 2869 | // an unbounded string stopped by $end |
2870 | + |
|
2871 | + /** |
|
2872 | + * @param string $end |
|
2873 | + * @param string[] $rejectStrs |
|
2874 | + */ |
|
2846 | 2875 | protected function openString($end, &$out, $nestingOpen=null, $rejectStrs = null) { |
2847 | 2876 | $oldWhite = $this->eatWhiteDefault; |
2848 | 2877 | $this->eatWhiteDefault = false; |
@@ -3423,6 +3452,9 @@ discard block |
||
3423 | 3452 | |
3424 | 3453 | /* raw parsing functions */ |
3425 | 3454 | |
3455 | + /** |
|
3456 | + * @param boolean $eatWhitespace |
|
3457 | + */ |
|
3426 | 3458 | protected function literal($what, $eatWhitespace = null) { |
3427 | 3459 | if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; |
3428 | 3460 | |
@@ -3446,6 +3478,9 @@ discard block |
||
3446 | 3478 | return $this->match(self::$literalCache[$what], $m, $eatWhitespace); |
3447 | 3479 | } |
3448 | 3480 | |
3481 | + /** |
|
3482 | + * @param string $parseItem |
|
3483 | + */ |
|
3449 | 3484 | protected function genericList(&$out, $parseItem, $delim="", $flatten=true) { |
3450 | 3485 | $s = $this->seek(); |
3451 | 3486 | $items = array(); |
@@ -3519,6 +3554,10 @@ discard block |
||
3519 | 3554 | } |
3520 | 3555 | |
3521 | 3556 | // match something without consuming it |
3557 | + |
|
3558 | + /** |
|
3559 | + * @param string $regex |
|
3560 | + */ |
|
3522 | 3561 | protected function peek($regex, &$out = null, $from=null) { |
3523 | 3562 | if (is_null($from)) $from = $this->count; |
3524 | 3563 | $r = '/'.$regex.'/Ais'; |
@@ -3574,6 +3613,10 @@ discard block |
||
3574 | 3613 | } |
3575 | 3614 | |
3576 | 3615 | // push a block that doesn't multiply tags |
3616 | + |
|
3617 | + /** |
|
3618 | + * @param string $type |
|
3619 | + */ |
|
3577 | 3620 | protected function pushSpecialBlock($type) { |
3578 | 3621 | return $this->pushBlock(null, $type); |
3579 | 3622 | } |
@@ -273,6 +273,9 @@ discard block |
||
273 | 273 | } |
274 | 274 | } |
275 | 275 | |
276 | + /** |
|
277 | + * @param stdClass $block |
|
278 | + */ |
|
276 | 279 | protected function flattenSelectors($block, $parentKey = null) { |
277 | 280 | if ($block->selectors) { |
278 | 281 | $selectors = array(); |
@@ -362,6 +365,10 @@ discard block |
||
362 | 365 | } |
363 | 366 | |
364 | 367 | // TODO refactor compileNestedBlock and compileMedia into same thing |
368 | + |
|
369 | + /** |
|
370 | + * @param string[] $selectors |
|
371 | + */ |
|
365 | 372 | protected function compileNestedBlock($block, $selectors) { |
366 | 373 | $this->pushEnv($block); |
367 | 374 | |
@@ -1140,6 +1147,9 @@ discard block |
||
1140 | 1147 | return $this->toBool($left[1] < $right[1]); |
1141 | 1148 | } |
1142 | 1149 | |
1150 | + /** |
|
1151 | + * @param boolean $thing |
|
1152 | + */ |
|
1143 | 1153 | public function toBool($thing) { |
1144 | 1154 | return $thing ? self::$true : self::$false; |
1145 | 1155 | } |
@@ -1268,6 +1278,10 @@ discard block |
||
1268 | 1278 | } |
1269 | 1279 | |
1270 | 1280 | // find the final set of selectors |
1281 | + |
|
1282 | + /** |
|
1283 | + * @param stdClass $env |
|
1284 | + */ |
|
1271 | 1285 | protected function multiplySelectors($env) { |
1272 | 1286 | $envs = array(); |
1273 | 1287 | while (null !== $env) { |
@@ -1474,6 +1488,9 @@ discard block |
||
1474 | 1488 | $env->store[$name] = $value; |
1475 | 1489 | } |
1476 | 1490 | |
1491 | + /** |
|
1492 | + * @param boolean $defaultValue |
|
1493 | + */ |
|
1477 | 1494 | public function get($name, $defaultValue = null, $env = null) { |
1478 | 1495 | $name = $this->normalizeName($name); |
1479 | 1496 | |
@@ -1503,6 +1520,9 @@ discard block |
||
1503 | 1520 | $this->importPaths[] = $path; |
1504 | 1521 | } |
1505 | 1522 | |
1523 | + /** |
|
1524 | + * @param string $path |
|
1525 | + */ |
|
1506 | 1526 | public function setImportPaths($path) { |
1507 | 1527 | $this->importPaths = (array)$path; |
1508 | 1528 | } |
@@ -1544,6 +1564,10 @@ discard block |
||
1544 | 1564 | } |
1545 | 1565 | |
1546 | 1566 | // results the file path for an import url if it exists |
1567 | + |
|
1568 | + /** |
|
1569 | + * @param string $url |
|
1570 | + */ |
|
1547 | 1571 | public function findImport($url) { |
1548 | 1572 | $urls = array(); |
1549 | 1573 | |
@@ -1579,6 +1603,9 @@ discard block |
||
1579 | 1603 | return null; |
1580 | 1604 | } |
1581 | 1605 | |
1606 | + /** |
|
1607 | + * @param string $name |
|
1608 | + */ |
|
1582 | 1609 | protected function fileExists($name) { |
1583 | 1610 | return is_file($name); |
1584 | 1611 | } |
@@ -1766,6 +1793,11 @@ discard block |
||
1766 | 1793 | return array('hsl', fmod($h, 360), $s * 100, $l * 100); |
1767 | 1794 | } |
1768 | 1795 | |
1796 | + /** |
|
1797 | + * @param double $m1 |
|
1798 | + * @param double $m2 |
|
1799 | + * @param double $h |
|
1800 | + */ |
|
1769 | 1801 | public function hueToRGB($m1, $m2, $h) { |
1770 | 1802 | if ($h < 0) |
1771 | 1803 | $h += 1; |
@@ -1850,6 +1882,10 @@ discard block |
||
1850 | 1882 | } |
1851 | 1883 | |
1852 | 1884 | // helper function for adjust_color, change_color, and scale_color |
1885 | + |
|
1886 | + /** |
|
1887 | + * @param string $fn |
|
1888 | + */ |
|
1853 | 1889 | protected function alter_color($args, $fn) { |
1854 | 1890 | $color = $this->assertColor($args[0]); |
1855 | 1891 | |
@@ -2047,6 +2083,9 @@ discard block |
||
2047 | 2083 | return array("number", $hsl[3], "%"); |
2048 | 2084 | } |
2049 | 2085 | |
2086 | + /** |
|
2087 | + * @param integer $idx |
|
2088 | + */ |
|
2050 | 2089 | protected function adjustHsl($color, $idx, $amount) { |
2051 | 2090 | $hsl = $this->toHSL($color[1], $color[2], $color[3]); |
2052 | 2091 | $hsl[$idx] += $amount; |
@@ -2965,6 +3004,10 @@ discard block |
||
2965 | 3004 | return false; |
2966 | 3005 | } |
2967 | 3006 | |
3007 | + /** |
|
3008 | + * @param string $what |
|
3009 | + * @param boolean $eatWhitespace |
|
3010 | + */ |
|
2968 | 3011 | protected function literal($what, $eatWhitespace = null) { |
2969 | 3012 | if (is_null($eatWhitespace)) $eatWhitespace = $this->eatWhiteDefault; |
2970 | 3013 | |
@@ -2997,6 +3040,9 @@ discard block |
||
2997 | 3040 | return $b; |
2998 | 3041 | } |
2999 | 3042 | |
3043 | + /** |
|
3044 | + * @param string $type |
|
3045 | + */ |
|
3000 | 3046 | protected function pushSpecialBlock($type) { |
3001 | 3047 | $block = $this->pushBlock(null); |
3002 | 3048 | $block->type = $type; |
@@ -3123,6 +3169,9 @@ discard block |
||
3123 | 3169 | return $this->genericList($out, "expression"); |
3124 | 3170 | } |
3125 | 3171 | |
3172 | + /** |
|
3173 | + * @param string $parseItem |
|
3174 | + */ |
|
3126 | 3175 | protected function genericList(&$out, $parseItem, $delim="", $flatten=true) { |
3127 | 3176 | $s = $this->seek(); |
3128 | 3177 | $items = array(); |
@@ -3171,6 +3220,9 @@ discard block |
||
3171 | 3220 | return false; |
3172 | 3221 | } |
3173 | 3222 | |
3223 | + /** |
|
3224 | + * @param integer $minP |
|
3225 | + */ |
|
3174 | 3226 | protected function expHelper($lhs, $minP) { |
3175 | 3227 | $opstr = self::$operatorStr; |
3176 | 3228 | |
@@ -3518,6 +3570,11 @@ discard block |
||
3518 | 3570 | } |
3519 | 3571 | |
3520 | 3572 | // an unbounded string stopped by $end |
3573 | + |
|
3574 | + /** |
|
3575 | + * @param string $end |
|
3576 | + * @param string $nestingOpen |
|
3577 | + */ |
|
3521 | 3578 | protected function openString($end, &$out, $nestingOpen=null) { |
3522 | 3579 | $oldWhite = $this->eatWhiteDefault; |
3523 | 3580 | $this->eatWhiteDefault = false; |
@@ -3850,6 +3907,9 @@ discard block |
||
3850 | 3907 | return false; |
3851 | 3908 | } |
3852 | 3909 | |
3910 | + /** |
|
3911 | + * @param boolean $eatWhitespace |
|
3912 | + */ |
|
3853 | 3913 | protected function keyword(&$word, $eatWhitespace = null) { |
3854 | 3914 | if ($this->match('([\w_\-\*!"\'\\\\][\w\-_"\'\\\\]*)', |
3855 | 3915 | $m, $eatWhitespace)) |
@@ -3959,6 +4019,10 @@ discard block |
||
3959 | 4019 | } |
3960 | 4020 | |
3961 | 4021 | // try to match something on head of buffer |
4022 | + |
|
4023 | + /** |
|
4024 | + * @param string $regex |
|
4025 | + */ |
|
3962 | 4026 | protected function match($regex, &$out, $eatWhitespace = null) { |
3963 | 4027 | if (is_null($eatWhitespace)) $eatWhitespace = $this->eatWhiteDefault; |
3964 | 4028 | |
@@ -3987,6 +4051,9 @@ discard block |
||
3987 | 4051 | return $gotWhite; |
3988 | 4052 | } |
3989 | 4053 | |
4054 | + /** |
|
4055 | + * @param string $regex |
|
4056 | + */ |
|
3990 | 4057 | protected function peek($regex, &$out, $from=null) { |
3991 | 4058 | if (is_null($from)) $from = $this->count; |
3992 | 4059 | |
@@ -4253,6 +4320,7 @@ discard block |
||
4253 | 4320 | /** |
4254 | 4321 | * Get path to cached .css file |
4255 | 4322 | * |
4323 | + * @param string $fname |
|
4256 | 4324 | * @return string |
4257 | 4325 | */ |
4258 | 4326 | protected function cacheName($fname) { |
@@ -4262,6 +4330,7 @@ discard block |
||
4262 | 4330 | /** |
4263 | 4331 | * Get path to cached imports |
4264 | 4332 | * |
4333 | + * @param string $out |
|
4265 | 4334 | * @return string |
4266 | 4335 | */ |
4267 | 4336 | protected function importsCacheName($out) { |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | * Our [testimonial] shortcode. |
503 | 503 | * Prints Testimonial data styled to look good on *any* theme. |
504 | 504 | * |
505 | - * @return jetpack_testimonial_shortcode_html |
|
505 | + * @return string |
|
506 | 506 | */ |
507 | 507 | static function jetpack_testimonial_shortcode( $atts ) { |
508 | 508 | // Default attributes |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | /** |
566 | 566 | * The Testimonial shortcode loop. |
567 | 567 | * |
568 | - * @return html |
|
568 | + * @return string |
|
569 | 569 | */ |
570 | 570 | static function jetpack_testimonial_shortcode_html( $atts ) { |
571 | 571 | // Default query arguments |
@@ -639,6 +639,7 @@ discard block |
||
639 | 639 | /** |
640 | 640 | * Individual testimonial class |
641 | 641 | * |
642 | + * @param integer $testimonial_index_number |
|
642 | 643 | * @return string |
643 | 644 | */ |
644 | 645 | static function get_testimonial_class( $testimonial_index_number, $columns ) { |
@@ -680,7 +681,7 @@ discard block |
||
680 | 681 | /** |
681 | 682 | * Display the featured image if it's available |
682 | 683 | * |
683 | - * @return html |
|
684 | + * @return string|null |
|
684 | 685 | */ |
685 | 686 | static function get_testimonial_thumbnail_link( $post_id ) { |
686 | 687 | if ( has_post_thumbnail( $post_id ) ) { |
@@ -139,7 +139,7 @@ |
||
139 | 139 | * @param string $avatar The <img/> element of the avatar. |
140 | 140 | * @param mixed $author User ID, email address, user login, comment object, user object, post object |
141 | 141 | * |
142 | - * @return The <img/> element of the avatar. |
|
142 | + * @return string <img/> element of the avatar. |
|
143 | 143 | */ |
144 | 144 | function grofiles_get_avatar( $avatar, $author ) { |
145 | 145 | if ( is_numeric( $author ) ) { |
@@ -1283,7 +1283,7 @@ |
||
1283 | 1283 | * Returns an array of stock and custom taxonomy query vars |
1284 | 1284 | * |
1285 | 1285 | * @global $wp_taxonomies |
1286 | - * @return array |
|
1286 | + * @return string[] |
|
1287 | 1287 | */ |
1288 | 1288 | function get_taxonomy_vars() { |
1289 | 1289 | global $wp_taxonomies; |
@@ -58,6 +58,9 @@ |
||
58 | 58 | return latex_render( $latex, $fg, $bg, $s ); |
59 | 59 | } |
60 | 60 | |
61 | +/** |
|
62 | + * @param string $color |
|
63 | + */ |
|
61 | 64 | function latex_get_default_color( $color, $default_color = 'ffffff' ) { |
62 | 65 | global $themecolors; |
63 | 66 | return isset($themecolors[$color]) ? $themecolors[$color] : $default_color; |
@@ -332,6 +332,9 @@ |
||
332 | 332 | <?php |
333 | 333 | } |
334 | 334 | |
335 | + /** |
|
336 | + * @param string $option |
|
337 | + */ |
|
335 | 338 | function admin_likes_get_option( $option ) { |
336 | 339 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
337 | 340 | $option_setting = get_blog_option( get_current_blog_id(), $option, 'on' ); |
@@ -504,6 +504,9 @@ |
||
504 | 504 | ) ); |
505 | 505 | } |
506 | 506 | |
507 | + /** |
|
508 | + * @param string $content |
|
509 | + */ |
|
507 | 510 | protected function comment_hash( $content ) { |
508 | 511 | return 'c-' . substr( md5( $content ), 0, 8 ); |
509 | 512 | } |
@@ -48,6 +48,9 @@ |
||
48 | 48 | add_action( 'init', array( &$this, 'action_init' ) ); |
49 | 49 | } |
50 | 50 | |
51 | + /** |
|
52 | + * @param string $file |
|
53 | + */ |
|
51 | 54 | function wpcom_static_url($file) { |
52 | 55 | $i = hexdec( substr( md5( $file ), -1 ) ) % 2; |
53 | 56 | $url = 'http://s' . $i . '.wp.com' . $file; |