handler = new WhoopsConsoleHandler(); $this->configure(); return $this; } /** * Inject an editor into the whoops configuration. * * @return void * @throws \InvalidArgumentException for an invalid show trace option. */ public function configure(): void { /** @var WhoopsConsoleHandler $handler */ $handler = $this->getHandler(); if (!isset($this->options['show_trace']) || !isset($this->options['show_trace']['cli_display'])) { return; } $show_trace = $this->options['show_trace']['cli_display']; if (!is_bool($show_trace)) { throw new \InvalidArgumentException(sprintf( 'Whoops show trace option must be a boolean; received "%s"', (is_object($show_trace) ? get_class($show_trace) : gettype($show_trace)) )); } $handler->addTraceToOutput($show_trace); } }