Completed
Push — master ( 11b317...37df4d )
by Lucas
09:27
created

ScriptHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 18
ccs 0
cts 7
cp 0
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generateSwaggerJson() 0 8 1
1
<?php
2
/**
3
 * swagger composer scripthandler
4
 */
5
6
namespace Graviton\SwaggerBundle\Composer;
7
8
use Graviton\CoreBundle\Composer\ScriptHandlerBase;
9
use Composer\Script\CommandEvent;
10
11
/**
12
 * ScriptHandler for Composer, wrapping our symfony console commands..
13
 *
14
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
15
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
16
 * @link     http://swisscom.ch
17
 */
18
class ScriptHandler extends ScriptHandlerBase
0 ignored issues
show
Coding Style introduced by
ScriptHandler does not seem to conform to the naming convention (Utils?$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
19
{
20
    /**
21
     * Generates swagger.json
22
     *
23
     * @param CommandEvent $event Event
24
     *
25
     * @return void
26
     */
27
    public static function generateSwaggerJson(CommandEvent $event)
28
    {
29
        $options = self::getOptions($event);
30
        $consolePath = $options['symfony-app-dir'];
31
        $cmd = escapeshellarg('graviton:swagger:generate');
32
33
        self::executeCommand($event, $consolePath, $cmd);
34
    }
35
}
36