Completed
Pull Request — master (#79)
by Théo
03:39
created

Build::addFiles()   B

Complexity

Conditions 5
Paths 3

Size

Total Lines 35
Code Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 35
rs 8.439
c 0
b 0
f 0
cc 5
eloc 21
nc 3
nop 4
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the box project.
7
 *
8
 * (c) Kevin Herrera <[email protected]>
9
 *     Théo Fidry <[email protected]>
10
 *
11
 * This source file is subject to the MIT license that is bundled
12
 * with this source code in the file LICENSE.
13
 */
14
15
namespace KevinGH\Box\Console\Command;
16
17
use KevinGH\Box\Box;
18
use Symfony\Component\Console\Input\InputInterface;
19
use Symfony\Component\Console\Output\OutputInterface;
20
use Symfony\Component\Console\Style\SymfonyStyle;
21
use const E_USER_DEPRECATED;
22
use function trigger_error;
23
24
/**
25
 * @deprecated
26
 */
27
final class Build extends Compile
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function run(InputInterface $input, OutputInterface $output)
33
    {
34
        $io = new SymfonyStyle($input, $output);
35
36
        @trigger_error(
37
            $deprecationMessage = 'The command "build" is deprecated. Use "compile" instead.',
38
            E_USER_DEPRECATED
39
        );
40
41
        $io->warning($deprecationMessage);
42
43
        return parent::run($input, $output);
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    protected function configure(): void
50
    {
51
        parent::configure();
52
53
        $this->setName('build');
54
        $this->setDescription('Builds a new PHAR');
55
    }
56
}
57