PHP Class PMA\libraries\Linter

Mostra file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Methods

Method Description
findLineNumberAndColumn ( array $lines, integer $pos ) : array Computes the number of the line and column given an absolute position.
getLines ( string $str ) : array Gets the starting position of each line.
lint ( string $query ) : array Runs the linting process.

Method Details

findLineNumberAndColumn() public static method

Computes the number of the line and column given an absolute position.
public static findLineNumberAndColumn ( array $lines, integer $pos ) : array
$lines array The starting position of each line.
$pos integer The absolute position
return array

getLines() public static method

Gets the starting position of each line.
public static getLines ( string $str ) : array
$str string String to be analyzed.
return array

lint() public static method

Runs the linting process.
public static lint ( string $query ) : array
$query string The query to be checked.
return array