mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-13 15:27:14 +00:00
:octocat: i hate this less
This commit is contained in:
@@ -25,7 +25,6 @@ final class GDLuminanceSource extends LuminanceSource{
|
||||
|
||||
/**
|
||||
* @var resource|\GdImage
|
||||
* @phan-suppress PhanUndeclaredTypeProperty
|
||||
*/
|
||||
private $gdImage;
|
||||
|
||||
@@ -33,15 +32,13 @@ final class GDLuminanceSource extends LuminanceSource{
|
||||
* GDLuminanceSource constructor.
|
||||
*
|
||||
* @param resource|\GdImage $gdImage
|
||||
* @phan-suppress PhanUndeclaredTypeParameter
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct($gdImage){
|
||||
|
||||
/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection, PhpFullyQualifiedNameUsageInspection */
|
||||
/** @noinspection 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'))
|
||||
){
|
||||
|
||||
Reference in New Issue
Block a user