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.
29 lines
614 B
PHP
29 lines
614 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: 2026 Dillard Blom
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace OCA\NgBackup\Settings;
|
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
use OCP\Settings\ISettings;
|
|
use OCP\Util;
|
|
|
|
final class Admin implements ISettings {
|
|
public function getForm(): TemplateResponse {
|
|
Util::addScript('ng_backup', 'ng_backup-admin');
|
|
Util::addStyle('ng_backup', 'ng_backup-admin');
|
|
return new TemplateResponse('ng_backup', 'admin');
|
|
}
|
|
|
|
public function getSection(): string {
|
|
return 'ng_backup';
|
|
}
|
|
|
|
public function getPriority(): int {
|
|
return 10;
|
|
}
|
|
}
|