function Error::getStartColumn
Gets the start column (1-based) into the line where the error started.
Parameters
string $code Source code of the file:
1 call to Error::getStartColumn()
- Error::getMessageWithColumnInfo in vendor/
nikic/ php-parser/ lib/ PhpParser/ Error.php - Formats message including line and column information.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Error.php, line 104
Class
Namespace
PhpParserCode
public function getStartColumn(string $code) : int {
if (!$this->hasColumnInfo()) {
throw new \RuntimeException('Error does not have column information');
}
return $this->toColumn($code, $this->attributes['startFilePos']);
}