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

ScriptHandler::generateSwaggerJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 2
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