1 | <?php |
||
11 | class BackupDestination |
||
12 | { |
||
13 | /** @var \Illuminate\Contracts\Filesystem\Filesystem */ |
||
14 | protected $disk; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $diskName; |
||
18 | |||
19 | /** @var string */ |
||
20 | protected $backupName; |
||
21 | |||
22 | /** @var Exception */ |
||
23 | public $connectionError; |
||
24 | |||
25 | /** @var null|\Spatie\Backup\BackupDestination\BackupCollection */ |
||
26 | protected $backupCollectionCache = null; |
||
27 | |||
28 | public function __construct(Filesystem $disk = null, string $backupName, string $diskName) |
||
36 | |||
37 | public function disk(): Filesystem |
||
41 | |||
42 | public function diskName(): string |
||
46 | |||
47 | public function filesystemType(): string |
||
59 | |||
60 | public static function create(string $diskName, string $backupName): self |
||
74 | |||
75 | public function write(string $file) |
||
93 | |||
94 | public function backupName(): string |
||
98 | |||
99 | public function backups(): BackupCollection |
||
112 | |||
113 | public function connectionError(): Exception |
||
117 | |||
118 | public function extraOptions(): ?array |
||
119 | { |
||
120 | $extraConfig = config('filesystems.disks.'.$this->diskName().'.backup_extra_options') ?? []; |
||
121 | |||
122 | if (! is_array($extraConfig) || (count($extraConfig) < 1)) { |
||
123 | return []; |
||
124 | } |
||
125 | |||
126 | return $extraConfig; |
||
127 | } |
||
128 | |||
129 | public function isReachable(): bool |
||
145 | |||
146 | public function usedStorage(): int |
||
150 | |||
151 | public function newestBackup(): ?Backup |
||
155 | |||
156 | public function oldestBackup(): ?Backup |
||
160 | |||
161 | public function newestBackupIsOlderThan(Carbon $date): bool |
||
171 | |||
172 | public function fresh(): self |
||
178 | } |
||
179 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..