Esempio n. 1
0
 /**
  * Constructor.
  *
  * @param  string                       $name
  * @param  PHP_CodeCoverage_Report_Node $parent
  * @param  array                        $coverageData
  * @param  array                        $testData
  * @param  boolean                      $cacheTokens
  */
 public function __construct($name, PHP_CodeCoverage_Report_Node $parent, array $coverageData, array $testData, $cacheTokens)
 {
     if (!is_bool($cacheTokens)) {
         throw new InvalidArgumentException();
     }
     parent::__construct($name, $parent);
     $this->coverageData = $coverageData;
     $this->testData = $testData;
     $this->ignoredLines = PHP_CodeCoverage_Util::getLinesToBeIgnored($this->getPath(), $cacheTokens);
     $this->cacheTokens = $cacheTokens;
     $this->calculateStatistics();
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * @param  string                       $name
  * @param  PHP_CodeCoverage_Report_Node $parent
  * @param  array                        $coverageData
  * @param  array                        $testData
  * @param  bool                         $cacheTokens
  *
  * @throws PHP_CodeCoverage_Exception
  */
 public function __construct($name, PHP_CodeCoverage_Report_Node $parent, array $coverageData, array $testData, $cacheTokens)
 {
     if (!is_bool($cacheTokens)) {
         throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(1, 'boolean');
     }
     parent::__construct($name, $parent);
     $this->coverageData = $coverageData;
     $this->testData = $testData;
     $this->cacheTokens = $cacheTokens;
     $this->calculateStatistics();
 }