DKIMSyncCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * This file is part of the mailserver-admin package.
6
 * (c) Jeffrey Boehm <https://github.com/jeboehm/mailserver-admin>
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace App\Command;
12
13
use App\Service\DKIM\Config\Manager;
14
use Symfony\Component\Console\Command\Command;
15
use Symfony\Component\Console\Input\InputInterface;
16
use Symfony\Component\Console\Output\OutputInterface;
17
18
class DKIMSyncCommand extends Command
19
{
20
    private Manager $manager;
21
22
    public function __construct(Manager $manager)
23
    {
24
        parent::__construct();
25
26
        $this->manager = $manager;
27
    }
28
29
    protected function configure(): void
30
    {
31
        $this
32
            ->setName('dkim:refresh')
33
            ->setDescription('Updates the DKIM configuration folder.');
34
    }
35
36
    protected function execute(InputInterface $input, OutputInterface $output): int
37
    {
38
        $this->manager->refresh();
39
40
        return 0;
41
    }
42
}
43