mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-01 12:48:08 +09:00
Apply PHP Code Styling & Quality Changes (#2038)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
This commit is contained in:
1 parent
53fcee87b3
commit
a86da9ad90
4 files changed
+35
-35
No files matched your search
+5
-5
@@ -113,7 +113,7 @@ function checkRequirements()
|
||||
function checkSSL()
|
||||
{
|
||||
$config = include PATH_CONFIG;
|
||||
if (isset($config['security']['force_https']) && $config['security']['force_https'] && !FOSSBilling\Environment::isCLI()) {
|
||||
if (isset($config['security']['force_https']) && $config['security']['force_https'] && !Environment::isCLI()) {
|
||||
if (!FOSSBilling\Tools::isHTTPS()) {
|
||||
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
header('Location: ' . $url);
|
||||
@@ -145,11 +145,11 @@ function checkWebServer()
|
||||
function errorHandler(int $number, string $message, string $file, int $line)
|
||||
{
|
||||
// Just some housekeeping to ensure a few things we rely on are loaded.
|
||||
if (!class_exists('\\' . \FOSSBilling\ErrorPage::class)) {
|
||||
if (!class_exists('\\' . FOSSBilling\ErrorPage::class)) {
|
||||
require_once PATH_LIBRARY . DIRECTORY_SEPARATOR . 'FOSSBilling' . DIRECTORY_SEPARATOR . 'ErrorPage.php';
|
||||
}
|
||||
|
||||
if (!class_exists('\\' . \FOSSBilling\SentryHelper::class)) {
|
||||
if (!class_exists('\\' . FOSSBilling\SentryHelper::class)) {
|
||||
require_once PATH_LIBRARY . DIRECTORY_SEPARATOR . 'FOSSBilling' . DIRECTORY_SEPARATOR . 'SentryHelper.php';
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ function exceptionHandler(Exception|Error $e)
|
||||
|
||||
echo $whoops->handleException($e);
|
||||
} else {
|
||||
$errorPage = new \FOSSBilling\ErrorPage();
|
||||
$errorPage = new FOSSBilling\ErrorPage();
|
||||
$errorPage->generatePage($e->getCode(), $message);
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ $loader = new FOSSBilling\AutoLoader();
|
||||
$loader->register();
|
||||
|
||||
// Now that the config file is loaded, we can enable Sentry
|
||||
\FOSSBilling\SentryHelper::registerSentry($config);
|
||||
FOSSBilling\SentryHelper::registerSentry($config);
|
||||
|
||||
// Verify the installer was removed.
|
||||
checkInstaller();
|
||||
|
||||
Reference in new issue
Block a user