\phpDocumentor\Plugin\Core\Transformer\WriterStatistics

Statistics transformation writer; generates statistic report as XML.

Generated XML structure:

 <?xml version="1.0"?>
 <phpdoc-stats version="2.4.0">
   <stat date="2014-06-02T19:26:15+02:00">
     <counters>
       <deprecated>100</deprecated>
       <errors>377</errors>
       <markers>2</markers>
     </counters>
   </stat>
 </phpdoc-stats>

Summary

Methods
Properties
Constants
getTranslator()
setTranslator()
transform()
checkRequirements()
No public properties found
No constants found
getDestinationPath()
saveCheckstyleReport()
checkForSpacesInPath()
appendPhpdocStatsElement()
appendStatElement()
getFilesCounter()
getDeprecatedCounter()
getErrorCounter()
getMarkerCounter()
$translator
N/A
No private methods found
No private properties found
N/A

Properties

Methods

getTranslator()

getTranslator() : \phpDocumentor\Translator\Translator

Returns an instance of the object responsible for translating content.

Returns

\phpDocumentor\Translator\Translator

setTranslator()

setTranslator(\phpDocumentor\Translator\Translator  $translator) : void

Sets a new object capable of translating strings on this writer.

Parameters

\phpDocumentor\Translator\Translator $translator

checkRequirements()

checkRequirements() : void

This method verifies whether PHP has all requirements needed to run this writer.

If one of the requirements is missing for this Writer then an exception of type RequirementMissing should be thrown; this indicates to the calling process that this writer will not function.

Throws

\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

when a requirements is missing stating which one.

getDestinationPath()

getDestinationPath(\phpDocumentor\Transformer\Transformation  $transformation) : string

Retrieves the destination location for this artifact.

Parameters

\phpDocumentor\Transformer\Transformation $transformation

Returns

string

saveCheckstyleReport()

saveCheckstyleReport(string  $artifact, \DOMDocument  $document) : void

Save the checkstyle report to the artifact

Parameters

string $artifact

Target name for the report

\DOMDocument $document

The actual xml document being saved

checkForSpacesInPath()

checkForSpacesInPath(string  $path) : void

Checks if there is a space in the path.

Parameters

string $path

Throws

\InvalidArgumentException

if path contains a space.

appendPhpdocStatsElement()

appendPhpdocStatsElement(\DOMDocument  $document) : \DOMDocument

Append phpdoc-stats element to the document.

Parameters

\DOMDocument $document

Returns

\DOMDocument

appendStatElement()

appendStatElement(\DOMDocument  $document, \phpDocumentor\Descriptor\ProjectDescriptor  $project, string  $date) : \DOMDocument

Appends a stat fragment.

Parameters

\DOMDocument $document
\phpDocumentor\Descriptor\ProjectDescriptor $project
string $date

Returns

\DOMDocument

getDeprecatedCounter()

getDeprecatedCounter(\phpDocumentor\Descriptor\ProjectDescriptor  $project) : integer

Get number of deprecated elements.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project

Returns

integer