Passed
Push — master ( b34030...56c38f )
by Sebastian
03:50
created

Cmd   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 17
c 0
b 0
f 0
ccs 7
cts 7
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 8 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace sebastianfeldmann\CaptainHook\Composer;
11
12
use Composer\Script\Event;
13
14
/**
15
 * Class Cmd
16
 *
17
 * @package CaptainHook
18
 * @author  Sebastian Feldmann <[email protected]>
19
 * @link    https://github.com/sebastianfeldmann/captainhook
20
 * @since   Class available since Release 0.9.0
21
 */
22
abstract class Cmd
23
{
24
    /**
25
     * Gets called by composer after a successful package installation.
26
     *
27
     * @param \Composer\Script\Event $event
28
     * @param string                 $config
29
     */
30 1
    public static function configure(Event $event, $config = null)
31
    {
32 1
        $app = new Application();
33 1
        $app->setAutoExit(false);
34 1
        $app->setConfigFile($config);
35 1
        $app->setProxyIO($event->getIO());
36 1
        $app->run();
37 1
    }
38
}
39