CodeLocation
in package
uses
ImmutableNonCloneableTrait
Tags
Table of Contents
Constants
- CATCH_VAR = 6
- FUNCTION_PARAM_TYPE = 2
- FUNCTION_PARAM_VAR = 5
- FUNCTION_PHPDOC_METHOD = 7
- FUNCTION_PHPDOC_PARAM_TYPE = 4
- FUNCTION_PHPDOC_RETURN_TYPE = 3
- FUNCTION_RETURN_TYPE = 1
- VAR_TYPE = 0
- PROPERTY_KEYS_FOR_UNSERIALIZE = ['file_path' => 'file_path', 'file_name' => 'file_name', 'raw_line_number' => 'raw_line_number', "\x00" . self::class . "\x00" . 'end_line_number' => 'end_line_number', 'raw_file_start' => 'raw_file_start', 'raw_file_end' => 'raw_file_end', "\x00*\x00" . 'file_start' => 'file_start', "\x00*\x00" . 'file_end' => 'file_end', "\x00*\x00" . 'single_line' => 'single_line', "\x00*\x00" . 'preview_start' => 'preview_start', "\x00" . self::class . "\x00" . 'preview_end' => 'preview_end', "\x00" . self::class . "\x00" . 'selection_start' => 'selection_start', "\x00" . self::class . "\x00" . 'selection_end' => 'selection_end', "\x00" . self::class . "\x00" . 'column_from' => 'column_from', "\x00" . self::class . "\x00" . 'column_to' => 'column_to', "\x00" . self::class . "\x00" . 'snippet' => 'snippet', "\x00" . self::class . "\x00" . 'text' => 'text', 'docblock_start' => 'docblock_start', "\x00" . self::class . "\x00" . 'docblock_start_line_number' => 'docblock_start_line_number', "\x00*\x00" . 'docblock_line_number' => 'docblock_line_number', "\x00" . self::class . "\x00" . 'regex_type' => 'regex_type', "\x00" . self::class . "\x00" . 'have_recalculated' => 'have_recalculated', 'previous_location' => 'previous_location']
Properties
- $docblock_start : int|null
- $file_name : string
- $file_path : string
- $previous_location : CodeLocation|null
- $raw_file_end : int
- $raw_file_start : int
- $raw_line_number : int
- $docblock_line_number : int|null
- $file_end : int
- $file_start : int
- $preview_start : int
- $single_line : bool
- $column_from : int
- $column_to : int
- $docblock_start_line_number : int|null
- $end_line_number : int
- $have_recalculated : bool
- $preview_end : int
- $regex_type : int|null
- $selection_end : int
- $selection_start : int
- $snippet : string
- $text : string|null
Methods
- __construct() : mixed
- __unserialize() : void
- Suppresses memory usage when unserializing objects.
- getColumn() : int
- getEndColumn() : int
- getEndLineNumber() : int
- getHash() : string
- getLineNumber() : int
- getSelectedText() : string
- getSelectionBounds() : array{0: int, 1: int}
- getShortSummary() : string
- getSnippet() : string
- getSnippetBounds() : array{0: int, 1: int}
- setCommentLine() : static
- __clone() : mixed
- calculateRealLocation() : void
Constants
CATCH_VAR
public
mixed
CATCH_VAR
= 6
FUNCTION_PARAM_TYPE
public
mixed
FUNCTION_PARAM_TYPE
= 2
FUNCTION_PARAM_VAR
public
mixed
FUNCTION_PARAM_VAR
= 5
FUNCTION_PHPDOC_METHOD
public
mixed
FUNCTION_PHPDOC_METHOD
= 7
FUNCTION_PHPDOC_PARAM_TYPE
public
mixed
FUNCTION_PHPDOC_PARAM_TYPE
= 4
FUNCTION_PHPDOC_RETURN_TYPE
public
mixed
FUNCTION_PHPDOC_RETURN_TYPE
= 3
FUNCTION_RETURN_TYPE
public
mixed
FUNCTION_RETURN_TYPE
= 1
VAR_TYPE
public
mixed
VAR_TYPE
= 0
PROPERTY_KEYS_FOR_UNSERIALIZE
private
mixed
PROPERTY_KEYS_FOR_UNSERIALIZE
= ['file_path' => 'file_path', 'file_name' => 'file_name', 'raw_line_number' => 'raw_line_number', "\x00" . self::class . "\x00" . 'end_line_number' => 'end_line_number', 'raw_file_start' => 'raw_file_start', 'raw_file_end' => 'raw_file_end', "\x00*\x00" . 'file_start' => 'file_start', "\x00*\x00" . 'file_end' => 'file_end', "\x00*\x00" . 'single_line' => 'single_line', "\x00*\x00" . 'preview_start' => 'preview_start', "\x00" . self::class . "\x00" . 'preview_end' => 'preview_end', "\x00" . self::class . "\x00" . 'selection_start' => 'selection_start', "\x00" . self::class . "\x00" . 'selection_end' => 'selection_end', "\x00" . self::class . "\x00" . 'column_from' => 'column_from', "\x00" . self::class . "\x00" . 'column_to' => 'column_to', "\x00" . self::class . "\x00" . 'snippet' => 'snippet', "\x00" . self::class . "\x00" . 'text' => 'text', 'docblock_start' => 'docblock_start', "\x00" . self::class . "\x00" . 'docblock_start_line_number' => 'docblock_start_line_number', "\x00*\x00" . 'docblock_line_number' => 'docblock_line_number', "\x00" . self::class . "\x00" . 'regex_type' => 'regex_type', "\x00" . self::class . "\x00" . 'have_recalculated' => 'have_recalculated', 'previous_location' => 'previous_location']
Properties
$docblock_start
public
int|null
$docblock_start
= null
$file_name
public
string
$file_name
$file_path
public
string
$file_path
$previous_location
public
CodeLocation|null
$previous_location
= null
$raw_file_end
public
int
$raw_file_end
$raw_file_start
public
int
$raw_file_start
$raw_line_number
public
int
$raw_line_number
$docblock_line_number
protected
int|null
$docblock_line_number
= null
$file_end
protected
int
$file_end
$file_start
protected
int
$file_start
$preview_start
protected
int
$preview_start
$single_line
protected
bool
$single_line
$column_from
private
int
$column_from
= -1
$column_to
private
int
$column_to
= -1
$docblock_start_line_number
private
int|null
$docblock_start_line_number
= null
$end_line_number
private
int
$end_line_number
= -1
$have_recalculated
private
bool
$have_recalculated
= false
$preview_end
private
int
$preview_end
= -1
$regex_type
private
int|null
$regex_type
= null
$selection_end
private
int
$selection_end
= -1
$selection_start
private
int
$selection_start
= -1
$snippet
private
string
$snippet
= ''
$text
private
string|null
$text
= null
Methods
__construct()
public
__construct(FileSource $file_source, Node $stmt[, CodeLocation|null $previous_location = null ][, bool $single_line = false ][, int|null $regex_type = null ][, string|null $selected_text = null ][, int|null $comment_line = null ]) : mixed
Parameters
- $file_source : FileSource
- $stmt : Node
- $previous_location : CodeLocation|null = null
- $single_line : bool = false
- $regex_type : int|null = null
- $selected_text : string|null = null
- $comment_line : int|null = null
__unserialize()
Suppresses memory usage when unserializing objects.
public
__unserialize(array<string|int, mixed> $properties) : void
Parameters
- $properties : array<string|int, mixed>
Tags
getColumn()
public
getColumn() : int
Return values
intgetEndColumn()
public
getEndColumn() : int
Return values
intgetEndLineNumber()
public
getEndLineNumber() : int
Return values
intgetHash()
public
getHash() : string
Return values
stringgetLineNumber()
public
getLineNumber() : int
Return values
intgetSelectedText()
public
getSelectedText() : string
Return values
stringgetSelectionBounds()
public
getSelectionBounds() : array{0: int, 1: int}
Return values
array{0: int, 1: int}getShortSummary()
public
getShortSummary() : string
Return values
stringgetSnippet()
public
getSnippet() : string
Return values
stringgetSnippetBounds()
public
getSnippetBounds() : array{0: int, 1: int}
Return values
array{0: int, 1: int}setCommentLine()
public
setCommentLine(int|null $line) : static
Parameters
- $line : int|null
Tags
Return values
static__clone()
private
__clone() : mixed
calculateRealLocation()
private
calculateRealLocation() : void