ConsoleCommandListener::onConsoleCommand()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
namespace RDV\Bundle\MigrationBundle\EventListener;
4
5
use Symfony\Component\Console\Event\ConsoleCommandEvent;
6
7
use RDV\Bundle\MigrationBundle\Tools\SchemaTrait;
8
9
class ConsoleCommandListener
10
{
11
    use SchemaTrait;
12
13
    /**
14
     * @param ConsoleCommandEvent $event
15
     */
16
    public function onConsoleCommand(ConsoleCommandEvent $event)
17
    {
18
        if ('doctrine:schema:update' === $event->getCommand()->getName()) {
19
            $this->overrideSchemaDiff();
20
        }
21
    }
22
}
23