abstract class CheckAbstract

Lint check abstract class. All checks must inherit from this abstract

Properties

protected $template Template context
protected $fileName Template filename
protected $messages Message container

Methods

setFileName(string $name)

Set template filename

loadTemplate(string $template)

Handle the loading of the template

string
getFileName()

Return filename

string
asString()

Return template as a string

array
asArray()

Return template as an array of lines

setMessage($type, $message)

No description

array
getMessages()

Return messages, if it exists

boolean
execute()

Execute check, must return a boolean and set a message on failure

Details

at line 35
CheckAbstract setFileName(string $name)

Set template filename

Parameters

string $name

Return Value

CheckAbstract

at line 46
CheckAbstract loadTemplate(string $template)

Handle the loading of the template

Parameters

string $template

Return Value

CheckAbstract

at line 56
protected string getFileName()

Return filename

Return Value

string

at line 65
protected string asString()

Return template as a string

Return Value

string

at line 74
protected array asArray()

Return template as an array of lines

Return Value

array

at line 79
protected setMessage($type, $message)

Parameters

$type
$message

at line 92
array getMessages()

Return messages, if it exists

Return Value

array of Ceo\Lint\Twig\Message or NULL

at line 103
abstract boolean execute()

Execute check, must return a boolean and set a message on failure

Return Value

boolean TRUE for success, FALSE for failure