class PHP
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php \PHPUnit\TextUI\Configuration\Php
- 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Php
- 11.1.x vendor/phpunit/phpunit/src/Event/Value/Runtime/PHP.php \PHPUnit\Event\Runtime\PHP
- 11.1.x vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php \PHP_CodeSniffer\Tokenizers\PHP
- 11.1.x core/lib/Drupal/Component/Uuid/Php.php \Drupal\Component\Uuid\Php
Hierarchy
- class \SebastianBergmann\CodeCoverage\Report\PHP
Expanded class hierarchy of PHP
1 file declares its use of PHP
- CodeCoverage.php in vendor/
phpunit/ phpunit/ src/ Runner/ CodeCoverage.php
63 string references to 'PHP'
- AnnotatedClassDiscovery::getDefinitions in core/
lib/ Drupal/ Component/ Annotation/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Gets the definition of all plugins for this type.
- AnnotatedClassDiscoveryAutomatedProviders::getDefinitions in core/
modules/ migrate/ src/ Plugin/ Discovery/ AnnotatedClassDiscoveryAutomatedProviders.php - Gets the definition of all plugins for this type.
- ArrayLoader::configureObject in vendor/
composer/ composer/ src/ Composer/ Package/ Loader/ ArrayLoader.php - AttributeClassDiscovery::getDefinitions in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php - Gets the definition of all plugins for this type.
- AttributeFileLoader::supports in vendor/
symfony/ routing/ Loader/ AttributeFileLoader.php
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ PHP.php, line 20
Namespace
SebastianBergmann\CodeCoverage\ReportView source
final class PHP {
public function process(CodeCoverage $coverage, ?string $target = null) : string {
$coverage->clearCache();
$buffer = "<?php\nreturn \\unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'" . PHP_EOL . serialize($coverage) . PHP_EOL . 'END_OF_COVERAGE_SERIALIZATION' . PHP_EOL . ');';
if ($target !== null) {
if (!str_contains($target, '://')) {
Filesystem::createDirectory(dirname($target));
}
if (@file_put_contents($target, $buffer) === false) {
throw new WriteOperationFailedException($target);
}
}
return $buffer;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
PHP::process | public | function |