CreateDocsCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace application;
3
require 'Command.php';
4
5
use Symfony\Component\Console\Input\InputArgument;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * Class CreateDocsCommand
11
 * @package application
12
 */
13
class CreateDocsCommand extends Command {
14
15
    /**
16
     * Configure method.
17
     */
18
    public function configure(): void
19
    {
20
        $this->setName('create')
21
            ->setDescription('Create PDF format documentation.')
22
            ->setHelp('This command allows you to generate documentation for your PHP files.')
23
            ->addArgument('inputPath', InputArgument::REQUIRED, 'File or directory path where the PHP code is.')
24
            ->addArgument('outputPath', InputArgument::REQUIRED, 'Directory where the documentation will be created.');
25
    }
26
27
    /**
28
     * @param InputInterface $input
29
     * @param OutputInterface $output
30
     */
31
    public function execute(InputInterface $input, OutputInterface $output): void
32
    {
33
        $this->createDocs($input, $output);
34
    }
35
}