private function getMethodNotFoundException(ExampleEvent $event) { if ($this->io->isCodeGenerationEnabled() && ($exception = $event->getException()) && $exception instanceof MethodNotFoundException) { return $exception; } }