mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 21:54:07 +09:00
Apply PHP Code Styling & Quality Changes (#2631)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
This commit is contained in:
1 parent
43d1969f68
commit
c500462e97
2 files changed
+7
-8
No files matched your search
@@ -28,7 +28,6 @@ class Box_EventDispatcher
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Notifies all listeners of a given event.
|
||||
*
|
||||
* @param Box_Event $event A Box_Event instance
|
||||
|
||||
+7
-7
@@ -66,6 +66,7 @@ function checkLegacyFiles(): void
|
||||
foreach ($toCheck as $path) {
|
||||
if ($filesystem->exists(Path::normalize($path))) {
|
||||
$legacyFound = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +86,7 @@ function checkSSL(): void
|
||||
|
||||
if (!empty(Config::getProperty('security.force_https')) && Config::getProperty('security.force_https') && !Environment::isCLI()) {
|
||||
if (!$request->isSecure()) {
|
||||
header('Location: ' . 'https://' . $request->getHost() . $request->getRequestUri());
|
||||
header('Location: https://' . $request->getHost() . $request->getRequestUri());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -99,8 +100,7 @@ function checkUpdatePatcher(): void
|
||||
global $di, $request;
|
||||
|
||||
$version = FOSSBilling\Version::VERSION;
|
||||
if ($di['cache']->getItem('updatePatcher')->isHit() && $version === $di['cache']->getItem('updatePatcher')->get())
|
||||
{
|
||||
if ($di['cache']->getItem('updatePatcher')->isHit() && $version === $di['cache']->getItem('updatePatcher')->get()) {
|
||||
exit('The update patcher has already been run for this version.');
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ function exceptionHandler(Exception|Error $e)
|
||||
/*
|
||||
* Pre-initialization.
|
||||
*/
|
||||
function preInit() : void
|
||||
function preInit(): void
|
||||
{
|
||||
// Define root path.
|
||||
define('PATH_ROOT', __DIR__);
|
||||
@@ -233,7 +233,7 @@ function preInit() : void
|
||||
/*
|
||||
* Initialize the application.
|
||||
*/
|
||||
function init() : void
|
||||
function init(): void
|
||||
{
|
||||
// Define custom error handlers.
|
||||
set_exception_handler(exceptionHandler(...));
|
||||
@@ -254,7 +254,7 @@ function init() : void
|
||||
define('ADMIN_PREFIX', Config::getProperty('admin_area_prefix'));
|
||||
define('DEBUG', (bool) Config::getProperty('debug_and_monitoring.debug', false));
|
||||
define('PATH_DATA', Path::normalize(Config::getProperty('path_data')));
|
||||
define('PATH_CACHE',Path::normalize(PATH_DATA . '/cache'));
|
||||
define('PATH_CACHE', Path::normalize(PATH_DATA . '/cache'));
|
||||
define('PATH_LOG', Path::normalize(PATH_DATA . '/log'));
|
||||
define('INSTANCE_ID', Config::getProperty('info.instance_id', 'Unknown'));
|
||||
|
||||
@@ -281,7 +281,7 @@ function init() : void
|
||||
/*
|
||||
* Post-initialization.
|
||||
*/
|
||||
function postInit() : void
|
||||
function postInit(): void
|
||||
{
|
||||
// Set error and exception handlers, and default logging settings.
|
||||
ini_set('log_errors', '1');
|
||||
|
||||
Reference in new issue
Block a user