Documentation

CodeLocation
in package
uses ImmutableNonCloneableTrait

Tags
psalm-immutable

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

FUNCTION_PARAM_TYPE

public mixed FUNCTION_PARAM_TYPE = 2

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

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_line_number

protected int|null $docblock_line_number = null

$docblock_start_line_number

private int|null $docblock_start_line_number = null

$have_recalculated

private bool $have_recalculated = false

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

getEndColumn()

public getEndColumn() : int
Return values
int

getEndLineNumber()

public getEndLineNumber() : int
Return values
int

getHash()

public getHash() : string
Return values
string

getLineNumber()

public getLineNumber() : int
Return values
int

getSelectedText()

public getSelectedText() : string
Return values
string

getSelectionBounds()

public getSelectionBounds() : array{0: int, 1: int}
Return values
array{0: int, 1: int}

getShortSummary()

public getShortSummary() : string
Return values
string

getSnippet()

public getSnippet() : string
Return values
string

getSnippetBounds()

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
psalm-suppress

PossiblyUnusedMethod Part of public API

Return values
static

calculateRealLocation()

private calculateRealLocation() : void
Tags
psalm-external-mutation-free
psalm-suppress

InaccessibleProperty Mainly used for caching


        
On this page

Search results