-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Brecht-Precht
committed
Jul 15, 2016
1 parent
3e007cb
commit 2be71c7
Showing
11 changed files
with
111 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ ratings: | |
- "**.rb" | ||
exclude_paths: | ||
- test/ | ||
- vendor/ | ||
- vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/vendor | ||
composer.lock | ||
vagrantfile | ||
vagrantfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
|
||
namespace Markenwerk\QrCodeSuite\QrRender; | ||
|
||
/** | ||
* Class AbstractPixelRenderer | ||
* | ||
* @package Markenwerk\QrCodeSuite\QrRender | ||
*/ | ||
abstract class AbstractPixelRenderer | ||
{ | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $approximateSize = 1000; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $width; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $height; | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getApproximateSize() | ||
{ | ||
return $this->approximateSize; | ||
} | ||
|
||
/** | ||
* @param int $approximateSize | ||
* @return $this | ||
*/ | ||
public function setApproximateSize($approximateSize) | ||
{ | ||
if (!is_int($approximateSize) || $approximateSize < 0 || $approximateSize > 5000) { | ||
throw new \InvalidArgumentException('Approximate size has to be a positive integer less than 5000'); | ||
} | ||
$this->approximateSize = $approximateSize; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getWidth() | ||
{ | ||
return $this->width; | ||
} | ||
|
||
/** | ||
* @param int $width | ||
* @return $this | ||
*/ | ||
protected function setWidth($width) | ||
{ | ||
$this->width = $width; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getHeight() | ||
{ | ||
return $this->height; | ||
} | ||
|
||
/** | ||
* @param int $height | ||
* @return $this | ||
*/ | ||
protected function setHeight($height) | ||
{ | ||
$this->height = $height; | ||
return $this; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters