• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LibreSign / libresign / 3717593689

pending completion
3717593689

Pull #1287

github

GitHub
Merge 42fe701e4 into ff8c1edaf
Pull Request #1287: [stable25] Bump packages

2548 of 4384 relevant lines covered (58.12%)

4.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Command/Install.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace OCA\Libresign\Command;
6

7
use OCA\Libresign\Service\InstallService;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Input\InputOption;
10
use Symfony\Component\Console\Output\OutputInterface;
11

12
class Install extends Base {
13
        public function __construct(
14
                InstallService $installService
15
        ) {
16
                parent::__construct(
×
17
                        $installService
×
18
                );
×
19
        }
20

21
        protected function configure(): void {
22
                $this
×
23
                        ->setName('libresign:install')
×
24
                        ->setDescription('Install files')
×
25
                        ->addOption('all',
×
26
                                null,
×
27
                                InputOption::VALUE_NONE,
×
28
                                'All binaries'
×
29
                        )
×
30
                        ->addOption('jsignpdf',
×
31
                                null,
×
32
                                InputOption::VALUE_NONE,
×
33
                                'JSignPdf'
×
34
                        )
×
35
                        ->addOption('cfssl',
×
36
                                null,
×
37
                                InputOption::VALUE_NONE,
×
38
                                'CFSSL'
×
39
                        )
×
40
                        ->addOption('cli',
×
41
                                null,
×
42
                                InputOption::VALUE_NONE,
×
43
                                'LibreSign CLI'
×
44
                        )
×
45
                        ->addOption('java',
×
46
                                null,
×
47
                                InputOption::VALUE_NONE,
×
48
                                'Java'
×
49
                        );
×
50
        }
51

52
        protected function execute(InputInterface $input, OutputInterface $output): int {
53
                $all = $input->getOption('all');
×
54
                $ok = false;
×
55
                $this->installService->setOutput($output);
×
56
                if ($input->getOption('java') || $all) {
×
57
                        $this->installService->installJava();
×
58
                        $ok = true;
×
59
                }
60
                if ($input->getOption('jsignpdf') || $all) {
×
61
                        $this->installService->installJSignPdf();
×
62
                        $ok = true;
×
63
                }
64
                if ($input->getOption('cfssl') || $all) {
×
65
                        $this->installService->installCfssl();
×
66
                        $ok = true;
×
67
                }
68
                if ($input->getOption('cli') || $all) {
×
69
                        $this->installService->installCli();
×
70
                        $ok = true;
×
71
                }
72
                if (!$ok) {
×
73
                        $output->writeln('<error>Please inform what you want to install</error>');
×
74
                        $output->writeln('<error>--all to all</error>');
×
75
                        $output->writeln('<error>--help to check the available options</error>');
×
76
                }
77
                return 0;
×
78
        }
79
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc