$logger) { $this->logger = $logger; } public function doSomething($foo) { if (!$foo) { $this->logger->warning("Foo!!!", [$foo]); } } } ?>