Skip to content

Commit

Permalink
removed invalid assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Nov 23, 2020
1 parent 5f71b4f commit 717e3d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Utils/Json/SequentialJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function loadArray() : void

$result = \json_decode(json: $this->string, associative: false, flags: self::FLAGS);

if (!\is_array($this->data)) {
if (!\is_array($result)) {
throw new \RuntimeException('Required JSON list, got scalar or object.');
}

Expand Down
1 change: 0 additions & 1 deletion tests/Utils/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public function testDirectMapJson() : void
$instance = \Infinityloop\Utils\Json\MapJson::fromString('{"name":"Rosta"}');

self::assertSame('{"name":"Rosta"}', $instance->toString());
self::assertInstanceOf(\stdClass::class, $instance);
self::assertSame('Rosta', $instance->name);
}

Expand Down

0 comments on commit 717e3d3

Please sign in to comment.