diff --git a/cspell.json b/cspell.json index 49baaafd1..25d96d3d1 100644 --- a/cspell.json +++ b/cspell.json @@ -334,7 +334,9 @@ "datatable", "FileCacheExcption", "Autoloader", - "autoloader" + "autoloader", + "qwertyuiopasdfghjklzxccvbnm", + "QWERTYUIOPASDFGHJKLZXCVBNM" ], "ignorePaths": [ "tests/**", diff --git a/data/class-header.txt b/data/class-header.txt index 9e4293c10..e310ec52a 100755 --- a/data/class-header.txt +++ b/data/class-header.txt @@ -9,6 +9,5 @@ * Copyright BoxBilling, Inc 2011-2021 * * This source file is subject to the Apache-2.0 License that is bundled - * with this source code in the file LICENSE + * with this source code in the file LICENSE. */ - diff --git a/src/di.php b/src/di.php index 00aeba5c3..5cbe5266c 100644 --- a/src/di.php +++ b/src/di.php @@ -1,8 +1,4 @@ -addWriter($writer2); } else { - $monolog = new FOSSBilling_Monolog($di); + $monolog = new \FOSSBilling\Monolog($di); $log->addWriter($monolog); } @@ -248,10 +244,10 @@ $di['session'] = function () use ($di) { * * @param void * - * @return \Box_Request + * @return \FOSSBilling\Request */ $di['request'] = function () use ($di) { - $service = new Box_Request(); + $service = new \FOSSBilling\Request(); $service->setDi($di); return $service; @@ -294,7 +290,7 @@ $di['twig'] = $di->factory(function () use ($di) { // Get internationalisation settings from config, or use sensible defaults for // missing required settings. - $locale = \FOSSBilling_i18n::getActiveLocale(); + $locale = \FOSSBilling\i18n::getActiveLocale(); $timezone = $config['i18n']['timezone'] ?? 'UTC'; $date_format = !empty($config['i18n']['date_format']) ? strtoupper($config['i18n']['date_format']) : 'MEDIUM'; $time_format = !empty($config['i18n']['time_format']) ? strtoupper($config['i18n']['time_format']) : 'SHORT'; @@ -506,27 +502,21 @@ $di['api_system'] = function () use ($di) { return $di['api']('system'); }; -/* - * - * @param void - * - * @return \Box_Tools - */ -$di['tools'] = $di->factory(function () use ($di) { - $service = new Box_Tools(); +$di['tools'] = function () use ($di) { + $service = new \FOSSBilling\Tools(); $service->setDi($di); return $service; -}); +}; /* * * @param void * - * @return \Box_Validate + * @return \FOSSBilling\Validate */ $di['validator'] = function () use ($di) { - $validator = new Box_Validate(); + $validator = new \FOSSBilling\Validate(); $validator->setDi($di); return $validator; @@ -536,10 +526,10 @@ $di['validator'] = function () use ($di) { * * @param void * - * @return \FOSSBilling_CentralAlerts + * @return \FOSSBilling\CentralAlerts */ $di['central_alerts'] = function () use ($di) { - $centralalerts = new \FOSSBilling_CentralAlerts(); + $centralalerts = new \FOSSBilling\CentralAlerts(); $centralalerts->setDi($di); return $centralalerts; @@ -549,10 +539,23 @@ $di['central_alerts'] = function () use ($di) { * * @param void * - * @return \FOSSBilling_ExtensionManager + * @return \FOSSBilling\CentralAlerts + */ +$di['central_alerts'] = function () use ($di) { + $centralalerts = new \FOSSBilling\CentralAlerts(); + $centralalerts->setDi($di); + + return $centralalerts; +}; + +/* + * + * @param void + * + * @return \FOSSBilling\ExtensionManager */ $di['extension_manager'] = function () use ($di) { - $extension = new \FOSSBilling_ExtensionManager(); + $extension = new \FOSSBilling\ExtensionManager(); $extension->setDi($di); return $extension; @@ -618,10 +621,10 @@ $di['server_manager'] = $di->protect(function($manager, $config) use ($di) { /* * @param void * - * @return FOSSBilling_Requirements + * @return \FOSSBilling\Requirements */ $di['requirements'] = function () use ($di) { - $r = new FOSSBilling_Requirements(); + $r = new \FOSSBilling\Requirements(); $r->setDi($di); return $r; @@ -682,7 +685,7 @@ $di['cart'] = function () use ($di) { * @return \Box_Table The new table object that was just created. */ $di['table'] = $di->protect(function ($name) use ($di) { - $tools = new Box_Tools(); + $tools = new \FOSSBilling\Tools(); $tools->setDi($di); $table = $tools->getTable($name); $table->setDi($di); @@ -734,7 +737,7 @@ $di['translate'] = $di->protect(function ($textDomain = '') use ($di) { $tr->setDomain($textDomain); } - $locale = \FOSSBilling_i18n::getActiveLocale(); + $locale = \FOSSBilling\i18n::getActiveLocale(); $tr->setDi($di); $tr->setLocale($locale); diff --git a/src/foss-update.php b/src/foss-update.php index d7733b743..78c6dcd3a 100644 --- a/src/foss-update.php +++ b/src/foss-update.php @@ -18,7 +18,7 @@ const DIR_SEP = DIRECTORY_SEPARATOR; /** * Patch to remove the old FileCache class that was replaced with Symfony's Cache component - * + * * @see https://github.com/FOSSBilling/FOSSBilling/pull/1184 */ class FOSSPatch_33 extends FOSSPatchAbstract @@ -33,8 +33,8 @@ class FOSSPatch_33 extends FOSSPatchAbstract } /** - * Patch to remove the old phpmailer package, some leftover admin_default files, and old Box_ classes we've removed or replaced - * + * Patch to remove the old phpmailer package, some leftover admin_default files, and old Box_ classes we've removed or replaced + * * @see https://github.com/FOSSBilling/FOSSBilling/pull/1091 and https://github.com/FOSSBilling/FOSSBilling/pull/1063 */ class FOSSPatch_32 extends FOSSPatchAbstract @@ -65,7 +65,7 @@ class FOSSPatch_32 extends FOSSPatchAbstract /** * Patch to remove the old htaccess.txt file, any old config.php backup - * + * * @see https://github.com/FOSSBilling/FOSSBilling/pull/1075 */ class FOSSPatch_31 extends FOSSPatchAbstract @@ -82,7 +82,7 @@ class FOSSPatch_31 extends FOSSPatchAbstract /** * Patch to remove the old guzzlehttp package, as we no longer use it. Also serves as an example for how to perform file action. - * + * * @see https://github.com/FOSSBilling/FOSSBilling/pull/987 */ class FOSSPatch_30 extends FOSSPatchAbstract @@ -98,8 +98,8 @@ class FOSSPatch_30 extends FOSSPatchAbstract /** * Patch to update email templates to use format_date/format_datetime filters - * instead of removed bb_date/bb_datetime filters. - * + * instead of removed bb_date/bb_datetime filters. + * * @see https://github.com/FOSSBilling/FOSSBilling/pull/948 */ class FOSSPatch_29 extends FOSSPatchAbstract @@ -368,8 +368,8 @@ natsort($patches); } ?> -
Update completed. You are using FOSSBilling
+Update completed. You are using FOSSBilling