public function getCoverage() : float
    {
        $statements = (string) $this->xml->project->metrics->attributes()->statements;
        $covered    = (string) $this->xml->project->metrics->attributes()->coveredstatements;

        if ($statements < 1 || !is_numeric($covered)) {
            throw new RuntimeException(
                'could not read coverage data from clover xml file ' .
                '(statements: ' . $statements . ', coveredstatements: ' . $covered . ')'
            );
        }

        return $covered / ($statements * 0.01);
    }