Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Totals.php

function Totals::setNumMethods

File

vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php, line 104

Class

Totals
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

Namespace

SebastianBergmann\CodeCoverage\Report\Xml

Code

public function setNumMethods(int $count, int $tested) : void {
    $this->methodsNode
        ->setAttribute('count', (string) $count);
    $this->methodsNode
        ->setAttribute('tested', (string) $tested);
    $this->methodsNode
        ->setAttribute('percent', $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal