mirror of
https://github.com/getgrav/grav.git
synced 2026-06-25 09:30:57 +02:00
Media: Initialize typed variables
This commit is contained in:
@@ -467,6 +467,7 @@ trait ImageMediaTrait
|
||||
/**
|
||||
* Handle this commonly used variant
|
||||
*
|
||||
* @param mixed $args
|
||||
* @return $this
|
||||
* @phpstan-impure
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<string,array|MediaObjectInterface> */
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user