| Methods |
public
|
__construct(
string $message,
string $file,
?int $line = null,
bool|Throwable $canBeIgnored = true,
?string $filePath = null,
?string $traitFilePath = null,
?string $tip = null,
?int $nodeLine = null,
class-string<Node>|null $nodeType = null,
?string $identifier = null,
mixed[] $metadata = [],
?FixedErrorDiff $fixedErrorDiff = null,
array<string, string> $traitContexts = [],
)
|
#
|
public
|
getMessage(): string
|
#
|
public
|
getFile(): string
|
#
|
public
|
getFilePath(): string
|
#
|
public
|
changeFilePath(string $newFilePath): self
|
#
|
public
|
changeTraitFilePath(string $newFilePath): self
|
#
|
public
|
removeTraitContext(): self
|
#
|
public
|
getTraitFilePath(): ?string
|
#
|
public
|
getTraitContexts(): array<string, string>
Using-class contexts of an error deduplicated directly into the trait
(see ConstantConditionInTraitRule): the file path of each class in whose
context the error was reported => the "trait.php (in context of class X)"
file string it was reported with there. An ignoreErrors path pointing at
one of these files accounts for that class's context only.
Using-class contexts of an error deduplicated directly into the trait
(see ConstantConditionInTraitRule): the file path of each class in whose
context the error was reported => the "trait.php (in context of class X)"
file string it was reported with there. An ignoreErrors path pointing at
one of these files accounts for that class's context only.
|
#
|
public
|
withTraitContexts(array<string, string> $traitContexts): self
|
#
|
public
|
asReportedInTraitContext(string $contextFilePath): self
Rebuilds the per-context error this deduplicated trait error was merged
from, for the given using-class file path.
Rebuilds the per-context error this deduplicated trait error was merged
from, for the given using-class file path.
|
#
|
public
|
transformPaths(callable(string): string $transformPath): self
Rewrites every path this error carries, for portable storage in the result cache. The caller
owns the transformation - see ResultCachePathTransformer, which passes relativizePath() when
storing and absolutizePath() when loading - so both directions apply exactly the same rules
to the error's paths as to the cache's file-path keys.
Rewrites every path this error carries, for portable storage in the result cache. The caller
owns the transformation - see ResultCachePathTransformer, which passes relativizePath() when
storing and absolutizePath() when loading - so both directions apply exactly the same rules
to the error's paths as to the cache's file-path keys.
|
#
|
public
|
getLine(): ?int
|
#
|
public
|
canBeIgnored(): bool
|
#
|
public
|
hasNonIgnorableException(): bool
|
#
|
public
|
getTip(): ?string
|
#
|
public
|
withoutTip(): self
|
#
|
public
|
doNotIgnore(): self
|
#
|
public
|
withIdentifier(string $identifier): self
|
#
|
public
|
withMetadata(mixed[] $metadata): self
|
#
|
public
|
getNodeLine(): ?int
|
#
|
public
|
getNodeType(): class-string<Node>|null
|
#
|
public
|
getIdentifier(): ?string
|
#
|
public
|
getMetadata(): mixed[]
|
#
|
public
|
jsonSerialize(): mixed
|
#
|
public
static
|
decode(mixed[] $json): self
|
#
|
public
static
|
__set_state(mixed[] $properties): self
|
#
|
public
static
|
validateIdentifier(string $identifier): bool
|
#
|