🚒 phan happy

This commit is contained in:
codemasher
2021-01-25 01:09:32 +01:00
parent 84eb31696c
commit 95cac35fdd
4 changed files with 15 additions and 9 deletions
+3 -5
View File
@@ -8,7 +8,7 @@
* @copyright 2021 Smiley
* @license Apache-2.0
*
* @noinspection PhpComposerExtensionStubsInspection
* @noinspection PhpComposerExtensionStubsInspection
*/
namespace chillerlan\QRCode\Decoder;
@@ -39,11 +39,9 @@ final class GDLuminanceSource extends LuminanceSource{
*/
public function __construct($gdImage){
/**
* @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection
* @phan-suppress PhanUndeclaredClassInstanceof
*/
/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection, PhpFullyQualifiedNameUsageInspection */
if(
/** @phan-suppress-next-line PhanUndeclaredClassInstanceof */
(PHP_MAJOR_VERSION >= 8 && !$gdImage instanceof \GdImage)
|| (PHP_MAJOR_VERSION < 8 && (!is_resource($gdImage) || get_resource_type($gdImage) !== 'gd'))
){