\phpDocumentor\DescriptorProjectAnalyzer

Analyzes a Project Descriptor and collects key information.

This class can be used by external tools to analyze the Project Descriptor and collect key information from it such as the total number of elements per type of Descriptor, the number of top level namespaces or the number of parent classes that could not be interpreted by the Compiler passes.

Summary

Methods
Properties
Constants
analyze()
__toString()
No public properties found
No constants found
addElementToCounter()
incrementUnresolvedParentCounter()
findAllElements()
$fileCount
$topLevelNamespaceCount
$unresolvedParentClassesCount
$descriptorCountByType
N/A
No private methods found
No private properties found
N/A

Properties

$fileCount

$fileCount : int

Type

int

$topLevelNamespaceCount

$topLevelNamespaceCount : int

Type

int

$unresolvedParentClassesCount

$unresolvedParentClassesCount : int

Type

int

$descriptorCountByType

$descriptorCountByType : array<array-key,int>

Type

array

Methods

analyze()

analyze(\phpDocumentor\Descriptor\DocumentationSetDescriptor  $documentationSet) : void

Analyzes the given project descriptor and populates this object's properties.

Parameters

\phpDocumentor\Descriptor\DocumentationSetDescriptor $documentationSet

__toString()

__toString() : string

Returns a textual report of the findings of this class.

Returns

string —

addElementToCounter()

addElementToCounter(array<string,int>  $classCounters, \phpDocumentor\Descriptor\Interfaces\ElementInterface  $element) : array<string,int>

Increments the counter for element's class in the class counters.

Parameters

array $classCounters
\phpDocumentor\Descriptor\Interfaces\ElementInterface $element

Returns

array

incrementUnresolvedParentCounter()

incrementUnresolvedParentCounter(\phpDocumentor\Descriptor\Interfaces\ElementInterface  $element) : void

Checks whether the given element is a class and if its parent could not be resolved; increment the counter.

Parameters

\phpDocumentor\Descriptor\Interfaces\ElementInterface $element

findAllElements()

findAllElements(\phpDocumentor\Descriptor\DocumentationSetDescriptor  $documentationSet) : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Interfaces\ElementInterface>

Returns all elements from the project descriptor.

Parameters

\phpDocumentor\Descriptor\DocumentationSetDescriptor $documentationSet

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Interfaces\ElementInterface> —