@@ -42,6 +42,9 @@ discard block |
||
42 | 42 | return false; |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param string $mime |
|
47 | + */ |
|
45 | 48 | public function cache($code,$mime) { |
46 | 49 | if($this->nogzip == false) { |
47 | 50 | $file = ($this->delayed ? 'delayed.php' : 'default.php'); |
@@ -240,6 +243,9 @@ discard block |
||
240 | 243 | return true; |
241 | 244 | } |
242 | 245 | |
246 | + /** |
|
247 | + * @param string $dir |
|
248 | + */ |
|
243 | 249 | static function checkCacheDir($dir) { |
244 | 250 | // Check and create if not exists |
245 | 251 | if(!file_exists($dir)) { |
@@ -625,6 +625,9 @@ |
||
625 | 625 | return false; |
626 | 626 | } |
627 | 627 | |
628 | + /** |
|
629 | + * @param string $url |
|
630 | + */ |
|
628 | 631 | private function getFutttaFeeds($url) { |
629 | 632 | if (apply_filters('autoptimize_settingsscreen_remotehttp',true)) { |
630 | 633 | $rss = fetch_feed( $url ); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * |
54 | 54 | * @param array $options (currently ignored) |
55 | 55 | * |
56 | - * @return null |
|
56 | + * @return string |
|
57 | 57 | */ |
58 | 58 | private function __construct($options) { |
59 | 59 | $this->_options = $options; |
@@ -686,6 +686,11 @@ discard block |
||
686 | 686 | * --------------------------------------------------------------------------------------------- |
687 | 687 | */ |
688 | 688 | |
689 | + /** |
|
690 | + * @param double $v1 |
|
691 | + * @param double $v2 |
|
692 | + * @param integer $vh |
|
693 | + */ |
|
689 | 694 | private function hue_to_rgb($v1, $v2, $vh) |
690 | 695 | { |
691 | 696 | $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh); |
@@ -700,6 +705,10 @@ discard block |
||
700 | 705 | return intval(floor(floatval($n) + 0.5), 10); |
701 | 706 | } |
702 | 707 | |
708 | + /** |
|
709 | + * @param integer $min |
|
710 | + * @param integer $max |
|
711 | + */ |
|
703 | 712 | private function clamp_number($n, $min, $max) |
704 | 713 | { |
705 | 714 | return min(max($n, $min), $max); |
@@ -728,7 +737,7 @@ discard block |
||
728 | 737 | * |
729 | 738 | * @param string $str |
730 | 739 | * @param int $start index |
731 | - * @param int|bool $end index (optional) |
|
740 | + * @param integer $end index (optional) |
|
732 | 741 | * @return string |
733 | 742 | */ |
734 | 743 | private function str_slice($str, $start = 0, $end = FALSE) |
@@ -610,6 +610,9 @@ |
||
610 | 610 | return $code; |
611 | 611 | } |
612 | 612 | |
613 | + /** |
|
614 | + * @param string $tag |
|
615 | + */ |
|
613 | 616 | private function ismovable($tag) { |
614 | 617 | if ( apply_filters('autoptimize_filter_css_dontaggregate', false) ) { |
615 | 618 | return false; |
@@ -139,6 +139,10 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // hide everything between noptimize-comment tags |
142 | + |
|
143 | + /** |
|
144 | + * @param string $noptimize_in |
|
145 | + */ |
|
142 | 146 | protected function hide_noptimize($noptimize_in) { |
143 | 147 | if ( preg_match( '/<!--\s?noptimize\s?-->/', $noptimize_in ) ) { |
144 | 148 | $noptimize_out = preg_replace_callback( |
@@ -286,6 +290,9 @@ discard block |
||
286 | 290 | } |
287 | 291 | } |
288 | 292 | |
293 | + /** |
|
294 | + * @param string $tag |
|
295 | + */ |
|
289 | 296 | protected function isremovable($tag, $removables) { |
290 | 297 | foreach ($removables as $match) { |
291 | 298 | if (strpos($tag,$match)!==false) { |
@@ -296,6 +303,10 @@ discard block |
||
296 | 303 | } |
297 | 304 | |
298 | 305 | // inject already minified code in optimized JS/CSS |
306 | + |
|
307 | + /** |
|
308 | + * @return string |
|
309 | + */ |
|
299 | 310 | protected function inject_minified($in) { |
300 | 311 | if ( strpos( $in, '%%INJECTLATER%%' ) !== false ) { |
301 | 312 | $out = preg_replace_callback( |
@@ -342,6 +353,9 @@ discard block |
||
342 | 353 | return $out; |
343 | 354 | } |
344 | 355 | |
356 | + /** |
|
357 | + * @param string $pathIn |
|
358 | + */ |
|
345 | 359 | protected function minify_single($pathIn) { |
346 | 360 | // determine JS or CSS and set var (also mimetype), return false if neither |
347 | 361 | if ( $this->str_ends_in($pathIn,".js") === true ) { |
@@ -405,6 +419,9 @@ discard block |
||
405 | 419 | return $_CachedMinifiedUrl; |
406 | 420 | } |
407 | 421 | |
422 | + /** |
|
423 | + * @param string $needle |
|
424 | + */ |
|
408 | 425 | protected function str_ends_in($haystack,$needle) { |
409 | 426 | $needleLength = strlen($needle); |
410 | 427 | $haystackLength = strlen($haystack); |