Fewer warnings.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Jens True 2023-07-04 08:19:02 +00:00
parent a070849293
commit 006a5410b5
3 changed files with 8 additions and 8 deletions

@ -21,5 +21,5 @@ install-dev:
test: test:
vendor/bin/phpunit tests vendor/bin/phpunit tests
test-coverage: test-coverage:
vendor/bin/phpunit tests --testdox --coverage-filter src --coverage-html output/coverage --coverage-text vendor/bin/phpunit tests --testdox --coverage-filter src --coverage-html output/coverage --coverage-text --path-coverage --testdox-html output/test.html

@ -34,7 +34,7 @@ class CommandBackup extends Command
$sio->title('Start backup process'); $sio->title('Start backup process');
try { try {
$app = new App($input->getArgument('config')); $app = new App((string)$input->getArgument('config'));
} catch (\Throwable $e) { } catch (\Throwable $e) {
$sio->error('Configuration error:' . $e->getMessage()); $sio->error('Configuration error:' . $e->getMessage());
return Command::FAILURE; return Command::FAILURE;
@ -54,13 +54,13 @@ class CommandBackup extends Command
$template = array(); $template = array();
$template['config'] = $conf; $template['config'] = $conf;
$template['start'] = new DateTime(); $template['start'] = new DateTime();
$template['source_size'] = $rclone->getSize($conf['source']); $template['source_size'] = $rclone->getSize((string)$conf['source']);
$template['rclone_version'] = $rclone->getVersion(); $template['rclone_version'] = $rclone->getVersion();
$template['destination_size_before'] = $rclone->getSize($conf['destination']); $template['destination_size_before'] = $rclone->getSize((string)$conf['destination']);
$rclone->copy($conf['source'], $conf['destination'], $app->getConfig()['rclone']['options']); $rclone->copy((string)$conf['source'], (string)$conf['destination'], $app->getConfig()['rclone']['options']);
$template['destination_size_after'] = $rclone->getSize($conf['destination']); $template['destination_size_after'] = $rclone->getSize((string)$conf['destination']);
$template['end'] = new DateTime(); $template['end'] = new DateTime();
$message = $render->render('notify', $template); $message = $render->render('notify', $template);
@ -68,7 +68,7 @@ class CommandBackup extends Command
$message = $e->getMessage(); $message = $e->getMessage();
} }
$notification->send($title, $message); $notification->send((string)$title, $message);
} }
$sio->success("Complete"); $sio->success("Complete");

@ -30,7 +30,7 @@ class CommandShow extends Command
$sio->title('List backup entities'); $sio->title('List backup entities');
try { try {
$app = new App($input->getArgument('config')); $app = new App((string)$input->getArgument('config'));
} catch (\Throwable $e) { } catch (\Throwable $e) {
$sio->error('Configuration error: ' . $e->getMessage()); $sio->error('Configuration error: ' . $e->getMessage());
return Command::FAILURE; return Command::FAILURE;