mirror of https://github.com/rectorphp/rector.git
56 lines
1.7 KiB
PHTML
56 lines
1.7 KiB
PHTML
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tracy;
|
|
|
|
/**
|
|
* @var \Throwable $exception
|
|
* @var string $title
|
|
* @var ?string $nonce
|
|
* @var string $css
|
|
*/
|
|
|
|
$code = $exception->getCode() ? ' #' . $exception->getCode() : '';
|
|
$nonceAttr = $nonce ? ' nonce="' . Helpers::escapeHtml($nonce) . '"' : '';
|
|
$chain = Helpers::getExceptionChain($exception);
|
|
?><!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></iframe></noembed></noframes></noscript></option></select></template></title></table></p></code>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="robots" content="noindex">
|
|
<meta name="generator" content="Tracy by Nette Framework">
|
|
|
|
<title><?= Helpers::escapeHtml($title . ': ' . $exception->getMessage() . $code) ?></title>
|
|
<!-- in <?= str_replace('--', '- ', Helpers::escapeHtml($exception->getFile() . ':' . $exception->getLine())) ?> -->
|
|
<?php if (count($chain) > 1): ?>
|
|
<!--<?php foreach (array_slice($chain, 1) as $ex) {
|
|
echo str_replace('--', '- ', Helpers::escapeHtml("\n\tcaused by " . Helpers::getClass($ex) . ': ' . $ex->getMessage() . ($ex->getCode() ? ' #' . $ex->getCode() : '')));
|
|
} ?> -->
|
|
<?php endif ?>
|
|
|
|
<style class="tracy-debug">
|
|
<?= str_replace('</', '<\/', $css) ?>
|
|
</style>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<?php require __DIR__ . '/content.phtml' ?>
|
|
|
|
<script<?= $nonceAttr ?>>
|
|
'use strict';
|
|
<?php
|
|
array_map(function ($file) { echo '(function(){', str_replace(['<!--', '</s'], ['<\!--', '<\/s'], Helpers::minifyJs(file_get_contents($file))), '})();'; }, [
|
|
__DIR__ . '/../../assets/toggle.js',
|
|
__DIR__ . '/../../assets/table-sort.js',
|
|
__DIR__ . '/../../assets/tabs.js',
|
|
__DIR__ . '/../../Dumper/assets/dumper.js',
|
|
__DIR__ . '/bluescreen.js',
|
|
]);
|
|
?>
|
|
Tracy.BlueScreen.init();
|
|
</script>
|
|
</body>
|
|
</html>
|