Completed
Push — master ( a283c3...65fb1b )
by Olivier
02:16
created

ScriptHandler::executeCommand()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 15
rs 9.2
cc 4
eloc 10
nc 4
nop 4
1
<?php
2
3
namespace Ola\RabbitMqAdminToolkitBundle\Composer;
4
5
use Composer\Script\CommandEvent;
6
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as BaseScriptHandler;
7
8
class ScriptHandler extends BaseScriptHandler
9
{
10
    /**
11
     * Define rabbitmq vhost
12
     *
13
     * @param $event CommandEvent A instance
14
     */
15
    public static function vhostDefine(CommandEvent $event)
16
    {
17
        $consoleDir = static::getConsoleDir($event, 'define rabbitmq vhost');
18
19
        if (null === $consoleDir) {
20
            return;
21
        }
22
23
        static::executeCommand($event, $consoleDir, 'rabbitmq:vhost:define');
24
    }
25
}
26