This commit is contained in:
2
Makefile
2
Makefile
@ -21,5 +21,5 @@ install-dev:
|
||||
test:
|
||||
vendor/bin/phpunit tests
|
||||
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');
|
||||
|
||||
try {
|
||||
$app = new App($input->getArgument('config'));
|
||||
$app = new App((string)$input->getArgument('config'));
|
||||
} catch (\Throwable $e) {
|
||||
$sio->error('Configuration error:' . $e->getMessage());
|
||||
return Command::FAILURE;
|
||||
@ -54,13 +54,13 @@ class CommandBackup extends Command
|
||||
$template = array();
|
||||
$template['config'] = $conf;
|
||||
$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['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();
|
||||
|
||||
$message = $render->render('notify', $template);
|
||||
@ -68,7 +68,7 @@ class CommandBackup extends Command
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
|
||||
$notification->send($title, $message);
|
||||
$notification->send((string)$title, $message);
|
||||
}
|
||||
|
||||
$sio->success("Complete");
|
||||
|
@ -30,7 +30,7 @@ class CommandShow extends Command
|
||||
$sio->title('List backup entities');
|
||||
|
||||
try {
|
||||
$app = new App($input->getArgument('config'));
|
||||
$app = new App((string)$input->getArgument('config'));
|
||||
} catch (\Throwable $e) {
|
||||
$sio->error('Configuration error: ' . $e->getMessage());
|
||||
return Command::FAILURE;
|
||||
|
Reference in New Issue
Block a user