PHP Class PDepend\Report\Summary\Xml

Inheritance: extends PDepend\Source\ASTVisitor\AbstractASTVisitor, implements PDepend\Report\CodeAwareGenerator, implements PDepend\Report\FileAwareGenerator
Datei anzeigen Open project: pdepend/pdepend Class Usage Examples

Protected Properties

Property Type Description
$code PDepend\Source\AST\ASTArtifactList The raw {@link \PDepend\Source\AST\ASTNamespace} instances.
$fileSet PDepend\Source\AST\ASTCompilationUnit[] Set of all analyzed files.

Public Methods

Method Description
close ( ) : void Closes the logger process and writes the output file.
getAcceptedAnalyzers ( ) : array(string) Returns an array with accepted analyzer types. These types can be concrete analyzer classes or one of the descriptive analyzer interfaces.
log ( PDepend\Metrics\Analyzer $analyzer ) : boolean Adds an analyzer to log. If this logger accepts the given analyzer it with return true, otherwise the return value is false.
setArtifacts ( PDepend\Source\AST\ASTArtifactList $artifacts ) : void Sets the context code nodes.
setLogFile ( string $logFile ) : void Sets the output log file.
visitClass ( PDepend\Source\AST\ASTClass $class ) : void Visits a class node.
visitFunction ( PDepend\Source\AST\ASTFunction $function ) : void Visits a function node.
visitInterface ( PDepend\Source\AST\ASTInterface $interface ) : void Visits a code interface object.
visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void Visits a method node.
visitNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void Visits a namespace node.
visitTrait ( PDepend\Source\AST\ASTTrait $trait ) : void Visits a trait node.

Protected Methods

Method Description
writeFileReference ( DOMElement $xml, ASTCompilationUnit $compilationUnit = null ) : void Appends a file reference element to the given $xml element.
writeNodeMetrics ( DOMElement $xml, PDepend\Source\AST\AbstractASTArtifact $node ) : void Aggregates all metrics for the given $node instance and adds them to the \DOMElement

Private Methods

Method Description
generateTypeXml ( PDepend\Source\AST\ASTClass $type, string $typeIdentifier ) : void Generates the XML for a class or trait node.
getProjectMetrics ( ) : array(string=>mixed) Returns an array with all collected project metrics.

Method Details

close() public method

Closes the logger process and writes the output file.
public close ( ) : void
return void

getAcceptedAnalyzers() public method

Returns an array with accepted analyzer types. These types can be concrete analyzer classes or one of the descriptive analyzer interfaces.
public getAcceptedAnalyzers ( ) : array(string)
return array(string)

log() public method

Adds an analyzer to log. If this logger accepts the given analyzer it with return true, otherwise the return value is false.
public log ( PDepend\Metrics\Analyzer $analyzer ) : boolean
$analyzer PDepend\Metrics\Analyzer The analyzer to log.
return boolean

setArtifacts() public method

Sets the context code nodes.
public setArtifacts ( PDepend\Source\AST\ASTArtifactList $artifacts ) : void
$artifacts PDepend\Source\AST\ASTArtifactList
return void

setLogFile() public method

Sets the output log file.
public setLogFile ( string $logFile ) : void
$logFile string The output log file.
return void

visitClass() public method

Visits a class node.
public visitClass ( PDepend\Source\AST\ASTClass $class ) : void
$class PDepend\Source\AST\ASTClass
return void

visitFunction() public method

Visits a function node.
public visitFunction ( PDepend\Source\AST\ASTFunction $function ) : void
$function PDepend\Source\AST\ASTFunction
return void

visitInterface() public method

Visits a code interface object.
public visitInterface ( PDepend\Source\AST\ASTInterface $interface ) : void
$interface PDepend\Source\AST\ASTInterface
return void

visitMethod() public method

Visits a method node.
public visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void
$method PDepend\Source\AST\ASTMethod
return void

visitNamespace() public method

Visits a namespace node.
public visitNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void
$namespace PDepend\Source\AST\ASTNamespace
return void

visitTrait() public method

Visits a trait node.
public visitTrait ( PDepend\Source\AST\ASTTrait $trait ) : void
$trait PDepend\Source\AST\ASTTrait
return void

writeFileReference() protected method

protected writeFileReference ( DOMElement $xml, ASTCompilationUnit $compilationUnit = null ) : void
$xml DOMElement The parent xml element.
$compilationUnit PDepend\Source\AST\ASTCompilationUnit The code file instance.
return void

writeNodeMetrics() protected method

Aggregates all metrics for the given $node instance and adds them to the \DOMElement
protected writeNodeMetrics ( DOMElement $xml, PDepend\Source\AST\AbstractASTArtifact $node ) : void
$xml DOMElement
$node PDepend\Source\AST\AbstractASTArtifact
return void

Property Details

$code protected_oe property

The raw {@link \PDepend\Source\AST\ASTNamespace} instances.
protected ASTArtifactList,PDepend\Source\AST $code
return PDepend\Source\AST\ASTArtifactList

$fileSet protected_oe property

Set of all analyzed files.
protected ASTCompilationUnit[],PDepend\Source\AST $fileSet
return PDepend\Source\AST\ASTCompilationUnit[]