@@ -213,8 +213,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract
213
213
214
214
/**
215
215
* Constructor
216
+ *
216
217
* @param array|Zend_Config $options
217
- * @return void
218
218
*/
219
219
public function __construct ($ options = null )
220
220
{
@@ -304,7 +304,7 @@ public function getType()
304
304
* Set height of the barcode bar
305
305
* @param integer $value
306
306
* @return Zend_Barcode_Object
307
- * @throw Zend_Barcode_Object_Exception
307
+ * @throws Zend_Barcode_Object_Exception
308
308
*/
309
309
public function setBarHeight ($ value )
310
310
{
@@ -331,7 +331,7 @@ public function getBarHeight()
331
331
* Set thickness of thin bar
332
332
* @param integer $value
333
333
* @return Zend_Barcode_Object
334
- * @throw Zend_Barcode_Object_Exception
334
+ * @throws Zend_Barcode_Object_Exception
335
335
*/
336
336
public function setBarThinWidth ($ value )
337
337
{
@@ -358,7 +358,7 @@ public function getBarThinWidth()
358
358
* Set thickness of thick bar
359
359
* @param integer $value
360
360
* @return Zend_Barcode_Object
361
- * @throw Zend_Barcode_Object_Exception
361
+ * @throws Zend_Barcode_Object_Exception
362
362
*/
363
363
public function setBarThickWidth ($ value )
364
364
{
@@ -386,7 +386,7 @@ public function getBarThickWidth()
386
386
* thinBarWidth - thickBarWidth - barHeight - fontSize
387
387
* @param float $value
388
388
* @return Zend_Barcode_Object
389
- * @throw Zend_Barcode_Object_Exception
389
+ * @throws Zend_Barcode_Object_Exception
390
390
*/
391
391
public function setFactor ($ value )
392
392
{
@@ -414,7 +414,7 @@ public function getFactor()
414
414
* Set color of the barcode and text
415
415
* @param string $value
416
416
* @return Zend_Barcode_Object
417
- * @throw Zend_Barcode_Object_Exception
417
+ * @throws Zend_Barcode_Object_Exception
418
418
*/
419
419
public function setForeColor ($ value )
420
420
{
@@ -444,7 +444,7 @@ public function getForeColor()
444
444
* Set the color of the background
445
445
* @param integer $value
446
446
* @return Zend_Barcode_Object
447
- * @throw Zend_Barcode_Object_Exception
447
+ * @throws Zend_Barcode_Object_Exception
448
448
*/
449
449
public function setBackgroundColor ($ value )
450
450
{
@@ -526,7 +526,7 @@ public function setReverseColor()
526
526
* Set orientation of barcode and text
527
527
* @param float $value
528
528
* @return Zend_Barcode_Object
529
- * @throw Zend_Barcode_Object_Exception
529
+ * @throws Zend_Barcode_Object_Exception
530
530
*/
531
531
public function setOrientation ($ value )
532
532
{
@@ -569,8 +569,10 @@ public function getText()
569
569
570
570
/**
571
571
* Automatically add leading zeros if barcode length is fixed
572
- * @param string $text
572
+ *
573
+ * @param string $text
573
574
* @param boolean $withoutChecksum
575
+ * @return string
574
576
*/
575
577
protected function _addLeadingZeros ($ text , $ withoutChecksum = false )
576
578
{
@@ -637,7 +639,7 @@ public function getDrawText()
637
639
* of the characters to the position of the bars
638
640
* @param boolean $value
639
641
* @return Zend_Barcode_Object
640
- * @throw Zend_Barcode_Object_Exception
642
+ * @throws Zend_Barcode_Object_Exception
641
643
*/
642
644
public function setStretchText ($ value )
643
645
{
@@ -686,7 +688,7 @@ public function getWithChecksum()
686
688
* added to the barcode text
687
689
* @param boolean $value
688
690
* @return Zend_Barcode_Object
689
- * @throw Zend_Barcode_Object_Exception
691
+ * @throws Zend_Barcode_Object_Exception
690
692
*/
691
693
public function setWithChecksumInText ($ value )
692
694
{
@@ -724,7 +726,7 @@ public static function setBarcodeFont($font)
724
726
* - if string, $value is assumed to be the path to a TTF font
725
727
* @param integer|string $value
726
728
* @return Zend_Barcode_Object
727
- * @throw Zend_Barcode_Object_Exception
729
+ * @throws Zend_Barcode_Object_Exception
728
730
*/
729
731
public function setFont ($ value )
730
732
{
@@ -766,7 +768,7 @@ public function getFont()
766
768
* Set the size of the font in case of TTF
767
769
* @param float $value
768
770
* @return Zend_Barcode_Object
769
- * @throw Zend_Barcode_Object_Exception
771
+ * @throws Zend_Barcode_Object_Exception
770
772
*/
771
773
public function setFontSize ($ value )
772
774
{
@@ -848,13 +850,14 @@ protected function _addPolygon(array $points, $color = null, $filled = true)
848
850
849
851
/**
850
852
* 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
858
861
*/
859
862
protected function _addText (
860
863
$ text ,
@@ -882,7 +885,8 @@ protected function _addText(
882
885
883
886
/**
884
887
* Checking of parameters after all settings
885
- * @return void
888
+ *
889
+ * @return bool
886
890
*/
887
891
public function checkParams ()
888
892
{
@@ -894,8 +898,10 @@ public function checkParams()
894
898
895
899
/**
896
900
* Check if a text is really provided to barcode
901
+ *
902
+ * @param string|null $value
897
903
* @return void
898
- * @throw Zend_Barcode_Object_Exception
904
+ * @throws Zend_Barcode_Object_Exception
899
905
*/
900
906
protected function _checkText ($ value = null )
901
907
{
@@ -913,10 +919,11 @@ protected function _checkText($value = null)
913
919
914
920
/**
915
921
* 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
918
925
* @return void
919
- * @throw Zend_Barcode_Object_Exception
926
+ * @throws Zend_Barcode_Object_Exception
920
927
*/
921
928
protected function _checkRatio ($ min = 2 , $ max = 3 )
922
929
{
@@ -934,8 +941,9 @@ protected function _checkRatio($min = 2, $max = 3)
934
941
935
942
/**
936
943
* Drawing with an angle is just allow TTF font
944
+ *
937
945
* @return void
938
- * @throw Zend_Barcode_Object_Exception
946
+ * @throws Zend_Barcode_Object_Exception
939
947
*/
940
948
protected function _checkFontAndOrientation ()
941
949
{
@@ -948,8 +956,8 @@ protected function _checkFontAndOrientation()
948
956
}
949
957
950
958
/**
951
- * Width of the result image
952
- * (before any rotation)
959
+ * Width of the result image (before any rotation)
960
+ *
953
961
* @return integer
954
962
*/
955
963
protected function _calculateWidth ()
@@ -961,13 +969,15 @@ protected function _calculateWidth()
961
969
962
970
/**
963
971
* Calculate the width of the barcode
972
+ *
964
973
* @return integer
965
974
*/
966
975
abstract protected function _calculateBarcodeWidth ();
967
976
968
977
/**
969
978
* Height of the result object
970
- * @return integer
979
+ *
980
+ * @return int
971
981
*/
972
982
protected function _calculateHeight ()
973
983
{
@@ -978,7 +988,8 @@ protected function _calculateHeight()
978
988
979
989
/**
980
990
* Height of the barcode
981
- * @return integer
991
+ *
992
+ * @return int
982
993
*/
983
994
protected function _calculateBarcodeHeight ()
984
995
{
@@ -993,7 +1004,9 @@ protected function _calculateBarcodeHeight()
993
1004
994
1005
/**
995
1006
* Get height of the result object
996
- * @return integer
1007
+ *
1008
+ * @param bool $recalculate
1009
+ * @return int
997
1010
*/
998
1011
public function getHeight ($ recalculate = false )
999
1012
{
@@ -1007,7 +1020,9 @@ public function getHeight($recalculate = false)
1007
1020
1008
1021
/**
1009
1022
* Get width of the result object
1010
- * @return integer
1023
+ *
1024
+ * @param bool $recalculate
1025
+ * @return int
1011
1026
*/
1012
1027
public function getWidth ($ recalculate = false )
1013
1028
{
@@ -1022,7 +1037,8 @@ public function getWidth($recalculate = false)
1022
1037
/**
1023
1038
* Calculate the offset from the left of the object
1024
1039
* if an orientation is activated
1025
- * @param boolean $recalculate
1040
+ *
1041
+ * @param bool $recalculate
1026
1042
* @return float
1027
1043
*/
1028
1044
public function getOffsetLeft ($ recalculate = false )
@@ -1049,7 +1065,8 @@ public function getOffsetLeft($recalculate = false)
1049
1065
/**
1050
1066
* Calculate the offset from the top of the object
1051
1067
* if an orientation is activated
1052
- * @param boolean $recalculate
1068
+ *
1069
+ * @param bool $recalculate
1053
1070
* @return float
1054
1071
*/
1055
1072
public function getOffsetTop ($ recalculate = false )
@@ -1075,6 +1092,7 @@ public function getOffsetTop($recalculate = false)
1075
1092
1076
1093
/**
1077
1094
* Apply rotation on a point in X/Y dimensions
1095
+ *
1078
1096
* @param float $x1 x-position before rotation
1079
1097
* @param float $y1 y-position before rotation
1080
1098
* @return array Array of two elements corresponding to the new XY point
@@ -1092,6 +1110,7 @@ protected function _rotate($x1, $y1)
1092
1110
1093
1111
/**
1094
1112
* Complete drawing of the barcode
1113
+ *
1095
1114
* @return array Table of instructions
1096
1115
*/
1097
1116
public function draw ()
@@ -1105,6 +1124,7 @@ public function draw()
1105
1124
1106
1125
/**
1107
1126
* Draw the barcode
1127
+ *
1108
1128
* @return void
1109
1129
*/
1110
1130
protected function _drawBarcode ()
@@ -1162,6 +1182,7 @@ protected function _drawBarcode()
1162
1182
1163
1183
/**
1164
1184
* Partial function to draw border
1185
+ *
1165
1186
* @return void
1166
1187
*/
1167
1188
protected function _drawBorder ()
@@ -1241,8 +1262,10 @@ public function validateText($value)
1241
1262
1242
1263
/**
1243
1264
* Standard validation for most of barcode objects
1265
+ *
1244
1266
* @param string $value
1245
1267
* @param array $options
1268
+ * @throws Zend_Barcode_Object_Exception
1246
1269
*/
1247
1270
protected function _validateText ($ value , $ options = array ())
1248
1271
{
0 commit comments