Return total code coverage in percent.

@return int
966614
public function getTotalCodeCoverage() {
		$totalStatements = 0;
		$totalCoveredStatements = 0;
		foreach ($this->getFiles() as $file) {
			$totalStatements += $file->getStatements();
			$totalCoveredStatements += $file->getCoveredStatements();
		}
		foreach ($this->getPackages() as $package) {
			foreach ($package->getFiles() as $file) {
				$totalStatements += $file->getStatements();
				$totalCoveredStatements += $file->getCoveredStatements();
			}
		}

		return ($totalCoveredStatements==0?0:\round(($totalCoveredStatements/$totalStatements)*100));
	}
24570
public function getUnitPrice()
    {
        $total = $this->Price;

        foreach ($this->Customisations() as $customisation) {
            $total += $customisation->Price;
        }

        $this->extend("updateUnitPrice", $total);

        return $total;
    }
232346
public function getContrast()
    {
        if (!preg_match('/^-*[0-9]+$/', $this->con)) {
            return;
        }

        if ($this->con < -100 or $this->con > 100) {
            return;
        }

        return (int) $this->con;
    }
951450
public function getLineCoverage()
    {
        if ($this->lineCoverage === null) {
            $this->lineCoverage = $this->calculateLineCoverage($this->statements, $this->coveredStatements);
        }

        return $this->lineCoverage;
    }
1024380
private function processRawData()
    {
        // Get the raw data from Xdebug
        $data = xdebug_get_code_coverage();

        // Create an array for storing processed coverage data
        $processed = [
            'classes' => [],
            'files'   => [],
        ];

        // Loop through each of the files in the coverage data
        foreach ($data as $file => $lines) {
            // Check if this file is covered
            if ($this->isCovered($file)) {
                // Filter out dead code from the results
                $filter = function ($value, $line = null) {
                    return $value !== self::DEAD;
                };
                $executable = array_filter($lines, $filter);

                // Filter out unused code to get the lines covered
                $object = $this;
                $filter = function ($value, $line) use ($object, $file) {
                    if (in_array($line, $object->covered[$file])) {
                        return $value === 1;
                    }
                };
                $covered = array_filter($lines, $filter, ARRAY_FILTER_USE_BOTH);

                // Store the counts for this file
                $coverage = [
                    'covered' => count($covered),
                    'total'   => count($executable),
                ];

                // If a classname exists in the file,
                // store the counts against it
                if ($class = $this->getClassForFile($file)) {
                    $processed['classes'][$class] = $coverage;
                    continue;
                }

                // If no class has been found, store the counts
                // directly against the file name
                $name = str_replace($this->runner->pwd.'/', '', $file);

                $processed['files'][$name] = $coverage;
            }
        }

        // Store the processed data
        return $this->processed = $processed;
    }
197847
public function run_check() {
		$r = $this->run();

		if ( $r->return_code || !empty( $r->STDERR ) ) {
			throw new \RuntimeException( $r );
		}

		return $r;
	}
652695
public function getCode()
    {
        $result = $this->code;
        if (is_callable($result)) {
            $result = $result($this);
        }

        return (string) $result;
    }
768273
public function run(): int
    {
        $className = $this->console->writeLine('Stubbles ConsoleAppCreator')
                ->writeLine(' (c) 2012-2016 Stubbles Development Group')
                ->writeEmptyLine()
                ->prompt('Please enter the full qualified class name for the console app: ')
                ->withFilter(ClassNameFilter::instance());
        if (null === $className) {
            $this->console->writeLine('The entered class name is not a valid class name');
            return -10;
        }

        $this->classFile->create($className);
        $this->scriptFile->create($className);
        $this->testFile->create($className);
        return 0;
    }
1002379
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);
    }
524495
public function PercentageX()
    {
        if ($field = $this->owner->FocusPoint) {
            return round(DBFocusPoint::focusCoordToOffset($field->getX()) * 100);
        }
        return 0;
    }
891918
public function getValueOld()
	{
		return $this->_value;

		switch ( $this->_xmlType->TypeCode )
		{
			case XmlTypeCode::String:

				return $this->_value;

			case XmlTypeCode::Double:

				if ( is_infinite( $this->_value ) )
				{
					return $this->_value > 0 ? INF : -INF;
				}

				// Can't do this because some conformance suite tests fail
				// as they expect a specifically formatted number.
				if ( ! is_string( $this->_value ) )
				{
					return $this->_value;
				}

				$maxDigits = 17;
				if ( preg_match( DecimalValue::Pattern, $this->_value, $matches ) )
				{
					if ( ! isset( $matches['exponent'] ) )
					{
						$maxDigits = min( @strlen( $matches['digits'] ) + @strlen( $matches['decimals'] ), $maxDigits );
					}
				}

				return str_replace( "+", "", sprintf( "%.{$maxDigits}G", $this->_value ) );

			case XmlTypeCode::Float:

				if ( is_infinite( $this->_value ) )
				{
					return $this->_value > 0 ? INF : -INF;
				}

				$maxDigits = 8;
				if ( preg_match( DecimalValue::Pattern, $this->_value, $matches ) )
				{
					// if ( isset( $matches['exponent'] ) )
					// {
					// 	return str_replace( "+", "", $this->_value );
					// }
					$maxDigits = min( @strlen( $matches['digits'] ) + @strlen( $matches['decimals'] ), $maxDigits );
				}

				return str_replace( "+", "", sprintf( "%.{$maxDigits}G", $this->_value ) );

		}

		return XPath2Convert::ToString( $this->_value );
	}
1267283
public function totalSeconds() : int
    {
        return $this->days * 86400 + $this->h * 3600 + $this->i * 60 + $this->s;
    }
130994
public function getPercentage( $accuracy = 0 )
	{
		if( !$this->count )
			return 0;
		return round( $this->found / $this->count * 100, $accuracy );
	}
335503
public function getAt(): int
    {
        if ($this->at < 0) {
            return Location::BeforeFirstRow;
        }

        if ($this->at > $this->rowCount()) {
            return Location::AfterLastRow;
        }

        return $this->at;
    }
419283
def total_coverage(self):
        ''''''
        if 'COV' in self.FORMAT:
            return sum([int(x) for x in self.FORMAT['COV'].split(',')])
        else:
            return None
339548
public function getAlpha()
    {
        if (!is_numeric($this->markalpha)) {
            return 100;
        }

        if ($this->markalpha < 0 or $this->markalpha > 100) {
            return 100;
        }

        return (int) $this->markalpha;
    }
1172596
public function stop()
    {
        $data = fb_get_code_coverage($this->_config['cleanup']);
        fb_disable_code_coverage();

        $result = [];
        foreach ($data as $file => $coverage) {
            foreach ($coverage as $line => $value) {
                if ($line && $value !== -2) {
                    $result[$file][$line - 1] = $value === -1 ? 0 : $value;
                }
            }
        }
        return $result;
    }