@@ -375,8 +375,8 @@ discard block |
||
375 | 375 | /** |
376 | 376 | * Destination object, used to specify the location for the user to jump to, presently on opening |
377 | 377 | * |
378 | - * @param $id |
|
379 | - * @param $action |
|
378 | + * @param integer $id |
|
379 | + * @param string $action |
|
380 | 380 | * @param string $options |
381 | 381 | * @return string|null |
382 | 382 | */ |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | * set the viewer preferences |
422 | 422 | * |
423 | 423 | * @param $id |
424 | - * @param $action |
|
424 | + * @param string $action |
|
425 | 425 | * @param string|array $options |
426 | 426 | * @return string|null |
427 | 427 | */ |
@@ -529,8 +529,8 @@ discard block |
||
529 | 529 | /** |
530 | 530 | * define the document catalog, the overall controller for the document |
531 | 531 | * |
532 | - * @param $id |
|
533 | - * @param $action |
|
532 | + * @param integer $id |
|
533 | + * @param string $action |
|
534 | 534 | * @param string|array $options |
535 | 535 | * @return string|null |
536 | 536 | */ |
@@ -603,8 +603,8 @@ discard block |
||
603 | 603 | /** |
604 | 604 | * object which is a parent to the pages in the document |
605 | 605 | * |
606 | - * @param $id |
|
607 | - * @param $action |
|
606 | + * @param integer $id |
|
607 | + * @param string $action |
|
608 | 608 | * @param string $options |
609 | 609 | * @return string|null |
610 | 610 | */ |
@@ -751,8 +751,8 @@ discard block |
||
751 | 751 | /** |
752 | 752 | * define the outlines in the doc, empty for now |
753 | 753 | * |
754 | - * @param $id |
|
755 | - * @param $action |
|
754 | + * @param integer $id |
|
755 | + * @param string $action |
|
756 | 756 | * @param string $options |
757 | 757 | * @return string|null |
758 | 758 | */ |
@@ -793,8 +793,8 @@ discard block |
||
793 | 793 | /** |
794 | 794 | * an object to hold the font description |
795 | 795 | * |
796 | - * @param $id |
|
797 | - * @param $action |
|
796 | + * @param integer $id |
|
797 | + * @param string $action |
|
798 | 798 | * @param string|array $options |
799 | 799 | * @return string|null |
800 | 800 | */ |
@@ -954,8 +954,8 @@ discard block |
||
954 | 954 | /** |
955 | 955 | * A toUnicode section, needed for unicode fonts |
956 | 956 | * |
957 | - * @param $id |
|
958 | - * @param $action |
|
957 | + * @param integer $id |
|
958 | + * @param string $action |
|
959 | 959 | * @return null|string |
960 | 960 | */ |
961 | 961 | protected function o_toUnicode($id, $action) |
@@ -1014,8 +1014,8 @@ discard block |
||
1014 | 1014 | /** |
1015 | 1015 | * a font descriptor, needed for including additional fonts |
1016 | 1016 | * |
1017 | - * @param $id |
|
1018 | - * @param $action |
|
1017 | + * @param integer $id |
|
1018 | + * @param string $action |
|
1019 | 1019 | * @param string $options |
1020 | 1020 | * @return null|string |
1021 | 1021 | */ |
@@ -1079,8 +1079,8 @@ discard block |
||
1079 | 1079 | /** |
1080 | 1080 | * the font encoding |
1081 | 1081 | * |
1082 | - * @param $id |
|
1083 | - * @param $action |
|
1082 | + * @param integer $id |
|
1083 | + * @param string $action |
|
1084 | 1084 | * @param string $options |
1085 | 1085 | * @return null|string |
1086 | 1086 | */ |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | * a descendent cid font, needed for unicode fonts |
1134 | 1134 | * |
1135 | 1135 | * @param $id |
1136 | - * @param $action |
|
1136 | + * @param string $action |
|
1137 | 1137 | * @param string|array $options |
1138 | 1138 | * @return null|string |
1139 | 1139 | */ |
@@ -1223,8 +1223,8 @@ discard block |
||
1223 | 1223 | /** |
1224 | 1224 | * CID system info section, needed for unicode fonts |
1225 | 1225 | * |
1226 | - * @param $id |
|
1227 | - * @param $action |
|
1226 | + * @param integer $id |
|
1227 | + * @param string $action |
|
1228 | 1228 | * @return null|string |
1229 | 1229 | */ |
1230 | 1230 | protected function o_cidSystemInfo($id, $action) |
@@ -1267,7 +1267,7 @@ discard block |
||
1267 | 1267 | * a font glyph to character map, needed for unicode fonts |
1268 | 1268 | * |
1269 | 1269 | * @param $id |
1270 | - * @param $action |
|
1270 | + * @param string $action |
|
1271 | 1271 | * @param string $options |
1272 | 1272 | * @return null|string |
1273 | 1273 | */ |
@@ -1323,8 +1323,8 @@ discard block |
||
1323 | 1323 | /** |
1324 | 1324 | * the document procset, solves some problems with printing to old PS printers |
1325 | 1325 | * |
1326 | - * @param $id |
|
1327 | - * @param $action |
|
1326 | + * @param integer $id |
|
1327 | + * @param string $action |
|
1328 | 1328 | * @param string $options |
1329 | 1329 | * @return null|string |
1330 | 1330 | */ |
@@ -1369,7 +1369,7 @@ discard block |
||
1369 | 1369 | /** |
1370 | 1370 | * define the document information |
1371 | 1371 | * |
1372 | - * @param $id |
|
1372 | + * @param integer $id |
|
1373 | 1373 | * @param $action |
1374 | 1374 | * @param string $options |
1375 | 1375 | * @return null|string |
@@ -1435,8 +1435,8 @@ discard block |
||
1435 | 1435 | /** |
1436 | 1436 | * an action object, used to link to URLS initially |
1437 | 1437 | * |
1438 | - * @param $id |
|
1439 | - * @param $action |
|
1438 | + * @param integer $id |
|
1439 | + * @param string $action |
|
1440 | 1440 | * @param string $options |
1441 | 1441 | * @return null|string |
1442 | 1442 | */ |
@@ -1496,8 +1496,8 @@ discard block |
||
1496 | 1496 | * an annotation object, this will add an annotation to the current page. |
1497 | 1497 | * initially will support just link annotations |
1498 | 1498 | * |
1499 | - * @param $id |
|
1500 | - * @param $action |
|
1499 | + * @param integer $id |
|
1500 | + * @param string $action |
|
1501 | 1501 | * @param string $options |
1502 | 1502 | * @return null|string |
1503 | 1503 | */ |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | * a page object, it also creates a contents object to hold its contents |
1564 | 1564 | * |
1565 | 1565 | * @param $id |
1566 | - * @param $action |
|
1566 | + * @param string $action |
|
1567 | 1567 | * @param string $options |
1568 | 1568 | * @return null|string |
1569 | 1569 | */ |
@@ -1673,8 +1673,8 @@ discard block |
||
1673 | 1673 | /** |
1674 | 1674 | * the contents objects hold all of the content which appears on pages |
1675 | 1675 | * |
1676 | - * @param $id |
|
1677 | - * @param $action |
|
1676 | + * @param integer $id |
|
1677 | + * @param string $action |
|
1678 | 1678 | * @param string|array $options |
1679 | 1679 | * @return null|string |
1680 | 1680 | */ |
@@ -1739,8 +1739,8 @@ discard block |
||
1739 | 1739 | } |
1740 | 1740 | |
1741 | 1741 | /** |
1742 | - * @param $id |
|
1743 | - * @param $action |
|
1742 | + * @param integer $id |
|
1743 | + * @param string $action |
|
1744 | 1744 | * @return string|null |
1745 | 1745 | */ |
1746 | 1746 | protected function o_embedjs($id, $action) |
@@ -1770,8 +1770,8 @@ discard block |
||
1770 | 1770 | } |
1771 | 1771 | |
1772 | 1772 | /** |
1773 | - * @param $id |
|
1774 | - * @param $action |
|
1773 | + * @param integer $id |
|
1774 | + * @param string $action |
|
1775 | 1775 | * @param string $code |
1776 | 1776 | * @return null|string |
1777 | 1777 | */ |
@@ -1806,8 +1806,8 @@ discard block |
||
1806 | 1806 | /** |
1807 | 1807 | * an image object, will be an XObject in the document, includes description and data |
1808 | 1808 | * |
1809 | - * @param $id |
|
1810 | - * @param $action |
|
1809 | + * @param integer $id |
|
1810 | + * @param string $action |
|
1811 | 1811 | * @param string $options |
1812 | 1812 | * @return null|string |
1813 | 1813 | */ |
@@ -1948,8 +1948,8 @@ discard block |
||
1948 | 1948 | /** |
1949 | 1949 | * graphics state object |
1950 | 1950 | * |
1951 | - * @param $id |
|
1952 | - * @param $action |
|
1951 | + * @param integer $id |
|
1952 | + * @param string $action |
|
1953 | 1953 | * @param string $options |
1954 | 1954 | * @return null|string |
1955 | 1955 | */ |
@@ -2015,8 +2015,8 @@ discard block |
||
2015 | 2015 | /** |
2016 | 2016 | * encryption object. |
2017 | 2017 | * |
2018 | - * @param $id |
|
2019 | - * @param $action |
|
2018 | + * @param integer $id |
|
2019 | + * @param string $action |
|
2020 | 2020 | * @param string $options |
2021 | 2021 | * @return string|null |
2022 | 2022 | */ |
@@ -2650,7 +2650,7 @@ discard block |
||
2650 | 2650 | * note that encoding='none' will need to be used for symbolic fonts |
2651 | 2651 | * and 'differences' => an array of mappings between numbers 0->255 and character names. |
2652 | 2652 | * |
2653 | - * @param $fontName |
|
2653 | + * @param string $fontName |
|
2654 | 2654 | * @param string $encoding |
2655 | 2655 | * @param bool $set |
2656 | 2656 | * @return int |
@@ -4139,11 +4139,11 @@ discard block |
||
4139 | 4139 | * |
4140 | 4140 | * @param $x |
4141 | 4141 | * @param $y |
4142 | - * @param $angle |
|
4142 | + * @param integer $angle |
|
4143 | 4143 | * @param $size |
4144 | - * @param $wa |
|
4144 | + * @param integer $wa |
|
4145 | 4145 | * @param $text |
4146 | - * @return array |
|
4146 | + * @return double[] |
|
4147 | 4147 | */ |
4148 | 4148 | private function getTextPosition($x, $y, $angle, $size, $wa, $text) |
4149 | 4149 | { |
@@ -4638,7 +4638,7 @@ discard block |
||
4638 | 4638 | /** |
4639 | 4639 | * add content to the documents info object |
4640 | 4640 | * |
4641 | - * @param $label |
|
4641 | + * @param string $label |
|
4642 | 4642 | * @param int $value |
4643 | 4643 | */ |
4644 | 4644 | function addInfo($label, $value = 0) |
@@ -4678,8 +4678,8 @@ discard block |
||
4678 | 4678 | * extract an integer from a position in a byte stream |
4679 | 4679 | * |
4680 | 4680 | * @param $data |
4681 | - * @param $pos |
|
4682 | - * @param $num |
|
4681 | + * @param integer $pos |
|
4682 | + * @param integer $num |
|
4683 | 4683 | * @return int |
4684 | 4684 | */ |
4685 | 4685 | private function getBytes(&$data, $pos, $num) |
@@ -4779,8 +4779,8 @@ discard block |
||
4779 | 4779 | * @param $file |
4780 | 4780 | * @param $x |
4781 | 4781 | * @param $y |
4782 | - * @param $w |
|
4783 | - * @param $h |
|
4782 | + * @param integer $w |
|
4783 | + * @param integer $h |
|
4784 | 4784 | * @param $byte |
4785 | 4785 | */ |
4786 | 4786 | protected function addImagePngAlpha($file, $x, $y, $w, $h, $byte) |
@@ -5046,14 +5046,14 @@ discard block |
||
5046 | 5046 | /** |
5047 | 5047 | * add a PNG image into the document, from a memory buffer of the file |
5048 | 5048 | * |
5049 | - * @param $file |
|
5050 | - * @param $x |
|
5051 | - * @param $y |
|
5049 | + * @param string $file |
|
5050 | + * @param double $x |
|
5051 | + * @param double $y |
|
5052 | 5052 | * @param float $w |
5053 | 5053 | * @param float $h |
5054 | - * @param $data |
|
5054 | + * @param null|string $data |
|
5055 | 5055 | * @param bool $is_mask |
5056 | - * @param null $mask |
|
5056 | + * @param boolean|null $mask |
|
5057 | 5057 | */ |
5058 | 5058 | function addPngFromBuf($file, $x, $y, $w = 0.0, $h = 0.0, &$data, $is_mask = false, $mask = null) |
5059 | 5059 | { |
@@ -5389,7 +5389,7 @@ discard block |
||
5389 | 5389 | |
5390 | 5390 | /** |
5391 | 5391 | * common code used by the two JPEG adding functions |
5392 | - * @param $data |
|
5392 | + * @param null|string $data |
|
5393 | 5393 | * @param $x |
5394 | 5394 | * @param $y |
5395 | 5395 | * @param int $w |
@@ -5523,7 +5523,7 @@ discard block |
||
5523 | 5523 | * and for the user to add new ones for their fonts. The default bahavious can be overridden should |
5524 | 5524 | * that be desired. |
5525 | 5525 | * |
5526 | - * @param $family |
|
5526 | + * @param string $family |
|
5527 | 5527 | * @param string $options |
5528 | 5528 | */ |
5529 | 5529 | function setFontFamily($family, $options = '') |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | function __construct($pageSize = array(0, 0, 612, 792), $isUnicode = false, $fontcache = '', $tmp = '') |
344 | 344 | { |
345 | 345 | $this->isUnicode = $isUnicode; |
346 | - $this->fontcache = rtrim($fontcache, DIRECTORY_SEPARATOR."/\\"); |
|
346 | + $this->fontcache = rtrim($fontcache, DIRECTORY_SEPARATOR . "/\\"); |
|
347 | 347 | $this->tmp = ($tmp !== '' ? $tmp : sys_get_temp_dir()); |
348 | 348 | $this->newDocument($pageSize); |
349 | 349 | |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | if (is_string($v)) { |
511 | 511 | $v = '/' . $v; |
512 | 512 | } elseif (is_int($v)) { |
513 | - $v = (string) $v; |
|
513 | + $v = (string)$v; |
|
514 | 514 | } elseif (is_bool($v)) { |
515 | 515 | $v = ($v ? 'true' : 'false'); |
516 | 516 | } elseif (is_array($v)) { |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | |
1004 | 1004 | $res = "\n$id 0 obj\n"; |
1005 | 1005 | $res .= "<</Length " . mb_strlen($stream, '8bit') . " >>\n"; |
1006 | - $res .= "stream\n" . $stream . "\nendstream" . "\nendobj";; |
|
1006 | + $res .= "stream\n" . $stream . "\nendstream" . "\nendobj"; ; |
|
1007 | 1007 | |
1008 | 1008 | return $res; |
1009 | 1009 | } |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | $res .= "/Supplement 0\n"; // The supplement number of the character collection. |
1256 | 1256 | $res .= ">>"; |
1257 | 1257 | |
1258 | - $res .= "\nendobj";; |
|
1258 | + $res .= "\nendobj"; ; |
|
1259 | 1259 | |
1260 | 1260 | return $res; |
1261 | 1261 | } |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | // make the new object |
1819 | 1819 | $this->objects[$id] = array('t' => 'image', 'data' => &$options['data'], 'info' => array()); |
1820 | 1820 | |
1821 | - $info =& $this->objects[$id]['info']; |
|
1821 | + $info = & $this->objects[$id]['info']; |
|
1822 | 1822 | |
1823 | 1823 | $info['Type'] = '/XObject'; |
1824 | 1824 | $info['Subtype'] = '/Image'; |
@@ -2311,7 +2311,7 @@ discard block |
||
2311 | 2311 | } |
2312 | 2312 | |
2313 | 2313 | if ($this->fileIdentifier === '') { |
2314 | - $tmp = implode('', $this->objects[$this->infoObject]['info']); |
|
2314 | + $tmp = implode('', $this->objects[$this->infoObject]['info']); |
|
2315 | 2315 | $this->fileIdentifier = md5('DOMPDF' . __FILE__ . $tmp . microtime() . mt_rand()); |
2316 | 2316 | } |
2317 | 2317 | |
@@ -2416,7 +2416,7 @@ discard block |
||
2416 | 2416 | |
2417 | 2417 | $fontcache = $this->fontcache; |
2418 | 2418 | if ($fontcache == '') { |
2419 | - $fontcache = rtrim($dir, DIRECTORY_SEPARATOR."/\\"); |
|
2419 | + $fontcache = rtrim($dir, DIRECTORY_SEPARATOR . "/\\"); |
|
2420 | 2420 | } |
2421 | 2421 | |
2422 | 2422 | //$name filename without folder and extension of font metrics |