Completed
Push — wip-platform ( 03cba6...2999ab )
by
unknown
05:53 queued 02:49
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
 *
5
 * Copyright (C) 2015-2017 Libre Informatique
6
 *
7
 * This file is licenced under the GNU LGPL v3.
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Blast\Bundle\CoreBundle\Tools\Patches;
13
14
use Composer\Script\Event;
15
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;
16
17
class Patcher extends ScriptHandler
18
{
19
    public static function applyPatches(Event $event)
20
    {
21
        $options = static::getOptions($event);
22
        $consoleDir = static::getConsoleDir($event, 'applying custom patches on vendors');
23
24
        if (null === $consoleDir) {
25
            return;
26
        }
27
28
        static::executeCommand($event, $consoleDir, 'blast:patchs:apply --force', $options['process-timeout']);
29
    }
30
}
31