class Linter (View source)

The linter itself.

Methods

static array
getLines(UtfString $str)

Gets the starting position of each line.

static array
findLineNumberAndColumn(array $lines, int $pos)

Computes the number of the line and column given an absolute position.

static array
lint(string $query)

Runs the linting process.

Details

static array getLines(UtfString $str)

Gets the starting position of each line.

Parameters

UtfString $str

String to be analyzed.

Return Value

array

static array findLineNumberAndColumn(array $lines, int $pos)

Computes the number of the line and column given an absolute position.

Parameters

array $lines

The starting position of each line.

int $pos

The absolute position

Return Value

array

static array lint(string $query)

Runs the linting process.

Parameters

string $query

The query to be checked.

Return Value

array