<commit_before><?php declare(strict_types = 1);

spl_autoload_register(function (string $class): void {
	static $composerAutoloader;
	if (!extension_loaded('phar') || defined('__PHPSTAN_RUNNING__')) {
		return;
	}

	if (strpos($class, '_HumbugBox') === 0) {
		if (!in_array('phar', stream_get_wrappers(), true)) {
			throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
		}

		if ($composerAutoloader === null) {
			$composerAutoloader = require 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/clue/block-react/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/jetbrains/phpstorm-stubs/PhpStormStubsMap.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-stream/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-timer/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/ringcentral/psr7/src/functions_include.php';
		}
		$composerAutoloader->loadClass($class);

		return;
	}
	if (strpos($class, 'PHPStan\\PhpDocParser\\') === 0) {
		return;
	}

	$isPhpStan = strpos($class, 'PHPStan\\') === 0;
	$isBetterReflection = strpos($class, 'Roave\\BetterReflection\\') === 0;
	if (!$isPhpStan && !$isBetterReflection) {
		return;
	}

	if (!in_array('phar', stream_get_wrappers(), true)) {
		throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
	}

	$filename = str_replace('\\', DIRECTORY_SEPARATOR, $class);

	if ($isPhpStan) {
		$filename = substr($filename, strlen('PHPStan\\'));
		$filepath = 'phar://' . __DIR__ . '/phpstan.phar/src/' . $filename . '.php';
	} elseif ($isBetterReflection) {
		$filename = substr($filename, strlen('Roave\\BetterReflection\\'));
		$filepath = 'phar://' . __DIR__ . '/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/' . $filename . '.php';
	} else {
		return;
	}

	if (!file_exists($filepath)) {
		return;
	}

	require $filepath;
});<commit_msg>Revert "Bootstrap - autoload Roave\BetterReflection classes"<commit_after><?php declare(strict_types = 1);

spl_autoload_register(function (string $class): void {
	static $composerAutoloader;
	if (!extension_loaded('phar') || defined('__PHPSTAN_RUNNING__')) {
		return;
	}

	if (strpos($class, '_HumbugBox') === 0) {
		if (!in_array('phar', stream_get_wrappers(), true)) {
			throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
		}

		if ($composerAutoloader === null) {
			$composerAutoloader = require 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/clue/block-react/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/jetbrains/phpstorm-stubs/PhpStormStubsMap.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-stream/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-timer/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise/src/functions_include.php';
			require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/ringcentral/psr7/src/functions_include.php';
		}
		$composerAutoloader->loadClass($class);

		return;
	}
	if (strpos($class, 'PHPStan\\PhpDocParser\\') === 0) {
		return;
	}
	if (strpos($class, 'PHPStan\\') !== 0) {
		return;
	}

	if (!in_array('phar', stream_get_wrappers(), true)) {
		throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
	}

	$filename = str_replace('\\', DIRECTORY_SEPARATOR, $class);
	$filename = substr($filename, strlen('PHPStan\\'));
	$filepath = 'phar://' . __DIR__ . '/phpstan.phar/src/' . $filename . '.php';
	if (!file_exists($filepath)) {
		return;
	}

	require $filepath;
});
{'fraction_non_alphanumeric': 0.18377976190476192, 'fraction_numerical': 0.002728174603174603, 'mean_word_length': 4.265013054830288, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1818599', 'n_tokens_mistral': 1563, 'n_tokens_neox': 1467, 'n_words': 248}