Kahlan\Reporter\Coverage\Driver\Xdebug::__construct PHP Метод

__construct() публичный Метод

The Constructor.
public __construct ( array $config = [] )
$config array The options array, possible options are: - `'cleanup'` _boolean_: indicated if the coverage should be flushed on stop. - `'coverage'` _integer_: the code coverage mask.
    public function __construct($config = [])
    {
        $defaults = ['coverage' => 0, 'cleanup' => true];
        $this->_config = $config + $defaults;
        if (!extension_loaded('xdebug')) {
            throw new RuntimeException('Xdebug is not loaded.');
        }
        if (!defined('HHVM_VERSION') && !ini_get('xdebug.coverage_enable')) {
            throw new RuntimeException('You need to set `xdebug.coverage_enable = On` in your php.ini.');
        }
    }