private function describeFailure(Predicate $predicate, string $description = null): string
    {
        $predicateText = (string) $predicate;
        $failureDescription = sprintf(
                'Failed asserting that %s %s%s',
                $predicate->describeValue($this->exporter, $this->value),
                $predicateText,
                strpos($predicateText, "\n") !== false ? '' : '.'
        );

        if (!empty($description)) {
            $failureDescription .= "\n" . $description;
        }

        return $failureDescription;
    }