PHP Класс SebastianBergmann\PHPCPD\CodeCloneMap

Автор: Sebastian Bergmann ([email protected])
Наследование: implements Countable, implements Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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().

Описание методов

addClone() публичный Метод

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

count() публичный Метод

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

current() публичный Метод

Returns the current element.
public current ( ) : CodeClone
Результат CodeClone

getClones() публичный Метод

Returns the clones stored in this map.
public getClones ( ) : CodeClone[]
Результат CodeClone[]

getNumLines() публичный Метод

Returns the number of lines analyzed.
public getNumLines ( ) : integer
Результат integer

getPercentage() публичный Метод

Returns the percentage of duplicated code lines in the project.
public getPercentage ( ) : string
Результат string

key() публичный Метод

Returns the key of the current element.
public key ( ) : integer
Результат integer

next() публичный Метод

Moves forward to next element.
public next ( )

rewind() публичный Метод

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

setNumLines() публичный Метод

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

valid() публичный Метод

Checks if there is a current element after calls to rewind() or next().
public valid ( ) : boolean
Результат boolean

Описание свойств

$clones защищенное свойство

The clones in the clone map
protected $clones

$clonesById защищенное свойство

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

$numDuplicateLines защищенное свойство

Number of duplicate lines in the clone map
protected $numDuplicateLines

$numLines защищенное свойство

Number of lines analyzed
protected $numLines

$position защищенное свойство

Current position while iterating the clone map
protected $position