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

Breadcrumb

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

class Driver

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

Hierarchy

  • class \SebastianBergmann\CodeCoverage\Driver\Driver

Expanded class hierarchy of Driver

4 files declare their use of Driver
CodeCoverage.php in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
CodeCoverage.php in vendor/phpunit/phpunit/src/Runner/CodeCoverage.php
ProcessedCodeCoverageData.php in vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php
RawCodeCoverageData.php in vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php
7 string references to 'Driver'
BuildInformation::setRuntimeInformation in vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php
CredentialForm::validateForm in core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
Form validation handler.
DatabaseDriver::getPath in core/lib/Drupal/Core/Extension/DatabaseDriver.php
Returns the relative path of the extension.
DatabaseDriverList::doList in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
Builds the list of extensions.
SiteSettingsForm::buildForm in core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
Form constructor.

... See full list

File

vendor/phpunit/php-code-coverage/src/Driver/Driver.php, line 20

Namespace

SebastianBergmann\CodeCoverage\Driver
View source
abstract class Driver {
    
    /**
     * @var int
     *
     * @see http://xdebug.org/docs/code_coverage
     */
    public const LINE_NOT_EXECUTABLE = -2;
    
    /**
     * @var int
     *
     * @see http://xdebug.org/docs/code_coverage
     */
    public const LINE_NOT_EXECUTED = -1;
    
    /**
     * @var int
     *
     * @see http://xdebug.org/docs/code_coverage
     */
    public const LINE_EXECUTED = 1;
    
    /**
     * @var int
     *
     * @see http://xdebug.org/docs/code_coverage
     */
    public const BRANCH_NOT_HIT = 0;
    
    /**
     * @var int
     *
     * @see http://xdebug.org/docs/code_coverage
     */
    public const BRANCH_HIT = 1;
    private bool $collectBranchAndPathCoverage = false;
    private bool $detectDeadCode = false;
    public function canCollectBranchAndPathCoverage() : bool {
        return false;
    }
    public function collectsBranchAndPathCoverage() : bool {
        return $this->collectBranchAndPathCoverage;
    }
    
    /**
     * @throws BranchAndPathCoverageNotSupportedException
     */
    public function enableBranchAndPathCoverage() : void {
        if (!$this->canCollectBranchAndPathCoverage()) {
            throw new BranchAndPathCoverageNotSupportedException(sprintf('%s does not support branch and path coverage', $this->nameAndVersion()));
        }
        $this->collectBranchAndPathCoverage = true;
    }
    public function disableBranchAndPathCoverage() : void {
        $this->collectBranchAndPathCoverage = false;
    }
    public function canDetectDeadCode() : bool {
        return false;
    }
    public function detectsDeadCode() : bool {
        return $this->detectDeadCode;
    }
    
    /**
     * @throws DeadCodeDetectionNotSupportedException
     */
    public function enableDeadCodeDetection() : void {
        if (!$this->canDetectDeadCode()) {
            throw new DeadCodeDetectionNotSupportedException(sprintf('%s does not support dead code detection', $this->nameAndVersion()));
        }
        $this->detectDeadCode = true;
    }
    public function disableDeadCodeDetection() : void {
        $this->detectDeadCode = false;
    }
    public abstract function nameAndVersion() : string;
    public abstract function start() : void;
    public abstract function stop() : RawCodeCoverageData;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
Driver::$collectBranchAndPathCoverage private property
Driver::$detectDeadCode private property
Driver::BRANCH_HIT public constant
Driver::BRANCH_NOT_HIT public constant
Driver::canCollectBranchAndPathCoverage public function 1
Driver::canDetectDeadCode public function 1
Driver::collectsBranchAndPathCoverage public function
Driver::detectsDeadCode public function
Driver::disableBranchAndPathCoverage public function
Driver::disableDeadCodeDetection public function
Driver::enableBranchAndPathCoverage public function
Driver::enableDeadCodeDetection public function
Driver::LINE_EXECUTED public constant
Driver::LINE_NOT_EXECUTABLE public constant
Driver::LINE_NOT_EXECUTED public constant
Driver::nameAndVersion abstract public function 2
Driver::start abstract public function 2
Driver::stop abstract public function 2

API Navigation

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