PHP Class SebastianBergmann\PHPCPD\CodeCloneMap

Inheritance: implements Countable, implements Iterator
Afficher le fichier Open project: sebastianbergmann/phpcpd Class Usage Examples

Protected Properties

Свойство Type Description
$clones The clones in the clone map
$clonesById The clones in the clone map, stored by ID
$numDuplicateLines Number of duplicate lines in the clone map
$numLines Number of lines analyzed
$position Current position while iterating the clone map

Méthodes publiques

Méthode Description
addClone ( CodeClone $clone ) Adds a clone to the map.
count ( ) Returns the number of clones stored in this map.
current ( ) : CodeClone Returns the current element.
getClones ( ) : CodeClone[] Returns the clones stored in this map.
getNumLines ( ) : integer Returns the number of lines analyzed.
getPercentage ( ) : string Returns the percentage of duplicated code lines in the project.
key ( ) : integer Returns the key of the current element.
next ( ) Moves forward to next element.
rewind ( ) Rewinds the Iterator to the first element.
setNumLines ( integer $numLines ) Sets the number of physical source code lines in the project.
valid ( ) : boolean Checks if there is a current element after calls to rewind() or next().

Method Details

addClone() public méthode

Adds a clone to the map.
public addClone ( CodeClone $clone )
$clone CodeClone

count() public méthode

Returns the number of clones stored in this map.
public count ( )

current() public méthode

Returns the current element.
public current ( ) : CodeClone
Résultat CodeClone

getClones() public méthode

Returns the clones stored in this map.
public getClones ( ) : CodeClone[]
Résultat CodeClone[]

getNumLines() public méthode

Returns the number of lines analyzed.
public getNumLines ( ) : integer
Résultat integer

getPercentage() public méthode

Returns the percentage of duplicated code lines in the project.
public getPercentage ( ) : string
Résultat string

key() public méthode

Returns the key of the current element.
public key ( ) : integer
Résultat integer

next() public méthode

Moves forward to next element.
public next ( )

rewind() public méthode

Rewinds the Iterator to the first element.
public rewind ( )

setNumLines() public méthode

Sets the number of physical source code lines in the project.
public setNumLines ( integer $numLines )
$numLines integer

valid() public méthode

Checks if there is a current element after calls to rewind() or next().
public valid ( ) : boolean
Résultat boolean

Property Details

$clones protected_oe property

The clones in the clone map
protected $clones

$clonesById protected_oe property

The clones in the clone map, stored by ID
protected $clonesById

$numDuplicateLines protected_oe property

Number of duplicate lines in the clone map
protected $numDuplicateLines

$numLines protected_oe property

Number of lines analyzed
protected $numLines

$position protected_oe property

Current position while iterating the clone map
protected $position