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; /*