LogsSubcommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
c 0
b 0
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
3
namespace Helick\LocalServer\Subcommands;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
final class LogsSubcommand extends Subcommand
9
{
10
    /**
11
     * The process' command string.
12
     *
13
     * @var string
14
     */
15
    const COMMAND = 'docker-compose logs -f %s';
16
17
    /**
18
     * Invoke the subcommand.
19
     *
20
     * @param InputInterface  $input
21
     * @param OutputInterface $output
22
     *
23
     * @return void
24
     */
25
    public function __invoke(InputInterface $input, OutputInterface $output): void
26
    {
27
        $service = $input->getArgument('options')[0];
28
29
        $this->runProcess(sprintf(static::COMMAND, $service));
30
    }
31
}
32