Skip to content
Permalink
Browse files

Fix case insensitive string comparison

  • Loading branch information...
muglug committed May 28, 2019
1 parent b19d256 commit 201030928de5001941a59eddce77b9d326bc1880
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/Psalm/Type/Atomic.php
  2. +5 −0 tests/ValueTest.php
@@ -712,7 +712,7 @@ public function queueClassLikesForScanning(
*/
public function shallowEquals(Atomic $other)
{
return strtolower($this->getKey()) === strtolower($other->getKey())
return $this->getKey() === $other->getKey()
&& !($other instanceof ObjectLike && $this instanceof ObjectLike);
}
@@ -842,6 +842,11 @@ public static function bar(string $j) : void {}
A::bar("d");',
'error_message' => 'InvalidArgument'
],
'casedComparison' => [
'<?php
if ("C" === "c") {}',
'error_message' => 'TypeDoesNotContainType',
]
];
}
}

0 comments on commit 2010309

Please sign in to comment.
You can’t perform that action at this time.