diff --git a/src/Barcode.php b/src/Barcode.php index 9e6defc..35911e8 100644 --- a/src/Barcode.php +++ b/src/Barcode.php @@ -100,7 +100,7 @@ public static function getRendererPluginManager() * @param mixed $rendererConfig OPTIONAL; an array or Traversable object with renderer parameters. * @param boolean $automaticRenderError OPTIONAL; set the automatic rendering of exception * @return Barcode - * @throws Exception + * @throws Exception\ExceptionInterface */ public static function factory($barcode, $renderer = 'image', @@ -151,6 +151,7 @@ public static function factory($barcode, * * @param mixed $barcode String name of barcode class, or Traversable object, or barcode object. * @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters. + * @throws Exception\InvalidArgumentException * @return Object */ public static function makeBarcode($barcode, $barcodeConfig = array()) @@ -204,7 +205,8 @@ public static function makeBarcode($barcode, $barcodeConfig = array()) * * @param mixed $renderer String name of renderer class, or Traversable object. * @param mixed $rendererConfig OPTIONAL; an array or Traversable object with renderer parameters. - * @return Renderer + * @throws Exception\RendererCreationException + * @return Renderer\RendererInterface */ public static function makeRenderer($renderer = 'image', $rendererConfig = array()) { @@ -254,7 +256,7 @@ public static function makeRenderer($renderer = 'image', $rendererConfig = array * Proxy to renderer render() method * * @param string | Object\ObjectInterface | array | Traversable $barcode - * @param string | Renderer $renderer + * @param string | Renderer\RendererInterface $renderer * @param array | Traversable $barcodeConfig * @param array | Traversable $rendererConfig */ @@ -270,7 +272,7 @@ public static function render($barcode, * Proxy to renderer draw() method * * @param string | Object\ObjectInterface | array | Traversable $barcode - * @param string | Renderer $renderer + * @param string | Renderer\RendererInterface $renderer * @param array | Traversable $barcodeConfig * @param array | Traversable $rendererConfig * @return mixed diff --git a/src/Object/AbstractObject.php b/src/Object/AbstractObject.php index 19c83d9..249affc 100644 --- a/src/Object/AbstractObject.php +++ b/src/Object/AbstractObject.php @@ -836,7 +836,7 @@ protected function addText( /** * Checking of parameters after all settings - * @return void + * @return bool */ public function checkParams() { diff --git a/src/Object/Code128.php b/src/Object/Code128.php index c50f751..eed0497 100644 --- a/src/Object/Code128.php +++ b/src/Object/Code128.php @@ -195,6 +195,7 @@ protected static function _isDigit($string, $pos, $length = 2) /** * Convert string to barcode string + * @param string $string * @return array */ protected function convertToBarcodeChars($string) @@ -274,7 +275,7 @@ protected function convertToBarcodeChars($string) /** * Set text to encode * @param string $value - * @return Zend_Barcode_Object + * @return Code128 */ public function setText($value) { diff --git a/src/Object/Code39.php b/src/Object/Code39.php index 6e0aea2..af3991c 100644 --- a/src/Object/Code39.php +++ b/src/Object/Code39.php @@ -93,7 +93,7 @@ protected function calculateBarcodeWidth() /** * Set text to encode * @param string $value - * @return Zend_Barcode_Object + * @return Code39 */ public function setText($value) { diff --git a/src/Object/Ean8.php b/src/Object/Ean8.php index cccc549..b37dda1 100644 --- a/src/Object/Ean8.php +++ b/src/Object/Ean8.php @@ -130,8 +130,10 @@ protected function drawText() /** * Particular validation for Ean8 barcode objects * (to suppress checksum character substitution) + * * @param string $value * @param array $options + * @throws Exception\BarcodeValidationException */ protected function validateSpecificText($value, $options = array()) { diff --git a/src/Object/Error.php b/src/Object/Error.php index 18aa46e..91c6192 100644 --- a/src/Object/Error.php +++ b/src/Object/Error.php @@ -30,6 +30,7 @@ public function validateText($value) /** * Height is forced + * @param bool $recalculate * @return integer */ public function getHeight($recalculate = false) diff --git a/src/Object/Upce.php b/src/Object/Upce.php index 5f7c53c..b50088f 100644 --- a/src/Object/Upce.php +++ b/src/Object/Upce.php @@ -168,8 +168,10 @@ protected function drawText() /** * Particular validation for Upce barcode objects * (to suppress checksum character substitution) + * * @param string $value * @param array $options + * @throws Exception\BarcodeValidationException */ protected function validateSpecificText($value, $options = array()) { diff --git a/src/Renderer/AbstractRenderer.php b/src/Renderer/AbstractRenderer.php index 88eb8af..4d1d34f 100644 --- a/src/Renderer/AbstractRenderer.php +++ b/src/Renderer/AbstractRenderer.php @@ -390,6 +390,8 @@ protected function adjustPosition($supportHeight, $supportWidth) /** * Draw the barcode in the rendering resource + * + * @throws BarcodeException\ExceptionInterface * @return mixed */ public function draw() diff --git a/src/Renderer/Image.php b/src/Renderer/Image.php index f3930ff..3b9a589 100644 --- a/src/Renderer/Image.php +++ b/src/Renderer/Image.php @@ -67,7 +67,9 @@ class Image extends AbstractRenderer /** * Constructor + * * @param array|\Traversable $options + * @throws RendererCreationException */ public function __construct($options = null) { @@ -80,9 +82,10 @@ public function __construct($options = null) /** * Set height of the result image + * * @param null|integer $value + * @throws Exception\OutOfRangeException * @return Image - * @throw Exception */ public function setHeight($value) { @@ -109,7 +112,8 @@ public function getHeight() * Set barcode width * * @param mixed $value - * @return void + * @throws Exception\OutOfRangeException + * @return self */ public function setWidth($value) { @@ -135,9 +139,9 @@ public function getWidth() /** * Set an image resource to draw the barcode inside * - * @param resource $value + * @param resource $image * @return Image - * @throw Exception + * @throws Exception\InvalidArgumentException */ public function setResource($image) { @@ -154,8 +158,8 @@ public function setResource($image) * Set the image type to produce (png, jpeg, gif) * * @param string $value + * @throws Exception\InvalidArgumentException * @return Image - * @throw Exception */ public function setImageType($value) { @@ -260,6 +264,7 @@ protected function checkSpecificParams() /** * Check barcode dimensions * + * @throws Exception\RuntimeException * @return void */ protected function checkDimensions() @@ -359,6 +364,7 @@ protected function drawPolygon($points, $color, $filled = true) * @param integer $color * @param string $alignment * @param float $orientation + * @throws Exception\RuntimeException */ protected function drawText($text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0) { diff --git a/src/Renderer/RendererInterface.php b/src/Renderer/RendererInterface.php index b38b15f..ea5ccdf 100644 --- a/src/Renderer/RendererInterface.php +++ b/src/Renderer/RendererInterface.php @@ -30,7 +30,7 @@ public function __construct($options = null); /** * Set renderer state from options array * @param array $options - * @return Renderer + * @return RendererInterface */ public function setOptions($options); @@ -38,7 +38,7 @@ public function setOptions($options); * Set renderer namespace for autoloading * * @param string $namespace - * @return Renderer + * @return RendererInterface */ public function setRendererNamespace($namespace); @@ -58,7 +58,7 @@ public function getType(); /** * Manually adjust top position * @param integer $value - * @return Renderer + * @return RendererInterface */ public function setTopOffset($value); @@ -71,7 +71,7 @@ public function getTopOffset(); /** * Manually adjust left position * @param integer $value - * @return Renderer + * @return RendererInterface */ public function setLeftOffset($value); @@ -90,7 +90,7 @@ public function setAutomaticRenderError($value); /** * Horizontal position of the barcode in the rendering resource * @param string $value - * @return Renderer + * @return RendererInterface */ public function setHorizontalPosition($value); @@ -103,7 +103,7 @@ public function getHorizontalPosition(); /** * Vertical position of the barcode in the rendering resource * @param string $value - * @return Renderer + * @return RendererInterface */ public function setVerticalPosition($value); @@ -116,7 +116,7 @@ public function getVerticalPosition(); /** * Set the size of a module * @param float $value - * @return Renderer + * @return RendererInterface */ public function setModuleSize($value); @@ -135,7 +135,7 @@ public function getAutomaticRenderError(); /** * Set the barcode object * @param ObjectInterface $barcode - * @return Renderer + * @return RendererInterface */ public function setBarcode(ObjectInterface $barcode); diff --git a/src/Renderer/Svg.php b/src/Renderer/Svg.php index b8ff722..1b19fc6 100644 --- a/src/Renderer/Svg.php +++ b/src/Renderer/Svg.php @@ -11,6 +11,7 @@ namespace Zend\Barcode\Renderer; use DOMDocument; +use DOMElement; use DOMText; /** @@ -49,8 +50,8 @@ class Svg extends AbstractRenderer /** * Set height of the result image * @param null|integer $value + * @throws Exception\OutOfRangeException * @return Svg - * @throw Exception */ public function setHeight($value) { @@ -77,7 +78,8 @@ public function getHeight() * Set barcode width * * @param mixed $value - * @return void + * @throws Exception\OutOfRangeException + * @return self */ public function setWidth($value) { @@ -215,6 +217,7 @@ protected function checkSpecificParams() /** * Check barcode dimensions * + * @throws Exception\RuntimeException * @return void */ protected function checkDimensions()