ProjectAnalyzer
in package
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.
Properties
$elementCount Line 33
protected$elementCount : int
$fileCount Line 36
protected$fileCount : int
$topLevelNamespaceCount Line 39
protected$topLevelNamespaceCount : int
$unresolvedParentClassesCount Line 42
protected$unresolvedParentClassesCount : int
$descriptorCountByType Line 45
protected$descriptorCountByType : int[]
Methods
analyze() Line 50
Analyzes the given project descriptor and populates this object's properties.
publicanalyze(ProjectDescriptor $projectDescriptor) : void
__toString() Line 68
Returns a textual report of the findings of this class.
public__toString() : string
Returns
string —
addElementToCounter() Line 102
Increments the counter for element's class in the class counters.
protectedaddElementToCounter(array$classCounters, DescriptorAbstract $element) : array
incrementUnresolvedParentCounter() Line 116
Checks whether the given element is a class and if its parent could not be resolved; increment the counter.
protectedincrementUnresolvedParentCounter(DescriptorAbstract $element) : void
findAllElements() Line 134
Returns all elements from the project descriptor.
protectedfindAllElements(ProjectDescriptor $projectDescriptor) : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\DescriptorAbstract>