Skip to content

Commit

Permalink
Merge pull request #72 from SimpleSoftwareIO/develop
Browse files Browse the repository at this point in the history
1.5.1
  • Loading branch information
SimplyCorey authored Dec 6, 2016
2 parents 49266b1 + 2bb62fe commit 0d8fbf7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Simple QrCode

##Change Log

#### 1.5.1
* Fixed a bug where a QrCode used within a loop would not generate correctly.

#### 1.5.0
* Added Portuguese translation. -Thanks [francisek](https://github.com/francisek) and [Varpie!](https://github.com/Varpie)
* Added BitCoin helper
Expand Down
15 changes: 9 additions & 6 deletions src/SimpleSoftwareIO/QrCode/BaconQrCodeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace SimpleSoftwareIO\QrCode;

use BaconQrCode;
use BaconQrCode\Common\ErrorCorrectionLevel;
use BaconQrCode\Writer;
use BaconQrCode\Encoder\Encoder;
use BaconQrCode\Renderer\Color\Rgb;
use BaconQrCode\Renderer\Image\Eps;
use BaconQrCode\Renderer\Image\Png;
use BaconQrCode\Renderer\Image\RendererInterface;
use BaconQrCode\Renderer\Image\Svg;
use BaconQrCode\Writer;
use BaconQrCode\Common\ErrorCorrectionLevel;
use BaconQrCode\Renderer\Image\RendererInterface;

class BaconQrCodeGenerator implements QrCodeInterface
{
Expand Down Expand Up @@ -50,7 +50,10 @@ class BaconQrCodeGenerator implements QrCodeInterface
protected $imagePercentage = .2;

/**
* Creates a new QrCodeGenerator with a Writer class and with a SVG renderer set as the default.
* BaconQrCodeGenerator constructor.
*
* @param Writer|null $writer
* @param RendererInterface|null $format
*/
public function __construct(Writer $writer = null, RendererInterface $format = null)
{
Expand Down Expand Up @@ -93,7 +96,7 @@ public function generate($text, $filename = null)
*/
public function merge($filepath, $percentage = .2, $absolute = false)
{
if (function_exists('base_path') && !$absolute) {
if (function_exists('base_path') && ! $absolute) {
$filepath = base_path().$filepath;
}

Expand Down Expand Up @@ -262,7 +265,7 @@ private function createClass($method)
{
$class = $this->formatClass($method);

if (!class_exists($class)) {
if (! class_exists($class)) {
throw new \BadMethodCallException();
}

Expand Down
2 changes: 1 addition & 1 deletion src/SimpleSoftwareIO/QrCode/DataTypes/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function setEmail($email)
*/
protected function isValidEmail($email)
{
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new InvalidArgumentException('Invalid email provided');
}

Expand Down
2 changes: 2 additions & 0 deletions src/SimpleSoftwareIO/QrCode/Facades/QrCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class QrCode extends Facade
*/
protected static function getFacadeAccessor()
{
self::clearResolvedInstance('qrcode');

return 'qrcode';
}
}

0 comments on commit 0d8fbf7

Please sign in to comment.