Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/phpdoc-mismatch' of https://github.com/micheh/zf2
Browse files Browse the repository at this point in the history
… into hotfix/phpdoc
  • Loading branch information
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 22 deletions.
10 changes: 6 additions & 4 deletions src/Barcode.php
Expand Up @@ -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',
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
{
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Object/AbstractObject.php
Expand Up @@ -836,7 +836,7 @@ protected function addText(

/**
* Checking of parameters after all settings
* @return void
* @return bool
*/
public function checkParams()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Object/Code128.php
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Object/Code39.php
Expand Up @@ -93,7 +93,7 @@ protected function calculateBarcodeWidth()
/**
* Set text to encode
* @param string $value
* @return Zend_Barcode_Object
* @return Code39
*/
public function setText($value)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Object/Ean8.php
Expand Up @@ -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())
{
Expand Down
1 change: 1 addition & 0 deletions src/Object/Error.php
Expand Up @@ -30,6 +30,7 @@ public function validateText($value)

/**
* Height is forced
* @param bool $recalculate
* @return integer
*/
public function getHeight($recalculate = false)
Expand Down
2 changes: 2 additions & 0 deletions src/Object/Upce.php
Expand Up @@ -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())
{
Expand Down
2 changes: 2 additions & 0 deletions src/Renderer/AbstractRenderer.php
Expand Up @@ -390,6 +390,8 @@ protected function adjustPosition($supportHeight, $supportWidth)

/**
* Draw the barcode in the rendering resource
*
* @throws BarcodeException\ExceptionInterface
* @return mixed
*/
public function draw()
Expand Down
16 changes: 11 additions & 5 deletions src/Renderer/Image.php
Expand Up @@ -67,7 +67,9 @@ class Image extends AbstractRenderer

/**
* Constructor
*
* @param array|\Traversable $options
* @throws RendererCreationException
*/
public function __construct($options = null)
{
Expand All @@ -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)
{
Expand All @@ -109,7 +112,8 @@ public function getHeight()
* Set barcode width
*
* @param mixed $value
* @return void
* @throws Exception\OutOfRangeException
* @return self
*/
public function setWidth($value)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -260,6 +264,7 @@ protected function checkSpecificParams()
/**
* Check barcode dimensions
*
* @throws Exception\RuntimeException
* @return void
*/
protected function checkDimensions()
Expand Down Expand Up @@ -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)
{
Expand Down
16 changes: 8 additions & 8 deletions src/Renderer/RendererInterface.php
Expand Up @@ -30,15 +30,15 @@ public function __construct($options = null);
/**
* Set renderer state from options array
* @param array $options
* @return Renderer
* @return RendererInterface
*/
public function setOptions($options);

/**
* Set renderer namespace for autoloading
*
* @param string $namespace
* @return Renderer
* @return RendererInterface
*/
public function setRendererNamespace($namespace);

Expand All @@ -58,7 +58,7 @@ public function getType();
/**
* Manually adjust top position
* @param integer $value
* @return Renderer
* @return RendererInterface
*/
public function setTopOffset($value);

Expand All @@ -71,7 +71,7 @@ public function getTopOffset();
/**
* Manually adjust left position
* @param integer $value
* @return Renderer
* @return RendererInterface
*/
public function setLeftOffset($value);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -116,7 +116,7 @@ public function getVerticalPosition();
/**
* Set the size of a module
* @param float $value
* @return Renderer
* @return RendererInterface
*/
public function setModuleSize($value);

Expand All @@ -135,7 +135,7 @@ public function getAutomaticRenderError();
/**
* Set the barcode object
* @param ObjectInterface $barcode
* @return Renderer
* @return RendererInterface
*/
public function setBarcode(ObjectInterface $barcode);

Expand Down
7 changes: 5 additions & 2 deletions src/Renderer/Svg.php
Expand Up @@ -11,6 +11,7 @@
namespace Zend\Barcode\Renderer;

use DOMDocument;
use DOMElement;
use DOMText;

/**
Expand Down Expand Up @@ -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)
{
Expand All @@ -77,7 +78,8 @@ public function getHeight()
* Set barcode width
*
* @param mixed $value
* @return void
* @throws Exception\OutOfRangeException
* @return self
*/
public function setWidth($value)
{
Expand Down Expand Up @@ -215,6 +217,7 @@ protected function checkSpecificParams()
/**
* Check barcode dimensions
*
* @throws Exception\RuntimeException
* @return void
*/
protected function checkDimensions()
Expand Down

0 comments on commit 9be7abf

Please sign in to comment.