remove has
This commit is contained in:
@@ -41,14 +41,10 @@ trait Behaviour
|
||||
|
||||
$dispatcher->subscribeTo('applicationStart', function (Event $event) {
|
||||
$container = $event->getArgument('container');
|
||||
if (!self::hasLogger($container)) {
|
||||
return; }
|
||||
self::getLogger($container)->notice('Application start: ' . $_ENV['APPLICATION_NAME']); });
|
||||
|
||||
$dispatcher->subscribeTo('applicationStop', function (Event $event) {
|
||||
$container = $event->getArgument('container');
|
||||
if (!self::hasLogger($container)) {
|
||||
return; }
|
||||
self::getLogger($container)->notice('Application stop: ' . $_ENV['APPLICATION_NAME']); });
|
||||
}
|
||||
|
||||
@@ -65,9 +61,4 @@ trait Behaviour
|
||||
{
|
||||
return [$container->get(Handler::class)];
|
||||
}
|
||||
|
||||
private static function hasLogger(Container $container): bool
|
||||
{
|
||||
return $container->has(Logger::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user