protected function generateBlock(
        $label,
        $blockStyle,
        AnalysisResult $result,
        IssueSeverity $severity
    ) {
        $this->typeCheck->generateBlock(func_get_args());

        $errorLines = array(
            sprintf('[%s]', $label),
        );

        $classNames = $result->classNamesBySeverity($severity);
        foreach ($classNames as $className) {
            $errorLines[] = '';
            $errorLines[] = sprintf('  [%s]', $className->string());

            $classIssues = $result->classIssuesBySeverityAndClass(
                $severity,
                $className
            );
            if (count($classIssues) > 0) {
                $errorLines[] = '    [General]';
            }
            foreach ($classIssues as $issue) {
                $errorLines[] = sprintf(
                    '      - %s',
                    $issue->accept($this->issueRenderer())
                );
            }

            $methodRelatedIssues = $result->methodRelatedIssuesBySeverityAndClass(
                $severity,
                $className
            );
            foreach ($methodRelatedIssues as $methodName => $methodIssues) {
                $errorLines[] = sprintf('    [%s()]', $methodName);

                foreach ($methodIssues as $issue) {
                    $errorLines[] = sprintf(
                        '      - %s',
                        $issue->accept($this->issueRenderer())
                    );
                }
            }
        }

        return $this->getHelperSet()
            ->get('formatter')
            ->formatBlock($errorLines, $blockStyle, true)
        ;
    }
protected function generateBlock(
        $label,
        $blockStyle,
        AnalysisResult $result,
        IssueSeverity $severity
    ) {
        $this->typeCheck->generateBlock(func_get_args());

        $errorLines = array(
            sprintf('[%s]', $label),
        );

        $classNames = $result->classNamesBySeverity($severity);
        foreach ($classNames as $className) {
            $errorLines[] = '';
            $errorLines[] = sprintf('  [%s]', $className->string());

            $classIssues = $result->classIssuesBySeverityAndClass(
                $severity,
                $className
            );
            if (count($classIssues) > 0) {
                $errorLines[] = '    [General]';
            }
            foreach ($classIssues as $issue) {
                $errorLines[] = sprintf(
                    '      - %s',
                    $issue->accept($this->issueRenderer())
                );
            }

            $methodRelatedIssues = $result->methodRelatedIssuesBySeverityAndClass(
                $severity,
                $className
            );
            foreach ($methodRelatedIssues as $methodName => $methodIssues) {
                $errorLines[] = sprintf('    [%s()]', $methodName);

                foreach ($methodIssues as $issue) {
                    $errorLines[] = sprintf(
                        '      - %s',
                        $issue->accept($this->issueRenderer())
                    );
                }
            }
        }

        return $this->getHelperSet()
            ->get('formatter')
            ->formatBlock($errorLines, $blockStyle, true)
        ;
    }
@param string         $label
@param string         $blockStyle
@param AnalysisResult $result
@param IssueSeverity  $severity

@return string