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

Breadcrumb

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

class Thresholds

@psalm-immutable

Hierarchy

  • class \SebastianBergmann\CodeCoverage\Report\Thresholds

Expanded class hierarchy of Thresholds

5 files declare their use of Thresholds
CodeCoverage.php in vendor/phpunit/phpunit/src/Runner/CodeCoverage.php
Facade.php in vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php
Loader.php in vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php
Merger.php in vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php
Renderer.php in vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php
1 string reference to 'Thresholds'
system.schema.yml in core/modules/system/config/schema/system.schema.yml
core/modules/system/config/schema/system.schema.yml

File

vendor/phpunit/php-code-coverage/src/Report/Thresholds.php, line 17

Namespace

SebastianBergmann\CodeCoverage\Report
View source
final class Thresholds {
    private readonly int $lowUpperBound;
    private readonly int $highLowerBound;
    public static function default() : self {
        return new self(50, 90);
    }
    
    /**
     * @throws InvalidArgumentException
     */
    public static function from(int $lowUpperBound, int $highLowerBound) : self {
        if ($lowUpperBound > $highLowerBound) {
            throw new InvalidArgumentException('$lowUpperBound must not be larger than $highLowerBound');
        }
        return new self($lowUpperBound, $highLowerBound);
    }
    private function __construct(int $lowUpperBound, int $highLowerBound) {
        $this->lowUpperBound = $lowUpperBound;
        $this->highLowerBound = $highLowerBound;
    }
    public function lowUpperBound() : int {
        return $this->lowUpperBound;
    }
    public function highLowerBound() : int {
        return $this->highLowerBound;
    }

}

Members

Title Sort descending Modifiers Object type Summary
Thresholds::$highLowerBound private property
Thresholds::$lowUpperBound private property
Thresholds::default public static function
Thresholds::from public static function
Thresholds::highLowerBound public function
Thresholds::lowUpperBound public function
Thresholds::__construct private function

API Navigation

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