Lines Matching refs:code
102 * @param string $code Source code of the file
104 public function getStartColumn(string $code): int { argument
109 return $this->toColumn($code, $this->attributes['startFilePos']);
115 * @param string $code Source code of the file
117 public function getEndColumn(string $code): int { argument
122 return $this->toColumn($code, $this->attributes['endFilePos']);
128 * @param string $code Source code associated with the error, for calculation of the columns
132 public function getMessageWithColumnInfo(string $code): string { argument
135 $this->getStartLine(), $this->getStartColumn($code),
136 $this->getEndLine(), $this->getEndColumn($code)
143 * @param string $code Source code that $pos indexes into
148 private function toColumn(string $code, int $pos): int { argument
149 if ($pos > strlen($code)) {
153 $lineStartPos = strrpos($code, "\n", $pos - strlen($code));