@@ -461,6 +461,8 @@ discard block |
||
461 | 461 | * @param string cap |
462 | 462 | * @param string join |
463 | 463 | * @param array dash |
464 | + * @param string $cap |
|
465 | + * @param string $join |
|
464 | 466 | */ |
465 | 467 | protected function _set_line_style($width, $cap, $join, $dash) { |
466 | 468 | $this->_pdf->setLineStyle($width, $cap, $join, $dash); |
@@ -496,6 +498,7 @@ discard block |
||
496 | 498 | /** |
497 | 499 | * Convert a GIF image to a PNG image |
498 | 500 | * |
501 | + * @param string $image_url |
|
499 | 502 | * @return string The url of the newly converted image |
500 | 503 | */ |
501 | 504 | protected function _convert_gif_to_png($image_url) { |
@@ -775,8 +778,8 @@ discard block |
||
775 | 778 | * @param string $font the font file to use |
776 | 779 | * @param float $size the font size, in points |
777 | 780 | * @param array $color |
778 | - * @param float $adjust word spacing adjustment |
|
779 | - * @param float $angle angle to write the text at, measured CW starting from the x-axis |
|
781 | + * @param integer $adjust word spacing adjustment |
|
782 | + * @param integer $angle angle to write the text at, measured CW starting from the x-axis |
|
780 | 783 | */ |
781 | 784 | function page_text($x, $y, $text, $font, $size, $color = array(0,0,0), |
782 | 785 | $adjust = 0, $angle = 0) { |
@@ -190,6 +190,9 @@ |
||
190 | 190 | "yellowgreen" => "9ACD32", |
191 | 191 | ); |
192 | 192 | |
193 | + /** |
|
194 | + * @param string $colour |
|
195 | + */ |
|
193 | 196 | static function parse($colour) { |
194 | 197 | if ( is_array($colour) ) |
195 | 198 | // Assume the array has the right format... |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $text the text to be sized |
118 | 118 | * @param string $font the desired font |
119 | 119 | * @param float $size the desired font size |
120 | - * @param float $spacing word spacing, if any |
|
120 | + * @param integer $spacing word spacing, if any |
|
121 | 121 | * @return float |
122 | 122 | */ |
123 | 123 | static function get_text_width($text, $font, $size, $spacing = 0) { |
@@ -234,6 +234,9 @@ discard block |
||
234 | 234 | return self::$_font_lookup; |
235 | 235 | } |
236 | 236 | |
237 | + /** |
|
238 | + * @param string $fontname |
|
239 | + */ |
|
237 | 240 | static function set_font_family($fontname, $entry) { |
238 | 241 | self::$_font_lookup[mb_strtolower($fontname)] = $entry; |
239 | 242 | } |
@@ -662,6 +662,9 @@ |
||
662 | 662 | class FrameList implements IteratorAggregate { |
663 | 663 | protected $_frame; |
664 | 664 | |
665 | + /** |
|
666 | + * @param Frame $frame |
|
667 | + */ |
|
665 | 668 | function __construct($frame) { $this->_frame = $frame; } |
666 | 669 | function getIterator() { return new FrameListIterator($this->_frame); } |
667 | 670 | } |
@@ -155,7 +155,15 @@ discard block |
||
155 | 155 | function get_id() { return $this->_frame->get_id(); } |
156 | 156 | function get_style() { return $this->_frame->get_style(); } |
157 | 157 | function get_original_style() { return $this->_frame->get_original_style(); } |
158 | + |
|
159 | + /** |
|
160 | + * @param string $i |
|
161 | + */ |
|
158 | 162 | function get_containing_block($i = null) { return $this->_frame->get_containing_block($i); } |
163 | + |
|
164 | + /** |
|
165 | + * @param string $i |
|
166 | + */ |
|
159 | 167 | function get_position($i = null) { return $this->_frame->get_position($i); } |
160 | 168 | function get_dompdf() { return $this->_dompdf; } |
161 | 169 | // function get_decorator() { |
@@ -173,6 +181,12 @@ discard block |
||
173 | 181 | function set_id($id) { $this->_frame->set_id($id); } |
174 | 182 | function set_style(Style $style) { $this->_frame->set_style($style); } |
175 | 183 | |
184 | + /** |
|
185 | + * @param double $x |
|
186 | + * @param double $y |
|
187 | + * @param double $w |
|
188 | + * @param double $h |
|
189 | + */ |
|
176 | 190 | function set_containing_block($x = null, $y = null, $w = null, $h = null) { |
177 | 191 | $this->_frame->set_containing_block($x, $y, $w, $h); |
178 | 192 | } |
@@ -60,6 +60,10 @@ |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // FIXME: this is admittedly a little smelly... |
63 | + |
|
64 | + /** |
|
65 | + * @param DOMPDF $dompdf |
|
66 | + */ |
|
63 | 67 | static function decorate_frame(Frame $frame, $dompdf) { |
64 | 68 | if ( is_null($dompdf) ) |
65 | 69 | throw new Exception("foo"); |
@@ -305,6 +305,10 @@ discard block |
||
305 | 305 | */ |
306 | 306 | |
307 | 307 | if ( !function_exists("mb_convert_encoding") ) { |
308 | + |
|
309 | + /** |
|
310 | + * @param string|null $to_encoding |
|
311 | + */ |
|
308 | 312 | function mb_convert_encoding($data, $to_encoding, $from_encoding='UTF-8') { |
309 | 313 | if (str_replace('-', '', strtolower($to_encoding)) == 'utf8') { |
310 | 314 | return utf8_encode($data); |
@@ -327,6 +331,10 @@ discard block |
||
327 | 331 | } |
328 | 332 | |
329 | 333 | if ( !function_exists("mb_internal_encoding") ) { |
334 | + |
|
335 | + /** |
|
336 | + * @param string $encoding |
|
337 | + */ |
|
330 | 338 | function mb_internal_encoding($encoding=NULL) { |
331 | 339 | if (isset($encoding)) { |
332 | 340 | return true; |
@@ -365,6 +373,10 @@ discard block |
||
365 | 373 | } |
366 | 374 | |
367 | 375 | if ( !function_exists("mb_strtoupper") ) { |
376 | + |
|
377 | + /** |
|
378 | + * @param string $str |
|
379 | + */ |
|
368 | 380 | function mb_strtoupper($str) { |
369 | 381 | return strtoupper($str); |
370 | 382 | } |
@@ -380,6 +392,10 @@ discard block |
||
380 | 392 | } |
381 | 393 | |
382 | 394 | if ( !function_exists("mb_substr_count") ) { |
395 | + |
|
396 | + /** |
|
397 | + * @param string $needle |
|
398 | + */ |
|
383 | 399 | function mb_substr_count($haystack, $needle) { |
384 | 400 | return substr_count($haystack, $needle); |
385 | 401 | } |
@@ -442,6 +458,7 @@ discard block |
||
442 | 458 | * Print debug messages |
443 | 459 | * |
444 | 460 | * @param string $type The type of debug messages to print |
461 | + * @param string $msg |
|
445 | 462 | */ |
446 | 463 | function dompdf_debug($type, $msg) { |
447 | 464 | global $_DOMPDF_DEBUG_TYPES; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @param mixed $size The size of image to create: array(x1,y1,x2,y2) or "letter", "legal", etc. |
98 | 98 | * @param string $orientation The orientation of the document (either 'landscape' or 'portrait') |
99 | - * @param float $aa_factor Anti-aliasing factor, 1 for no AA |
|
99 | + * @param integer $aa_factor Anti-aliasing factor, 1 for no AA |
|
100 | 100 | * @param array $bg_color Image background color: array(r,g,b,a), 0 <= r,g,b,a <= 1 |
101 | 101 | */ |
102 | 102 | function __construct($size, $orientation = "portrait", $aa_factor = 1, $bg_color = array(1,1,1,0) ) { |
@@ -536,8 +536,8 @@ discard block |
||
536 | 536 | * @param string $font the font file to use |
537 | 537 | * @param float $size the font size, in points |
538 | 538 | * @param array $color |
539 | - * @param float $adjust word spacing adjustment |
|
540 | - * @param float $angle Text angle |
|
539 | + * @param integer $adjust word spacing adjustment |
|
540 | + * @param integer $angle Text angle |
|
541 | 541 | */ |
542 | 542 | function text($x, $y, $text, $font, $size, $color = array(0,0,0), $adjust = 0, $angle = 0) { |
543 | 543 | |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | * @param string $text the text to be sized |
591 | 591 | * @param string $font the desired font |
592 | 592 | * @param float $size the desired font size |
593 | - * @param float $spacing word spacing, if any |
|
593 | + * @param integer $spacing word spacing, if any |
|
594 | 594 | * @return float |
595 | 595 | */ |
596 | 596 | function get_text_width($text, $font, $size, $spacing = 0) { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | /** |
110 | 110 | * Return the bullet's width |
111 | 111 | * |
112 | - * @return int |
|
112 | + * @return double |
|
113 | 113 | */ |
114 | 114 | function get_width() { |
115 | 115 | //ignore image width, use same width as on predefined bullet List_Bullet_Frame_Decorator |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | /** |
160 | 160 | * Override get_margin_height() |
161 | 161 | * |
162 | - * @return int |
|
162 | + * @return double |
|
163 | 163 | */ |
164 | 164 | function get_margin_height() { |
165 | 165 | //Hits only on "inset" lists items, to increase height of box |