public function generateNiceSummaries()
    {
        $problemSummaries = [];
        if (!empty($this->bad_definitions)) {
            // Build a nice string containing all encountered bad definitions.
            $strSubChunks = [];
            foreach ($this->bad_definitions as $className => $messages) {
                $strSubChunks[] = sprintf(
                    '"%s": ([\'%s\'])',
                    $className, implode('\'], and [\'', $messages)
                );
            }
            $problemSummaries['bad_definitions'] = sprintf(
                'Bad JSON property definitions in %s.',
                implode(', and in ', $strSubChunks)
            );
        }
        if (!empty($this->missing_definitions)) {
            // Build a nice string containing all missing class properties.
            $strSubChunks = [];
            foreach ($this->missing_definitions as $className => $messages) {
                $strSubChunks[] = sprintf(
                    '"%s": ("%s")',
                    $className, implode('", "', $messages)
                );
            }
            $problemSummaries['missing_definitions'] = sprintf(
                'Missing JSON property definitions in %s.',
                implode(', and in ', $strSubChunks)
            );
        }

        return $problemSummaries;
    }