Skip to content

Commit ead749c

Browse files
committed
[JsonPath] Remove unused "nothing" property from JsonCrawler
1 parent e659ffd commit ead749c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

JsonCrawler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
*/
3333
final class JsonCrawler implements JsonCrawlerInterface
3434
{
35-
private static \stdClass $nothing;
36-
3735
private const RFC9535_FUNCTIONS = [
3836
'length' => true,
3937
'count' => true,
@@ -833,8 +831,8 @@ private function compare(mixed $left, mixed $right, string $operator): bool
833831

834832
private function compareEquality(mixed $left, mixed $right): bool
835833
{
836-
$leftIsNothing = $left === Nothing::Nothing;
837-
$rightIsNothing = $right === Nothing::Nothing;
834+
$leftIsNothing = Nothing::Nothing === $left;
835+
$rightIsNothing = Nothing::Nothing === $right;
838836

839837
if (
840838
$leftIsNothing && $rightIsNothing

0 commit comments

Comments
 (0)