Skip to content

Commit 0d8fbf7

Browse files
authored
Merge pull request #72 from SimpleSoftwareIO/develop
1.5.1
2 parents 49266b1 + 2bb62fe commit 0d8fbf7

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Simple QrCode
33

44
##Change Log
55

6+
#### 1.5.1
7+
* Fixed a bug where a QrCode used within a loop would not generate correctly.
8+
69
#### 1.5.0
710
* Added Portuguese translation. -Thanks [francisek](https://github.com/francisek) and [Varpie!](https://github.com/Varpie)
811
* Added BitCoin helper

src/SimpleSoftwareIO/QrCode/BaconQrCodeGenerator.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
namespace SimpleSoftwareIO\QrCode;
44

55
use BaconQrCode;
6-
use BaconQrCode\Common\ErrorCorrectionLevel;
6+
use BaconQrCode\Writer;
77
use BaconQrCode\Encoder\Encoder;
88
use BaconQrCode\Renderer\Color\Rgb;
99
use BaconQrCode\Renderer\Image\Eps;
1010
use BaconQrCode\Renderer\Image\Png;
11-
use BaconQrCode\Renderer\Image\RendererInterface;
1211
use BaconQrCode\Renderer\Image\Svg;
13-
use BaconQrCode\Writer;
12+
use BaconQrCode\Common\ErrorCorrectionLevel;
13+
use BaconQrCode\Renderer\Image\RendererInterface;
1414

1515
class BaconQrCodeGenerator implements QrCodeInterface
1616
{
@@ -50,7 +50,10 @@ class BaconQrCodeGenerator implements QrCodeInterface
5050
protected $imagePercentage = .2;
5151

5252
/**
53-
* Creates a new QrCodeGenerator with a Writer class and with a SVG renderer set as the default.
53+
* BaconQrCodeGenerator constructor.
54+
*
55+
* @param Writer|null $writer
56+
* @param RendererInterface|null $format
5457
*/
5558
public function __construct(Writer $writer = null, RendererInterface $format = null)
5659
{
@@ -93,7 +96,7 @@ public function generate($text, $filename = null)
9396
*/
9497
public function merge($filepath, $percentage = .2, $absolute = false)
9598
{
96-
if (function_exists('base_path') && !$absolute) {
99+
if (function_exists('base_path') && ! $absolute) {
97100
$filepath = base_path().$filepath;
98101
}
99102

@@ -262,7 +265,7 @@ private function createClass($method)
262265
{
263266
$class = $this->formatClass($method);
264267

265-
if (!class_exists($class)) {
268+
if (! class_exists($class)) {
266269
throw new \BadMethodCallException();
267270
}
268271

src/SimpleSoftwareIO/QrCode/DataTypes/Email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function setEmail($email)
113113
*/
114114
protected function isValidEmail($email)
115115
{
116-
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
116+
if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {
117117
throw new InvalidArgumentException('Invalid email provided');
118118
}
119119

src/SimpleSoftwareIO/QrCode/Facades/QrCode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class QrCode extends Facade
1313
*/
1414
protected static function getFacadeAccessor()
1515
{
16+
self::clearResolvedInstance('qrcode');
17+
1618
return 'qrcode';
1719
}
1820
}

0 commit comments

Comments
 (0)