Passed
Push — master ( ed42e4...b3b06a )
by Kirill
04:44
created

UpdateCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A perform() 0 5 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Console\Command;
13
14
use Psr\Container\ContainerInterface;
15
use Spiral\Console\Config\ConsoleConfig;
16
17
final class UpdateCommand extends SequenceCommand
18
{
19
    protected const NAME        = 'update';
20
    protected const DESCRIPTION = 'Update project state';
21
22
    /**
23
     * @param ConsoleConfig      $config
24
     * @param ContainerInterface $container
25
     * @return int
26
     */
27
    public function perform(ConsoleConfig $config, ContainerInterface $container): int
28
    {
29
        $this->writeln("<info>Updating project state:</info>\n");
30
31
        return $this->runSequence($config->updateSequence(), $container);
32
    }
33
}
34