Skip to content

Commit

Permalink
constants are PascalCase
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 27, 2023
1 parent ec66378 commit 3a6fb90
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Tracy/Bar/assets/bar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Tracy;

<ul class="tracy-row" data-tracy-group="<?= Helpers::escapeHtml($type) ?>">
<?php if ($type === 'main'): ?>
<li id="tracy-debug-logo" title="Tracy Debugger <?= Debugger::VERSION, " \nhttps://tracy.nette.org" ?>">
<li id="tracy-debug-logo" title="Tracy Debugger <?= Debugger::Version, " \nhttps://tracy.nette.org" ?>">
<svg viewBox="0 -10 1561 333"><path fill="#585755" d="m176 327h-57v-269h-119v-57h291v57h-115v269zm208-191h114c50 0 47-78 0-78h-114v78zm106-135c17 0 33 2 46 7 75 30 75 144 1 175-13 6-29 8-47 8h-27l132 74v68l-211-128v122h-57v-326h163zm300 57c-5 0-9 3-11 9l-56 156h135l-55-155c-2-7-6-10-13-10zm-86 222l-17 47h-61l102-285c20-56 107-56 126 0l102 285h-61l-17-47h-174zm410 47c-98 0-148-55-148-163v-2c0-107 50-161 149-161h118v57h-133c-26 0-45 8-58 25-12 17-19 44-19 81 0 71 26 106 77 106h133v57h-119zm270-145l-121-181h68l81 130 81-130h68l-121 178v148h-56v-145z"/></svg>
</li>
<?php endif; if ($type === 'redirect'): ?>
Expand Down
2 changes: 1 addition & 1 deletion src/Tracy/Bar/assets/loader.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $asyncAttr = $async ? ' async' : '';


<!-- Tracy Debug Bar -->
<script src="<?= Helpers::escapeHtml($baseUrl) ?>_tracy_bar=js&amp;v=<?= urlencode(Debugger::VERSION) ?>&amp;XDEBUG_SESSION_STOP=1" data-id="<?= Helpers::escapeHtml($requestId) ?>"<?= $nonceAttr ?>></script>
<script src="<?= Helpers::escapeHtml($baseUrl) ?>_tracy_bar=js&amp;v=<?= urlencode(Debugger::Version) ?>&amp;XDEBUG_SESSION_STOP=1" data-id="<?= Helpers::escapeHtml($requestId) ?>"<?= $nonceAttr ?>></script>
<script<?= $nonceAttr ?>>
Tracy.Debug.init(<?= str_replace(['<!--', '</s'], ['<\!--', '<\/s'], json_encode($content, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE)) ?>);
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/Tracy/Bar/panels/info.panel.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $info = [
'HTTP method / response code' => isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] . ' / ' . http_response_code() : null,
'PHP' => PHP_VERSION,
'Xdebug' => extension_loaded('xdebug') ? phpversion('xdebug') : null,
'Tracy' => Debugger::VERSION,
'Tracy' => Debugger::Version,
'Server' => $_SERVER['SERVER_SOFTWARE'] ?? null,
];

Expand Down
25 changes: 17 additions & 8 deletions src/Tracy/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,33 @@
*/
class Debugger
{
public const VERSION = '2.10.3';
public const Version = '2.10.3';

/** server modes for Debugger::enable() */
public const
Development = false,
Production = true,
Detect = null;

public const
DEVELOPMENT = self::Development,
PRODUCTION = self::Production,
DETECT = self::Detect;

public const CookieSecret = 'tracy-debug';

/** @deprecated use Debugger::Version */
public const VERSION = self::Version;

/** @deprecated use Debugger::Development */
public const DEVELOPMENT = self::Development;

/** @deprecated use Debugger::Production */
public const PRODUCTION = self::Production;

/** @deprecated use Debugger::Detect */
public const DETECT = self::Detect;

/** @deprecated use Debugger::CookieSecret */
public const COOKIE_SECRET = self::CookieSecret;

/** in production mode is suppressed any debugging output */
public static ?bool $productionMode = self::DETECT;
public static ?bool $productionMode = self::Detect;

/** whether to display debug bar in development mode */
public static bool $showBar = true;
Expand Down Expand Up @@ -391,7 +400,7 @@ public static function getBlueScreen(): BlueScreen
self::$blueScreen->info = [
'PHP ' . PHP_VERSION,
$_SERVER['SERVER_SOFTWARE'] ?? null,
'Tracy ' . self::VERSION,
'Tracy ' . self::Version,
];
}

Expand Down

0 comments on commit 3a6fb90

Please sign in to comment.