Statistics

Extends \phpDocumentor\Plugin\Core\Transformer\Writer\Checkstyle

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>
author

Siad Ardroumli [email protected]

package

Default

Methods

Append phpdoc-stats element to the document.

appendPhpdocStatsElement(\DOMDocument $document) : \DOMDocument

Arguments

$document

\DOMDocument

Response

\DOMDocument

Appends a stat fragment.

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

Arguments

$document

\DOMDocument

$date

string

Response

\DOMDocument

Checks if there is a space in the path.

checkForSpacesInPath(string $path) : void
inherited
Throws
\InvalidArgumentException

if path contains a space.

Arguments

$path

string

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

checkRequirements() : void
inherited

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.

Get number of deprecated elements.

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

Arguments

Response

integer

Retrieves the destination location for this artifact.

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

Arguments

Response

string

Get number of errors.

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

Arguments

Response

integer

Get number of files.

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

Arguments

Response

integer

Get number of markers.

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

Arguments

Response

integer

Returns an instance of the object responsible for translating content.

getTranslator() : \phpDocumentor\Translator\Translator
inherited

Save the checkstyle report to the artifact

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

Arguments

$artifact

string

Target name for the report

$document

\DOMDocument

The actual xml document being saved

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

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

Arguments

Abstract definition of the transformation method.

transform(\phpDocumentor\Descriptor\ProjectDescriptor $project, \phpDocumentor\Transformer\Transformation $transformation) : void
inherited abstract

Arguments

$project

\phpDocumentor\Descriptor\ProjectDescriptor

Document containing the structure.

$transformation

\phpDocumentor\Transformer\Transformation

Transformation to execute.

Properties

translator

translator : \phpDocumentor\Translator\Translator
inherited