Completed
Push — feature/EVO-7007-selfversion-w... ( 736f9d...75c615 )
by
unknown
63:48
created

ScriptHandler::getComposerCommand()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 8
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
crap 6
1
<?php
2
/**
3
 * core composer scriptHandler
4
 */
5
6
namespace Graviton\CoreBundle\Composer;
7
8
use Graviton\CoreBundle\Composer\ScriptHandlerBase;
9
use Composer\Script\Event;
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 View Code Duplication
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...
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    /**
21
     * Generates versions.yml
22
     *
23
     * @param CommandEvent $event Event
0 ignored issues
show
Documentation introduced by
Should the type for parameter $event not be Event?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
24
     *
25
     * @return void
26
     */
27
    public static function generateVersionYml(Event $event)
28
    {
29
        $options = self::getOptions($event);
30
        $consolePath = $options['symfony-app-dir'];
31
        $cmd = escapeshellarg('graviton:core:generateversions');
32
33
        self::executeCommand($event, $consolePath, $cmd);
34
35
    }
36
}
37