mageekguy\atoum\reports\asynchronous\coveralls::__construct PHP Method

__construct() public method

public __construct ( $sourceDir, $repositoryToken = null, mageekguy\atoum\adapter $adapter = null )
$adapter mageekguy\atoum\adapter
    public function __construct($sourceDir, $repositoryToken = null, atoum\adapter $adapter = null)
    {
        parent::__construct();
        $this->setAdapter($adapter)->setBranchFinder()->setServiceName();
        if ($this->adapter->extension_loaded('json') === false) {
            throw new exceptions\runtime('JSON PHP extension is mandatory for coveralls report');
        }
        $this->repositoryToken = $repositoryToken;
        $this->sourceDir = new atoum\fs\path($sourceDir);
    }

Usage Example

Esempio n. 1
0
 /**
  * Coveralls constructor.
  *
  * @param string       $sourceDir
  * @param string       $repositoryToken
  * @param string       $rootDir
  * @param Adapter|null $adapter
  */
 public function __construct($sourceDir, $repositoryToken, $rootDir = null, Adapter $adapter = null)
 {
     parent::__construct($sourceDir, $repositoryToken, $adapter);
     $this->rootDir = $rootDir;
 }