PHP Класс HippoPHP\Hippo\CheckResult

Наследование: implements Countabl\Countable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$file File Which file is this check result for.
$violations Violation[] Violations held against the file.
$violationsDirty boolean Was modified since last violation retrieval?

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

Метод Описание
addViolation ( Violation $violation )
count ( ) : integer Counts how many violations are in the result.
getFile ( ) : File Returns which file is this check result for.
getMaximumViolationSeverity ( ) : integer | null
getViolations ( ) : Violation[] Return all of the violations on the file.
hasFailed ( ) : boolean Returns whether check failed.
hasSucceeded ( ) : boolean Returns whether check succeeded.
setFile ( File $file ) Sets which file is this check result for.

Приватные методы

Метод Описание
processViolationsIfDirty ( ) Resorts the violations array if it's been changed.
sortViolations ( ) Sorts the violations by line then column.

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

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

public addViolation ( Violation $violation )
$violation Violation

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

Counts how many violations are in the result.
См. также: Countable::count()
public count ( ) : integer
Результат integer

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

Returns which file is this check result for.
public getFile ( ) : File
Результат File

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

public getMaximumViolationSeverity ( ) : integer | null
Результат integer | null

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

Violations are sorted on a line/column basis.
public getViolations ( ) : Violation[]
Результат Violation[]

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

Returns whether check failed.
public hasFailed ( ) : boolean
Результат boolean

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

Returns whether check succeeded.
public hasSucceeded ( ) : boolean
Результат boolean

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

Sets which file is this check result for.
public setFile ( File $file )
$file File

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

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

Which file is this check result for.
protected File,HippoPHP\Hippo $file
Результат File

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

Violations held against the file.
protected Violation[],HippoPHP\Hippo $violations
Результат Violation[]

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

Was modified since last violation retrieval?
protected bool $violationsDirty
Результат boolean