Completed
Push — master ( 668b32...3793ef )
by WEBEWEB
01:37
created

AbstractCommand::getCheckbox()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Command;
13
14
use Symfony\Component\Console\Command\Command;
15
use Symfony\Component\Console\Input\InputInterface;
16
use Symfony\Component\Console\Output\OutputInterface;
17
use Symfony\Component\Console\Style\StyleInterface;
18
use Symfony\Component\Console\Style\SymfonyStyle;
19
use WBW\Bundle\CoreBundle\Helper\CommandHelper;
20
21
/**
22
 * Abstract command.
23
 *
24
 * @author webeweb <https://github.com/webeweb/>
25
 * @package WBW\Bundle\CoreBundle\Command
26
 * @abstract
27
 */
28
abstract class AbstractCommand extends Command {
29
30
    /**
31
     * Get a checkbox.
32
     *
33
     * @param bool $checked Checked ?
34
     * @return string Returns the checkbox.
35
     */
36
    protected function getCheckbox($checked) {
37
        return CommandHelper::getCheckbox($checked);
38
    }
39
40
    /**
41
     * Create a style.
42
     *
43
     * @param InputInterface $input The input.
44
     * @param OutputInterface $output The ouptut.
45
     * @return StyleInterface Returns the style.
46
     */
47
    protected function newStyle(InputInterface $input, OutputInterface $output) {
48
        return new SymfonyStyle($input, $output);
49
    }
50
51
}
52