Skip to content

Commit

Permalink
Code Style
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftCreatR committed Jun 1, 2024
1 parent bf3b432 commit 25c7c11
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 61 deletions.
4 changes: 2 additions & 2 deletions src/Filters/QueryMatchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class QueryMatchFilter extends AbstractFilter

public function filter($collection): array
{
\preg_match('/^'.static::MATCH_QUERY_OPERATORS.'$/x', $this->token->value, $matches);
\preg_match('/^' . static::MATCH_QUERY_OPERATORS . '$/x', $this->token->value, $matches);

if (!isset($matches[1])) {
throw new RuntimeException('Malformed filter query');
Expand Down Expand Up @@ -63,7 +63,7 @@ public function filter($collection): array
$value1 = null;
if (AccessHelper::keyExists($value, $key, $this->magicIsAllowed)) {
$value1 = AccessHelper::getValue($value, $key, $this->magicIsAllowed);
} elseif (str_contains($key, '.')) {
} elseif (\str_contains($key, '.')) {
$value1 = (new JSONPath($value))->find($key)->getData()[0] ?? '';
}
if ($value1) {
Expand Down
Loading

0 comments on commit 25c7c11

Please sign in to comment.