Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 13
Stats
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 13
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 allFailures
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
 accum
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 7
<?php
declare( strict_types = 1 );
namespace Wikimedia\Parsoid\ParserTests;
class Stats {
    /** @var float */
    public $startTime;
    /** @var Stats[] */
    public $modes;
    /** @var int */
    public $passedTests = 0;
    /** @var int */
    public $passedTestsUnexpected = 0;
    /** @var int */
    public $failedTests = 0;
    /** @var int */
    public $failedTestsUnexpected = 0;
    /** @var int */
    public $loggedErrorCount = 0;
    /** @var int */
    public $failures = 0;
    /** @var array Array of elements representing test failures */
    public $failList;
    /** @var string result */
    public $result;
    public function __construct() {
        $this->startTime = microtime( true );
    }
    public function allFailures(): int {
        $this->failures = $this->passedTestsUnexpected +
            $this->failedTestsUnexpected + $this->loggedErrorCount;
        return $this->failures;
    }
    /**
     * @param Stats $other
     */
    public function accum( Stats $other ): void {
        $this->passedTests += $other->passedTests;
        $this->passedTestsUnexpected += $other->passedTestsUnexpected;
        $this->failedTests += $other->failedTests;
        $this->failedTestsUnexpected += $other->failedTestsUnexpected;
        $this->loggedErrorCount += $other->loggedErrorCount;
        $this->failures += $other->failures;
    }
}