From: Art4 Date: Sat, 7 Dec 2024 14:31:24 +0000 (+0000) Subject: ignore PHPStan errors for PHP 7.4 compatability X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=053dc2bea5bdb687eeb952108392f6323a36a9a9;p=friendica.git ignore PHPStan errors for PHP 7.4 compatability --- diff --git a/.phpstan.neon b/.phpstan.neon index 28df3dbcc4..de35beae92 100644 --- a/.phpstan.neon +++ b/.phpstan.neon @@ -23,3 +23,9 @@ parameters: dynamicConstantNames: - DB_UPDATE_VERSION + + ignoreErrors: + - + # Ignore missing GdImage class in PHP 7.4 + message: '(^Property .+ has unknown class GdImage as its type\.$)' + path: src diff --git a/src/Object/Image.php b/src/Object/Image.php index 2f172df58c..43b6d91607 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -13,6 +13,7 @@ use Friendica\Util\Images; use Imagick; use ImagickDraw; use ImagickPixel; +use GdImage; use kornrunner\Blurhash\Blurhash; /** @@ -20,7 +21,7 @@ use kornrunner\Blurhash\Blurhash; */ class Image { - /** @var Imagick|resource */ + /** @var GdImage|Imagick|resource */ private $image; /*