PurgeMapCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Rottenwood\KingdomBundle\Command\Console;
4
5
use Rottenwood\KingdomBundle\Command\Console\Integration\Truncate;
6
use Rottenwood\KingdomBundle\Entity\Infrastructure\RoomType;
7
use Rottenwood\KingdomBundle\Entity\Room;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
/** {@inheritDoc} */
12
class PurgeMapCommand extends Truncate
13
{
14
15
    /** {@inheritDoc} */
16
    protected function configure()
17
    {
18
        $this->setName('kingdom:purge:map')->setDescription('Удаление всех комнат');
19
    }
20
21
    /** {@inheritDoc} */
22
    protected function execute(InputInterface $input, OutputInterface $output)
23
    {
24
        $this->truncateEntity(Room::class, $output, 'Удаление комнат ... ', 'Комнаты удалены.');
25
        $this->truncateEntity(RoomType::class, $output, 'Удаление типов комнат ... ', 'Типы комнат удалены.');
26
    }
27
}
28