Skip to content

Commit

Permalink
Merge pull request #108 from stephpy/master
Browse files Browse the repository at this point in the history
Since php 8.1, 1st argument of rtrim must not be nullable
  • Loading branch information
stephpy authored Jan 18, 2022
2 parents 7799d7a + ca226c8 commit 6370127
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Json/JsonContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(JsonInspector $jsonInspector, $jsonSchemaBaseUrl = n
{
$this->jsonInspector = $jsonInspector;
$this->asserter = new asserter();
$this->jsonSchemaBaseUrl = rtrim($jsonSchemaBaseUrl, '/');
$this->jsonSchemaBaseUrl = rtrim((string) $jsonSchemaBaseUrl, '/');
}

/**
Expand Down Expand Up @@ -229,9 +229,9 @@ public function theJsonPathExpressionShouldNotHaveResult($pathExpression)
{
$json = $this->jsonInspector->searchJsonPath($pathExpression);
if (is_array($json) && empty($json)) {
$this->asserter->variable($json)->isEqualTo([]);
$this->asserter->variable($json)->isEqualTo([]);
} else {
$this->asserter->variable($json)->isNull();
$this->asserter->variable($json)->isNull();
}
}

Expand Down

0 comments on commit 6370127

Please sign in to comment.