Refactor usage init hook to remove unecessary
inject
This commit is contained in:
parent
3865f48d32
commit
7064f884aa
1 changed files with 2 additions and 3 deletions
|
@ -557,9 +557,8 @@ App::shutdown()
|
|||
|
||||
App::init()
|
||||
->groups(['usage'])
|
||||
->inject('utopia')
|
||||
->action(function (App $utopia) {
|
||||
if ($utopia::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
|
||||
->action(function () {
|
||||
if (App::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
|
||||
throw new Exception(Exception::GENERAL_USAGE_DISABLED);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue