Passed
Push — master ( abce15...80de3b )
by Gaetano
10:06
created

Process::isSigchildEnabled()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Kaliop\eZMigrationBundle\Core\Process;
4
5
use Symfony\Component\Process\Process as BaseProcess;
6
7
/**
8
 * Allow to force Symfony Process objects to trust that php has been compiled with --enable-sigchild even when the
9
 * options used to compile php are not visible to phpinfo, such as on Debian/Ubuntu
10
 */
11
class Process extends BaseProcess
12
{
13
    static $forceSigchildEnabled = null;
14
15
    public static function forceSigchildEnabled($force)
16
    {
17
        self::$forceSigchildEnabled = (bool) $force;
18
    }
19
20
    protected function isSigchildEnabled()
21
    {
22
        if (null !== self::$forceSigchildEnabled) {
23
            return self::$forceSigchildEnabled;
24
        }
25
26
        return parent::isSigchildEnabled();
27
    }
28
}
29