ApiPlatform\SchemaGenerator\AnnotationGenerator\PhpDocAnnotationGenerator::generateDoc PHP Method

generateDoc() private method

Generates class or interface PHPDoc.
private generateDoc ( string $className, boolean $interface = false ) : array
$className string
$interface boolean
return array
    private function generateDoc($className, $interface = false)
    {
        $resource = $this->classes[$className]['resource'];
        $annotations = [];
        if (!$interface && isset($this->classes[$className]['interfaceName'])) {
            $annotations[] = '{@inheritdoc}';
            $annotations[] = '';
        } else {
            $annotations = $this->formatDoc($resource->get('rdfs:comment'));
            $annotations[] = '';
            $annotations[] = sprintf('@see %s %s', $resource->getUri(), 'Documentation on Schema.org');
        }
        if ($this->config['author']) {
            $annotations[] = sprintf('@author %s', $this->config['author']);
        }
        return $annotations;
    }