ConsoleCommandListener   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConsoleCommand() 0 6 2
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