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

UpdateCommand::perform()   A

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
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 2
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