\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 : int

Type

int

$fileCount

$fileCount : int

Type

int

$topLevelNamespaceCount

$topLevelNamespaceCount : int

Type

int

$unresolvedParentClassesCount

$unresolvedParentClassesCount : int

Type

int

$descriptorCountByType

$descriptorCountByType : int[]

Type

int[]

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<string,int>  $classCounters, \phpDocumentor\Descriptor\DescriptorAbstract  $element) : array<string,int>

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) : void

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

Parameters

\phpDocumentor\Descriptor\DescriptorAbstract $element

findAllElements()

findAllElements(\phpDocumentor\Descriptor\ProjectDescriptor  $projectDescriptor) : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\DescriptorAbstract>

Returns all elements from the project descriptor.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $projectDescriptor

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\DescriptorAbstract> —