Completed
Push — wip-platform ( 1b7118...2b724b )
by
unknown
03:32
created

Patcher::applyPatches()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Blast Project package.
5
 *
6
 * Copyright (C) 2015-2017 Libre Informatique
7
 *
8
 * This file is licenced under the GNU LGPL v3.
9
 * For the full copyright and license information, please view the LICENSE.md
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Blast\Bundle\CoreBundle\Tools\Patches;
14
15
use Composer\Script\Event;
16
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;
17
18
class Patcher extends ScriptHandler
19
{
20
    public static function applyPatches(Event $event)
21
    {
22
        $options = static::getOptions($event);
23
        $consoleDir = static::getConsoleDir($event, 'applying custom patches on vendors');
24
25
        if (null === $consoleDir) {
26
            return;
27
        }
28
29
        static::executeCommand($event, $consoleDir, 'blast:patchs:apply --force', $options['process-timeout']);
30
    }
31
}
32