807353cbe4
RepositoryImportSource::copyToFolder() called putContent() on the generic return type of Node::get(), which doesn't declare that method -- only File does. Existing-file overwrite during a per-user restore would have fatally errored at runtime; added an instanceof check and a resource leak fix (finally-close) while there. Also guarded getFileAsStream() against fopen() returning false. Everything else Psalm (strict level) currently flags is mechanical (missing `final` on leaf classes -- applied everywhere safe) or pre-existing array-shape/type gaps, captured in psalm-baseline.xml so CI fails only on new issues from here on, not the whole backlog at once.
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: 2026 Dillard Blom
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace OCA\NgBackup\Db;
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
/**
|
|
* @method int getTargetId()
|
|
* @method void setTargetId(int $v)
|
|
* @method string getSnapshotId()
|
|
* @method void setSnapshotId(string $v)
|
|
* @method string getKind()
|
|
* @method void setKind(string $v)
|
|
* @method string|null getLabel()
|
|
* @method void setLabel(?string $v)
|
|
* @method int getCreatedAt()
|
|
* @method void setCreatedAt(int $v)
|
|
* @method int|null getFiles()
|
|
* @method void setFiles(?int $v)
|
|
* @method int|null getBytes()
|
|
* @method void setBytes(?int $v)
|
|
*/
|
|
final class Snapshot extends Entity {
|
|
protected int $targetId = 0;
|
|
protected string $snapshotId = '';
|
|
protected string $kind = '';
|
|
protected ?string $label = null;
|
|
protected int $createdAt = 0;
|
|
protected ?int $files = null;
|
|
protected ?int $bytes = null;
|
|
|
|
public function __construct() {
|
|
$this->addType('targetId', 'integer');
|
|
$this->addType('createdAt', 'integer');
|
|
$this->addType('files', 'integer');
|
|
$this->addType('bytes', 'integer');
|
|
}
|
|
}
|