Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit ce3e66d

Browse files
committed
Fixes DocBlocks in Zend_Barcode_Object_ObjectAbstract
1 parent 34e97fa commit ce3e66d

File tree

1 file changed

+57
-34
lines changed

1 file changed

+57
-34
lines changed

library/Zend/Barcode/Object/ObjectAbstract.php

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract
213213

214214
/**
215215
* Constructor
216+
*
216217
* @param array|Zend_Config $options
217-
* @return void
218218
*/
219219
public function __construct($options = null)
220220
{
@@ -304,7 +304,7 @@ public function getType()
304304
* Set height of the barcode bar
305305
* @param integer $value
306306
* @return Zend_Barcode_Object
307-
* @throw Zend_Barcode_Object_Exception
307+
* @throws Zend_Barcode_Object_Exception
308308
*/
309309
public function setBarHeight($value)
310310
{
@@ -331,7 +331,7 @@ public function getBarHeight()
331331
* Set thickness of thin bar
332332
* @param integer $value
333333
* @return Zend_Barcode_Object
334-
* @throw Zend_Barcode_Object_Exception
334+
* @throws Zend_Barcode_Object_Exception
335335
*/
336336
public function setBarThinWidth($value)
337337
{
@@ -358,7 +358,7 @@ public function getBarThinWidth()
358358
* Set thickness of thick bar
359359
* @param integer $value
360360
* @return Zend_Barcode_Object
361-
* @throw Zend_Barcode_Object_Exception
361+
* @throws Zend_Barcode_Object_Exception
362362
*/
363363
public function setBarThickWidth($value)
364364
{
@@ -386,7 +386,7 @@ public function getBarThickWidth()
386386
* thinBarWidth - thickBarWidth - barHeight - fontSize
387387
* @param float $value
388388
* @return Zend_Barcode_Object
389-
* @throw Zend_Barcode_Object_Exception
389+
* @throws Zend_Barcode_Object_Exception
390390
*/
391391
public function setFactor($value)
392392
{
@@ -414,7 +414,7 @@ public function getFactor()
414414
* Set color of the barcode and text
415415
* @param string $value
416416
* @return Zend_Barcode_Object
417-
* @throw Zend_Barcode_Object_Exception
417+
* @throws Zend_Barcode_Object_Exception
418418
*/
419419
public function setForeColor($value)
420420
{
@@ -444,7 +444,7 @@ public function getForeColor()
444444
* Set the color of the background
445445
* @param integer $value
446446
* @return Zend_Barcode_Object
447-
* @throw Zend_Barcode_Object_Exception
447+
* @throws Zend_Barcode_Object_Exception
448448
*/
449449
public function setBackgroundColor($value)
450450
{
@@ -526,7 +526,7 @@ public function setReverseColor()
526526
* Set orientation of barcode and text
527527
* @param float $value
528528
* @return Zend_Barcode_Object
529-
* @throw Zend_Barcode_Object_Exception
529+
* @throws Zend_Barcode_Object_Exception
530530
*/
531531
public function setOrientation($value)
532532
{
@@ -569,8 +569,10 @@ public function getText()
569569

570570
/**
571571
* Automatically add leading zeros if barcode length is fixed
572-
* @param string $text
572+
*
573+
* @param string $text
573574
* @param boolean $withoutChecksum
575+
* @return string
574576
*/
575577
protected function _addLeadingZeros($text, $withoutChecksum = false)
576578
{
@@ -637,7 +639,7 @@ public function getDrawText()
637639
* of the characters to the position of the bars
638640
* @param boolean $value
639641
* @return Zend_Barcode_Object
640-
* @throw Zend_Barcode_Object_Exception
642+
* @throws Zend_Barcode_Object_Exception
641643
*/
642644
public function setStretchText($value)
643645
{
@@ -686,7 +688,7 @@ public function getWithChecksum()
686688
* added to the barcode text
687689
* @param boolean $value
688690
* @return Zend_Barcode_Object
689-
* @throw Zend_Barcode_Object_Exception
691+
* @throws Zend_Barcode_Object_Exception
690692
*/
691693
public function setWithChecksumInText($value)
692694
{
@@ -724,7 +726,7 @@ public static function setBarcodeFont($font)
724726
* - if string, $value is assumed to be the path to a TTF font
725727
* @param integer|string $value
726728
* @return Zend_Barcode_Object
727-
* @throw Zend_Barcode_Object_Exception
729+
* @throws Zend_Barcode_Object_Exception
728730
*/
729731
public function setFont($value)
730732
{
@@ -766,7 +768,7 @@ public function getFont()
766768
* Set the size of the font in case of TTF
767769
* @param float $value
768770
* @return Zend_Barcode_Object
769-
* @throw Zend_Barcode_Object_Exception
771+
* @throws Zend_Barcode_Object_Exception
770772
*/
771773
public function setFontSize($value)
772774
{
@@ -848,13 +850,14 @@ protected function _addPolygon(array $points, $color = null, $filled = true)
848850

849851
/**
850852
* Add a text drawing instruction in the set of instructions
851-
* @param string $text
852-
* @param float $size
853-
* @param array $position
854-
* @param string $font
855-
* @param integer $color
856-
* @param string $alignment
857-
* @param float $orientation
853+
*
854+
* @param string $text
855+
* @param float $size
856+
* @param array $position
857+
* @param string $font
858+
* @param integer $color
859+
* @param string $alignment
860+
* @param float|int $orientation
858861
*/
859862
protected function _addText(
860863
$text,
@@ -882,7 +885,8 @@ protected function _addText(
882885

883886
/**
884887
* Checking of parameters after all settings
885-
* @return void
888+
*
889+
* @return bool
886890
*/
887891
public function checkParams()
888892
{
@@ -894,8 +898,10 @@ public function checkParams()
894898

895899
/**
896900
* Check if a text is really provided to barcode
901+
*
902+
* @param string|null $value
897903
* @return void
898-
* @throw Zend_Barcode_Object_Exception
904+
* @throws Zend_Barcode_Object_Exception
899905
*/
900906
protected function _checkText($value = null)
901907
{
@@ -913,10 +919,11 @@ protected function _checkText($value = null)
913919

914920
/**
915921
* Check the ratio between the thick and the thin bar
916-
* @param integer $min
917-
* @param integer $max
922+
*
923+
* @param int $min
924+
* @param int $max
918925
* @return void
919-
* @throw Zend_Barcode_Object_Exception
926+
* @throws Zend_Barcode_Object_Exception
920927
*/
921928
protected function _checkRatio($min = 2, $max = 3)
922929
{
@@ -934,8 +941,9 @@ protected function _checkRatio($min = 2, $max = 3)
934941

935942
/**
936943
* Drawing with an angle is just allow TTF font
944+
*
937945
* @return void
938-
* @throw Zend_Barcode_Object_Exception
946+
* @throws Zend_Barcode_Object_Exception
939947
*/
940948
protected function _checkFontAndOrientation()
941949
{
@@ -948,8 +956,8 @@ protected function _checkFontAndOrientation()
948956
}
949957

950958
/**
951-
* Width of the result image
952-
* (before any rotation)
959+
* Width of the result image (before any rotation)
960+
*
953961
* @return integer
954962
*/
955963
protected function _calculateWidth()
@@ -961,13 +969,15 @@ protected function _calculateWidth()
961969

962970
/**
963971
* Calculate the width of the barcode
972+
*
964973
* @return integer
965974
*/
966975
abstract protected function _calculateBarcodeWidth();
967976

968977
/**
969978
* Height of the result object
970-
* @return integer
979+
*
980+
* @return int
971981
*/
972982
protected function _calculateHeight()
973983
{
@@ -978,7 +988,8 @@ protected function _calculateHeight()
978988

979989
/**
980990
* Height of the barcode
981-
* @return integer
991+
*
992+
* @return int
982993
*/
983994
protected function _calculateBarcodeHeight()
984995
{
@@ -993,7 +1004,9 @@ protected function _calculateBarcodeHeight()
9931004

9941005
/**
9951006
* Get height of the result object
996-
* @return integer
1007+
*
1008+
* @param bool $recalculate
1009+
* @return int
9971010
*/
9981011
public function getHeight($recalculate = false)
9991012
{
@@ -1007,7 +1020,9 @@ public function getHeight($recalculate = false)
10071020

10081021
/**
10091022
* Get width of the result object
1010-
* @return integer
1023+
*
1024+
* @param bool $recalculate
1025+
* @return int
10111026
*/
10121027
public function getWidth($recalculate = false)
10131028
{
@@ -1022,7 +1037,8 @@ public function getWidth($recalculate = false)
10221037
/**
10231038
* Calculate the offset from the left of the object
10241039
* if an orientation is activated
1025-
* @param boolean $recalculate
1040+
*
1041+
* @param bool $recalculate
10261042
* @return float
10271043
*/
10281044
public function getOffsetLeft($recalculate = false)
@@ -1049,7 +1065,8 @@ public function getOffsetLeft($recalculate = false)
10491065
/**
10501066
* Calculate the offset from the top of the object
10511067
* if an orientation is activated
1052-
* @param boolean $recalculate
1068+
*
1069+
* @param bool $recalculate
10531070
* @return float
10541071
*/
10551072
public function getOffsetTop($recalculate = false)
@@ -1075,6 +1092,7 @@ public function getOffsetTop($recalculate = false)
10751092

10761093
/**
10771094
* Apply rotation on a point in X/Y dimensions
1095+
*
10781096
* @param float $x1 x-position before rotation
10791097
* @param float $y1 y-position before rotation
10801098
* @return array Array of two elements corresponding to the new XY point
@@ -1092,6 +1110,7 @@ protected function _rotate($x1, $y1)
10921110

10931111
/**
10941112
* Complete drawing of the barcode
1113+
*
10951114
* @return array Table of instructions
10961115
*/
10971116
public function draw()
@@ -1105,6 +1124,7 @@ public function draw()
11051124

11061125
/**
11071126
* Draw the barcode
1127+
*
11081128
* @return void
11091129
*/
11101130
protected function _drawBarcode()
@@ -1162,6 +1182,7 @@ protected function _drawBarcode()
11621182

11631183
/**
11641184
* Partial function to draw border
1185+
*
11651186
* @return void
11661187
*/
11671188
protected function _drawBorder()
@@ -1241,8 +1262,10 @@ public function validateText($value)
12411262

12421263
/**
12431264
* Standard validation for most of barcode objects
1265+
*
12441266
* @param string $value
12451267
* @param array $options
1268+
* @throws Zend_Barcode_Object_Exception
12461269
*/
12471270
protected function _validateText($value, $options = array())
12481271
{

0 commit comments

Comments
 (0)