codemasher 5 лет назад
Родитель
Сommit
8838eec836
5 измененных файлов с 8 добавлено и 2 удалено
  1. 1 0
      examples/fpdf.php
  2. 0 1
      examples/imagick.php
  3. 3 1
      src/Output/QRImage.php
  4. 2 0
      src/Output/QRImagick.php
  5. 2 0
      tests/Output/QRImagickTest.php

+ 1 - 0
examples/fpdf.php

@@ -13,6 +13,7 @@ $options = new QROptions([
     'outputType'   => QRCode::OUTPUT_FPDF,
     'outputType'   => QRCode::OUTPUT_FPDF,
     'eccLevel'     => QRCode::ECC_L,
     'eccLevel'     => QRCode::ECC_L,
     'scale'        => 5,
     'scale'        => 5,
+    'imageBase64'  => false,
     'moduleValues' => [
     'moduleValues' => [
         // finder
         // finder
         1536 => [0, 63, 255], // dark (true)
         1536 => [0, 63, 255], // dark (true)

+ 0 - 1
examples/imagick.php

@@ -21,7 +21,6 @@ $options = new QROptions([
 	'outputType'   => QRCode::OUTPUT_IMAGICK,
 	'outputType'   => QRCode::OUTPUT_IMAGICK,
 	'eccLevel'     => QRCode::ECC_L,
 	'eccLevel'     => QRCode::ECC_L,
 	'scale'        => 5,
 	'scale'        => 5,
-	'imageBase64'  => false,
 	'moduleValues' => [
 	'moduleValues' => [
 		// finder
 		// finder
 		1536 => '#A71111', // dark (true)
 		1536 => '#A71111', // dark (true)

+ 3 - 1
src/Output/QRImage.php

@@ -8,6 +8,8 @@
  * @author       Smiley <smiley@chillerlan.net>
  * @author       Smiley <smiley@chillerlan.net>
  * @copyright    2015 Smiley
  * @copyright    2015 Smiley
  * @license      MIT
  * @license      MIT
+ *
+ * @noinspection PhpComposerExtensionStubsInspection
  */
  */
 
 
 namespace chillerlan\QRCode\Output;
 namespace chillerlan\QRCode\Output;
@@ -110,7 +112,7 @@ class QRImage extends QROutputAbstract{
 
 
 		$imageData = $this->dumpImage($file);
 		$imageData = $this->dumpImage($file);
 
 
-		if((bool)$this->options->imageBase64){
+		if($this->options->imageBase64){
 			$imageData = sprintf('data:image/%s;base64,%s', $this->options->outputType, base64_encode($imageData));
 			$imageData = sprintf('data:image/%s;base64,%s', $this->options->outputType, base64_encode($imageData));
 		}
 		}
 
 

+ 2 - 0
src/Output/QRImagick.php

@@ -8,6 +8,8 @@
  * @author       smiley <smiley@chillerlan.net>
  * @author       smiley <smiley@chillerlan.net>
  * @copyright    2018 smiley
  * @copyright    2018 smiley
  * @license      MIT
  * @license      MIT
+ *
+ * @noinspection PhpComposerExtensionStubsInspection
  */
  */
 
 
 namespace chillerlan\QRCode\Output;
 namespace chillerlan\QRCode\Output;

+ 2 - 0
tests/Output/QRImagickTest.php

@@ -8,6 +8,8 @@
  * @author       smiley <smiley@chillerlan.net>
  * @author       smiley <smiley@chillerlan.net>
  * @copyright    2018 smiley
  * @copyright    2018 smiley
  * @license      MIT
  * @license      MIT
+ *
+ * @noinspection PhpComposerExtensionStubsInspection
  */
  */
 
 
 namespace chillerlan\QRCodeTest\Output;
 namespace chillerlan\QRCodeTest\Output;