1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Use resolution that works in multithreaded mode

This commit is contained in:
Matt Brown 2020-11-17 17:24:46 -05:00 committed by Daniil Gentili
parent a4b56c9292
commit ff4959f308
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 5 additions and 3 deletions

View File

@ -379,7 +379,7 @@ class CodeLocation
public function getHash(): string
{
return (string) $this->file_start;
return $this->file_name . ' ' . $this->raw_file_start . $this->raw_file_end;
}
public function getShortSummary() : string

View File

@ -106,7 +106,8 @@ class TaintFlowGraph extends DataFlowGraph
}
if ($source->code_location
&& $previous_source->code_location === $source->code_location
&& $previous_source->code_location
&& $previous_source->code_location->getHash() === $source->code_location->getHash()
&& $previous_source->previous
) {
return $this->getPredecessorPath($previous_source->previous) . ' -> ' . $source_descriptor;
@ -136,7 +137,8 @@ class TaintFlowGraph extends DataFlowGraph
}
if ($sink->code_location
&& $next_sink->code_location === $sink->code_location
&& $next_sink->code_location
&& $next_sink->code_location->getHash() === $sink->code_location->getHash()
&& $next_sink->previous
) {
return $sink_descriptor . ' -> ' . $this->getSuccessorPath($next_sink->previous);