@@ -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; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * Verifies that a user answered the math problem correctly while logging in. |
| 28 | 28 | * |
| 29 | - * @return bool Returns true if the math is correct |
|
| 29 | + * @return boolean|null Returns true if the math is correct |
|
| 30 | 30 | * @throws Error if insuffient $_POST variables are present. |
| 31 | 31 | * @throws Error message if the math is wrong |
| 32 | 32 | */ |