Skip to content

Commit

Permalink
Merge pull request #11 from Gemorroj/master
Browse files Browse the repository at this point in the history
Fixes in EAN 8 and EAN 13
  • Loading branch information
CloCkWeRX committed Mar 2, 2012
2 parents ecd15ec + f3f2b62 commit 0e274b4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Image/Barcode2/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Image_Barcode2_Common
protected $_writer;

/**
* @var Barcode
* @var string barcode
*/
protected $_barcode;

Expand Down Expand Up @@ -44,7 +44,7 @@ public function getWriter()
}

/**
* @param string barcode
* @param string $barcode
*/
public function setBarcode($barcode)
{
Expand Down
2 changes: 1 addition & 1 deletion Image/Barcode2/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function setWriter(Image_Barcode2_Writer $writer);
/**
* Set barcode
*
* @param string barcode
* @param string $barcode
*/
public function setBarcode($barcode);

Expand Down
24 changes: 16 additions & 8 deletions Image/Barcode2/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,43 @@
*/
class Image_Barcode2_Writer
{
public function imagecreate($width, $height) {
public function imagecreate($width, $height)
{
return imagecreate($width, $height);
}

public function imagestring($image, $font, $x, $y, $string, $color) {
public function imagestring($image, $font, $x, $y, $string, $color)
{
return imagestring($image, $font, $x, $y, $string, $color);
}

public function imagefill($image, $x, $y, $color) {
public function imagefill($image, $x, $y, $color)
{
return imagefill($image, $x, $y, $color);
}

public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) {
public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color)
{
return imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color);
}

public function imagefontheight($font) {
public function imagefontheight($font)
{
return imagefontheight($font);
}

public function imagefontwidth($font) {
public function imagefontwidth($font)
{
return imagefontwidth($font);
}

public function imagecolorallocate($image, $red, $green, $blue) {
public function imagecolorallocate($image, $red, $green, $blue)
{
return imagecolorallocate($image, $red, $green, $blue);
}

public function imageline($image, $x1, $y1, $x2, $y2, $color) {
public function imageline($image, $x1, $y1, $x2, $y2, $color)
{
return imageline($image, $x1, $y1, $x2, $y2, $color);
}
}
8 changes: 4 additions & 4 deletions Image/Barcode2/ean13.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$this->getBarcodeHeight(),
$black
);
}
Expand All @@ -258,7 +258,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$barcodelongheight,
$black
);
$xpos += $this->getBarcodeWidth();
Expand All @@ -270,7 +270,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$barcodelongheight,
$black
);
$xpos += $this->getBarcodeWidth();
Expand Down Expand Up @@ -298,7 +298,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$this->getBarcodeHeight(),
$black
);
}
Expand Down
4 changes: 2 additions & 2 deletions Image/Barcode2/ean8.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$this->getBarcodeHeight(),
$black
);
}
Expand Down Expand Up @@ -258,7 +258,7 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight,
$this->getBarcodeHeight(),
$black
);
}
Expand Down
3 changes: 2 additions & 1 deletion Image/Barcode2/upca.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ public function draw()
$xpos,
0,
$xpos + $this->getBarcodeWidth() - 1,
$barcodelongheight, $black
$barcodelongheight,
$black
);
}
$xpos += $this->getBarcodeWidth();
Expand Down

0 comments on commit 0e274b4

Please sign in to comment.