mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix comparison of strings with multiple newlines
This commit is contained in:
parent
01d6caf6a2
commit
9ded84fd5b
@ -19,7 +19,7 @@ class TLiteralString extends TString
|
||||
*/
|
||||
public function getKey()
|
||||
{
|
||||
return 'string(' . $this->value . ')';
|
||||
return $this->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -488,6 +488,21 @@ class ValueTest extends TestCase
|
||||
}
|
||||
}',
|
||||
],
|
||||
'newlineIssue' => [
|
||||
'<?php
|
||||
$a = "foo";
|
||||
$b = "
|
||||
|
||||
|
||||
";
|
||||
|
||||
$c = $a;
|
||||
if (rand(0, 1)) {
|
||||
$c = $b;
|
||||
}
|
||||
|
||||
if ($c === $b) {}'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user