diff --git a/system/src/Grav/Common/Media/Traits/ImageMediaTrait.php b/system/src/Grav/Common/Media/Traits/ImageMediaTrait.php index 51db194a5..ece36ae2c 100644 --- a/system/src/Grav/Common/Media/Traits/ImageMediaTrait.php +++ b/system/src/Grav/Common/Media/Traits/ImageMediaTrait.php @@ -467,6 +467,7 @@ trait ImageMediaTrait /** * Handle this commonly used variant * + * @param mixed $args * @return $this * @phpstan-impure */ diff --git a/system/src/Grav/Common/Page/Media.php b/system/src/Grav/Common/Page/Media.php index 59a241256..de14ee2cd 100644 --- a/system/src/Grav/Common/Page/Media.php +++ b/system/src/Grav/Common/Page/Media.php @@ -22,7 +22,7 @@ class Media extends LocalMedia protected const VERSION = parent::VERSION . '.1'; /** @var bool */ - protected $useGlobalMedia; + protected bool $useGlobalMedia; /** * @param string|null $path diff --git a/system/src/Grav/Common/Page/Medium/AbstractMedia.php b/system/src/Grav/Common/Page/Medium/AbstractMedia.php index 6c4ae0d51..bf9ddcc1e 100644 --- a/system/src/Grav/Common/Page/Medium/AbstractMedia.php +++ b/system/src/Grav/Common/Page/Medium/AbstractMedia.php @@ -48,23 +48,23 @@ abstract class AbstractMedia implements ExportInterface, MediaCollectionInterfac /** @var string */ protected const VERSION = '2'; - protected ?string $path; - protected ?string $url; + protected ?string $path = null; + protected ?string $url = null; protected bool $exists = false; - protected ?array $index; - protected ?array $grouped; + protected ?array $index = null; + protected ?array $grouped = null; /** @var array */ protected array $items = []; - protected ?array $media_order; + protected ?array $media_order = null; protected array $config = []; protected array $settings = []; /** @var string[] */ protected array $standard_exif = ['FileSize', 'MimeType', 'height', 'width']; - protected ?string $indexFolder; + protected ?string $indexFolder = null; protected ?string $indexFile = 'media.json'; protected int $indexTimeout = 0; /** @var string|int|null */ - protected $timestamp; + protected $timestamp = null; /** @var bool Hack to make Iterator work together with unset(). */ private bool $iteratorUnset = false;