kahlan\Suite::stats PHP Method

stats() protected method

Builds the suite.
protected stats ( ) : array
return array The suite stats.
    protected function stats()
    {
        static::$_instances[] = $this;
        if (Suite::$PHP >= 7) {
            try {
                $this->_stats = $this->_stats();
            } catch (Throwable $exception) {
                $this->_exception($exception);
                $this->summary()->log($this->log());
                $this->_stats = ['normal' => 0, 'focused' => 0, 'excluded' => 0];
            }
        } else {
            try {
                $this->_stats = $this->_stats();
            } catch (Exception $exception) {
                $this->_passed = false;
                array_pop(static::$_instances);
                throw $exception;
            }
        }
        array_pop(static::$_instances);
        return $this->_stats;
    }