\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()
$elementCount
$fileCount
$topLevelNamespaceCount
$unresolvedParentClassesCount
$descriptorCountByType
N/A
No private methods found
No private properties found
N/A

Properties

$elementCount

$elementCount : integer

Type

integer

$fileCount

$fileCount : integer

Type

integer

$topLevelNamespaceCount

$topLevelNamespaceCount : integer

Type

integer

$unresolvedParentClassesCount

$unresolvedParentClassesCount : integer

Type

integer

$descriptorCountByType

$descriptorCountByType : array<mixed,integer>

Type

array<mixed,integer>

Methods

analyze()

analyze(\phpDocumentor\Descriptor\ProjectDescriptor  $projectDescriptor) : void

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

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $projectDescriptor

__toString()

__toString() : string

Returns a textual report of the findings of this class.

Returns

string

addElementToCounter()

addElementToCounter(array  $classCounters, \phpDocumentor\Descriptor\DescriptorAbstract  $element) : array

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

Parameters

array $classCounters
\phpDocumentor\Descriptor\DescriptorAbstract $element

Returns

array

incrementUnresolvedParentCounter()

incrementUnresolvedParentCounter(\phpDocumentor\Descriptor\DescriptorAbstract  $element) 

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

Parameters

\phpDocumentor\Descriptor\DescriptorAbstract $element