private function printExampleFooterOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)
    {
        if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {
            return;
        }

        $this->examplePrinter->printFooter($formatter, $event->getTestResult());
        $this->exampleSetupPrinter->printTeardown($formatter, $event->getTeardown());

        $this->example = null;
    }