Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

patch #5860 barcode analyzer fixes #5864

Merged
merged 4 commits into from

2 participants

@jaapio

Fixes some php analyser issues

@weierophinney weierophinney added this to the 2.3.0 milestone
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney [#5864] CS fixes
- trailing whitespace
2cdcdc8
@weierophinney weierophinney merged commit 9e6ae9c into zendframework:develop
@jaapio jaapio deleted the jaapio:barcode_code_check branch
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-barcode
@weierophinney weierophinney Merge pull request zendframework/zf2#5864 from jaapio/barcode_code_check
patch zendframework/zf2#5860 barcode analyzer fixes
fcc368e
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-barcode
@weierophinney weierophinney [zendframework/zf2#5864] CS fixes
- trailing whitespace
f5dcde8
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-barcode
@weierophinney weierophinney Merge branch 'hotfix/5864' into develop 79ff3e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  library/Zend/Barcode/Object/Codabar.php
@@ -62,6 +62,7 @@ protected function checkSpecificParams()
protected function prepareBarcode()
{
$text = str_split($this->getText());
+ $barcodeTable = array();
foreach ($text as $char) {
$barcodeChar = str_split($this->codingMap[$char]);
foreach ($barcodeChar as $c) {
View
3  library/Zend/Barcode/Object/Code128.php
@@ -211,7 +211,6 @@ protected function convertToBarcodeChars($string)
$strlen = strlen($string);
for ($pos = 0; $pos < $strlen; $pos++) {
$char = $string[$pos];
- $code = null;
if (static::_isDigit($string, $pos, 4) && $currentCharset != 'C'
|| static::_isDigit($string, $pos, 2) && $currentCharset == 'C') {
@@ -248,7 +247,7 @@ protected function convertToBarcodeChars($string)
if ($pos == 0) {
$code = array_search("START A", $this->charSets['A']);
} else {
- $code =array_search("Code A", $this->charSets[$currentCharset]);
+ $code = array_search("Code A", $this->charSets[$currentCharset]);
}
$result[] = $code;
$currentCharset = 'A';
View
2  library/Zend/Barcode/Object/Code25interleaved.php
@@ -72,6 +72,8 @@ protected function prepareBarcode()
if ($this->withBearerBars) {
$this->withBorder = false;
}
+
+ $barcodeTable = array();
// Start character (0000)
$barcodeTable[] = array(1, $this->barThinWidth, 0, 1);
View
2  library/Zend/Barcode/Renderer/Pdf.php
@@ -104,6 +104,8 @@ protected function initRenderer()
protected function drawPolygon($points, $color, $filled = true)
{
$page = $this->resource->pages[$this->page];
+ $x = array();
+ $y = array();
foreach ($points as $point) {
$x[] = $point[0] * $this->moduleSize + $this->leftOffset;
$y[] = $page->getHeight() - $point[1] * $this->moduleSize - $this->topOffset;
View
3  library/Zend/Barcode/Renderer/Svg.php
@@ -319,12 +319,12 @@ protected function drawPolygon($points, $color, $filled = true)
$points[3][1] + $this->topOffset - sin($orientation),
);
$newPoints = implode(' ', $newPoints);
+ $attributes = array();
$attributes['points'] = $newPoints;
$attributes['fill'] = $color;
// SVG passes a rect in as the first call to drawPolygon, we'll need to intercept
// this and set transparency if necessary.
- $objId = spl_object_hash($this);
if(!$this->drawPolygonExecuted) {
if($this->transparentBackground) {
$attributes['fill-opacity'] = '0';
@@ -351,6 +351,7 @@ protected function drawText($text, $size, $position, $font, $color, $alignment =
$color = 'rgb(' . implode(', ', array(($color & 0xFF0000) >> 16,
($color & 0x00FF00) >> 8,
($color & 0x0000FF))) . ')';
+ $attributes = array();
$attributes['x'] = $position[0] + $this->leftOffset;
$attributes['y'] = $position[1] + $this->topOffset;
//$attributes['font-family'] = $font;
Something went wrong with that request. Please try again.