mc-cms-namelessmc/core/classes/Misc/Debugging.php
Sam 6f15e14392
chore: fix styleci (#3588)
Co-authored-by: Sam <samerton@users.noreply.github.com>
2025-03-29 10:50:03 +00:00

36 lines
962 B
PHP

<?php
/**
* Class to help manage global state of various debugging variables.
* TODO: Make `Debugging::enabled()` instead of needing to do `defined('DEBUGGING') && DEBUGGING`.
*
* @package NamelessMC\Misc
* @author Aberdeener
* @version 2.0.0
* @license MIT
*/
class Debugging
{
private static bool $_can_view_detailed_error = false;
private static bool $_can_generate_debug_link = false;
public static function canViewDetailedError(): bool
{
return self::$_can_view_detailed_error;
}
public static function setCanViewDetailedError(bool $detailed_error): void
{
self::$_can_view_detailed_error = $detailed_error;
}
public static function canGenerateDebugLink(): bool
{
return self::$_can_generate_debug_link;
}
public static function setCanGenerateDebugLink(bool $can_generate_debug_link): void
{
self::$_can_generate_debug_link = $can_generate_debug_link;
}
}