PurgeMapCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 5 1
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