timeFactory = $timeFactory; $this->logger = $logger; } public function start(string $task): PerformanceLoggerTask { return $this->startWithLogger( $task, $this->logger ); } public function startWithLogger(string $task, LoggerInterface $logger): PerformanceLoggerTask { return new PerformanceLoggerTask( $task, $this->timeFactory, $logger ); } }