Passed
Push — master ( 0c3bed...9e492d )
by WEBEWEB
03:24
created

AbstractCommand::displayFooter()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 2
nc 1
nop 4
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2021 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\JQuery\DataTablesBundle\Command;
13
14
use Symfony\Component\Console\Style\StyleInterface;
15
use WBW\Bundle\CoreBundle\Command\AbstractCommand as BaseCommand;
16
use WBW\Bundle\JQuery\DataTablesBundle\Translation\TranslatorTrait;
17
18
/**
19
 * Abstract command.
20
 *
21
 * @author webeweb <https://github.com/webeweb>
22
 * @package WBW\Bundle\JQuery\DataTablesBundle\Command
23
 * @abstract
24
 */
25
abstract class AbstractCommand extends BaseCommand {
26
27
    use TranslatorTrait {
28
        setTranslator as public;
29
    }
30
31
    /**
32
     * Display the footer.
33
     *
34
     * @param StyleInterface $io The I/O.
35
     * @param int $count The count.
36
     * @param string $success The success message.
37
     * @param string $warning The warning message.
38
     * @return void
39
     */
40
    protected function displayFooter(StyleInterface $io, int $count, string $success, string $warning): void {
41
42
        $message = $this->translate(0 < $count ? $success : $warning, [], null, "en");
43
44
        $io->success($message);
45
    }
46
}
47