ProjectAnalyzer

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.

package

Default

Methods

Returns a textual report of the findings of this class.

__toString() : string

Response

string

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

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

Arguments

$classCounters

array

Response

array

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

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

Arguments

Returns all elements from the project descriptor.

findAllElements(\phpDocumentor\Descriptor\ProjectDescriptor $projectDescriptor) : array<mixed,\phpDocumentor\Descriptor\DescriptorAbstract>

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

incrementUnresolvedParentCounter(\phpDocumentor\Descriptor\DescriptorAbstract $element) 

Properties

elementCount

elementCount : integer
var

Type(s)

integer

fileCount

fileCount : integer
var

Type(s)

integer

topLevelNamespaceCount

topLevelNamespaceCount : integer
var

Type(s)

integer

unresolvedParentClassesCount

unresolvedParentClassesCount : integer
var

Type(s)

integer

descriptorCountByType

descriptorCountByType : array<mixed,integer>
var

Type(s)

array<mixed,integer>