codemasher 5 years ago
parent
commit
0442a230d0

+ 2 - 0
tests/Output/QRFpdfTest.php

@@ -31,6 +31,8 @@ class QRFpdfTest extends QROutputTestAbstract{
 
 		if(!class_exists(FPDF::class)){
 			$this->markTestSkipped('FPDF not available');
+
+			/** @noinspection PhpUnreachableStatementInspection */
 			return;
 		}
 

+ 5 - 0
tests/Output/QRImagickTest.php

@@ -8,6 +8,9 @@
  * @author       smiley <smiley@chillerlan.net>
  * @copyright    2018 smiley
  * @license      MIT
+ *
+ * @noinspection PhpUndefinedClassInspection
+ * @noinspection PhpComposerExtensionStubsInspection
  */
 
 namespace chillerlan\QRCodeTest\Output;
@@ -29,6 +32,8 @@ class QRImagickTest extends QROutputTestAbstract{
 
 		if(!extension_loaded('imagick')){
 			$this->markTestSkipped('ext-imagick not loaded');
+
+			/** @noinspection PhpUnreachableStatementInspection */
 			return;
 		}
 

+ 8 - 2
tests/Output/QROutputTestAbstract.php

@@ -119,9 +119,15 @@ abstract class QROutputTestAbstract extends TestCase{
 
 		// may fail on CI, different PHP (platform) versions produce different output
 		// the samples were generated on php-7.4.3-Win32-vc15-x64
-		if(PHP_OS_FAMILY !== 'Windows'
-		   && ($type === QRCode::OUTPUT_IMAGE_JPG || $type === QRCode::OUTPUT_IMAGICK || $type === QRCode::OUTPUT_MARKUP_SVG)){
+		if(
+			PHP_OS_FAMILY !== 'Windows' && (
+			   $type === QRCode::OUTPUT_IMAGE_JPG
+			|| $type === QRCode::OUTPUT_IMAGICK
+			|| $type === QRCode::OUTPUT_MARKUP_SVG
+		)){
 			$this::markTestSkipped('may fail on CI');
+
+			/** @noinspection PhpUnreachableStatementInspection */
 			return;
 		}