@@ -1020,7 +1020,6 @@ discard block |
||
1020 | 1020 | * Turn on printing of grunion.css stylesheet |
1021 | 1021 | * @see ::style() |
1022 | 1022 | * @internal |
1023 | - * @param bool $style |
|
1024 | 1023 | */ |
1025 | 1024 | static function _style_on() { |
1026 | 1025 | return self::style( true ); |
@@ -1157,6 +1156,7 @@ discard block |
||
1157 | 1156 | * |
1158 | 1157 | * @param int $feedback_id |
1159 | 1158 | * @param object Grunion_Contact_Form $form |
1159 | + * @param Grunion_Contact_Form $form |
|
1160 | 1160 | * |
1161 | 1161 | * @return string $message |
1162 | 1162 | */ |
@@ -1252,7 +1252,7 @@ discard block |
||
1252 | 1252 | * |
1253 | 1253 | * @param array $attributes Key => Value pairs as parsed by shortcode_parse_atts() |
1254 | 1254 | * @param string|null $content The shortcode's inner content: [contact-field]$content[/contact-field] |
1255 | - * @return HTML for the contact form field |
|
1255 | + * @return string for the contact form field |
|
1256 | 1256 | */ |
1257 | 1257 | static function parse_contact_field( $attributes, $content ) { |
1258 | 1258 | // Don't try to parse contact form fields if not inside a contact form |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * Get the value of a setting. |
290 | 290 | * @param string $setting |
291 | 291 | * @access public |
292 | - * @return mixed |
|
292 | + * @return string |
|
293 | 293 | * @version 1.0 |
294 | 294 | */ |
295 | 295 | function get_cfg($setting) { |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | |
359 | 359 | /** |
360 | 360 | * Adds a token to $this->tokens |
361 | - * @param mixed $type |
|
361 | + * @param integer $type |
|
362 | 362 | * @param string $data |
363 | 363 | * @param bool $do add a token even if preserve_css is off |
364 | 364 | * @access private |
@@ -1189,6 +1189,7 @@ discard block |
||
1189 | 1189 | * format("abc, def, ghi") => format("abc, def, ghi") |
1190 | 1190 | * |
1191 | 1191 | * @param string |
1192 | + * @param string $value |
|
1192 | 1193 | * @return array |
1193 | 1194 | */ |
1194 | 1195 |
@@ -38,6 +38,9 @@ |
||
38 | 38 | /* ctype_alpha Check for alphabetic character(s) */ |
39 | 39 | if (!function_exists('ctype_alpha')) { |
40 | 40 | |
41 | + /** |
|
42 | + * @param string $text |
|
43 | + */ |
|
41 | 44 | function ctype_alpha($text) { |
42 | 45 | return preg_match("/[a-zA-Z]/", $text); |
43 | 46 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Constructor |
65 | - * @param array $css contains the class csstidy |
|
65 | + * @param csstidy $css contains the class csstidy |
|
66 | 66 | * @access private |
67 | 67 | * @version 1.0 |
68 | 68 | */ |
@@ -1401,7 +1401,7 @@ discard block |
||
1401 | 1401 | /** |
1402 | 1402 | * Migration routine for moving safecss from wp_options to wp_posts to support revisions |
1403 | 1403 | * |
1404 | - * @return void |
|
1404 | + * @return false|null |
|
1405 | 1405 | */ |
1406 | 1406 | static function upgrade() { |
1407 | 1407 | $css = get_option( 'safecss' ); |
@@ -1809,6 +1809,10 @@ discard block |
||
1809 | 1809 | require_once( dirname( __FILE__ ) . '/csstidy/class.csstidy.php' ); |
1810 | 1810 | |
1811 | 1811 | class safecss extends csstidy_optimise { |
1812 | + |
|
1813 | + /** |
|
1814 | + * @param csstidy $css |
|
1815 | + */ |
|
1812 | 1816 | function __construct( &$css ) { |
1813 | 1817 | return $this->csstidy_optimise( $css ); |
1814 | 1818 | } |
@@ -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 ) ) { |