function Snapshot::__construct
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php \PHPUnit\Event\Telemetry\Snapshot::__construct()
File
-
vendor/
sebastian/ global-state/ src/ Snapshot.php, line 54
Class
- Snapshot
- A snapshot of global state.
Namespace
SebastianBergmann\GlobalStateCode
public function __construct(?ExcludeList $excludeList = null, bool $includeGlobalVariables = true, bool $includeStaticProperties = true, bool $includeConstants = true, bool $includeFunctions = true, bool $includeClasses = true, bool $includeInterfaces = true, bool $includeTraits = true, bool $includeIniSettings = true, bool $includeIncludedFiles = true) {
$this->excludeList = $excludeList ?: new ExcludeList();
if ($includeConstants) {
$this->snapshotConstants();
}
if ($includeFunctions) {
$this->snapshotFunctions();
}
if ($includeClasses || $includeStaticProperties) {
$this->snapshotClasses();
}
if ($includeInterfaces) {
$this->snapshotInterfaces();
}
if ($includeGlobalVariables) {
$this->setupSuperGlobalArrays();
$this->snapshotGlobals();
}
if ($includeStaticProperties) {
$this->snapshotStaticProperties();
}
if ($includeIniSettings) {
$this->iniSettings = ini_get_all(null, false);
}
if ($includeIncludedFiles) {
$this->includedFiles = get_included_files();
}
if ($includeTraits) {
$this->traits = get_declared_traits();
}
}