About   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
c 0
b 0
f 0
dl 0
loc 30
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
A execute() 0 10 1
1
<?php
2
3
/**
4
 * This file is part of Cecil.
5
 *
6
 * (c) Arnaud Ligny <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cecil\Command;
15
16
use Cecil\Builder;
17
use Symfony\Component\Console\Input\InputInterface;
18
use Symfony\Component\Console\Output\OutputInterface;
19
20
/**
21
 * About command.
22
 *
23
 * This command displays a short description about Cecil, including its version and a link to the official website.
24
 */
25
class About extends AbstractCommand
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function configure()
31
    {
32
        $this
33
            ->setName('about')
34
            ->setDescription('Shows a short description about Cecil')
35
            ->setHelp(
36
                <<<'EOF'
37
The <info>%command.name%</> command displays a short description about Cecil.
38
EOF
39
            );
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    protected function execute(InputInterface $input, OutputInterface $output): int
46
    {
47
        $version = Builder::getVersion();
48
49
        $this->io->text([
50
            "<info>Cecil - A simple and powerful content-driven static site generator - version $version</>",
51
            "See <href=https://cecil.app>https://cecil.app</> for more information."
52
        ]);
53
54
        return 0;
55
    }
56
}
57