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;
    }
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;
    }
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 ; }
Generates nicely formatted problem summaries for this class analysis.

@return array An array with formatted messages for every type of analysis
which actually had errors, keyed by the problem type. If no
errors, the returned array will be empty.

@see ClassAnalysis::hasProblems()
@see ClassAnalysis::generateNiceSummariesAsString()
Generates nicely formatted problem summaries for this class analysis .