From 95b4bf267504ebea7b58c57cd915e2177ba293a5 Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Fri, 10 Jul 2020 13:14:09 +0200 Subject: [PATCH] Allow optional space in QueryParameterParser between operand and keyword --- src/Storage/QueryParameterParser.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Storage/QueryParameterParser.php b/src/Storage/QueryParameterParser.php index d9979e001..dc5fc757a 100644 --- a/src/Storage/QueryParameterParser.php +++ b/src/Storage/QueryParameterParser.php @@ -46,19 +46,19 @@ public function setupDefaults(): void $word = "[\p{L}\p{N}_]+"; // @codingStandardsIgnoreStart - $this->addValueMatcher("<(${word})", [ + $this->addValueMatcher("<\s?(${word})", [ 'value' => '$1', 'operator' => 'lt', ]); - $this->addValueMatcher("<=(${word})", [ + $this->addValueMatcher("<=\s?(${word})", [ 'value' => '$1', 'operator' => 'lte', ]); - $this->addValueMatcher(">=(${word})", [ + $this->addValueMatcher(">=\s?(${word})", [ 'value' => '$1', 'operator' => 'gte', ]); - $this->addValueMatcher(">(${word})", [ + $this->addValueMatcher(">\s?(${word})", [ 'value' => '$1', 'operator' => 'gt', ]); @@ -66,11 +66,11 @@ public function setupDefaults(): void 'value' => '', 'operator' => 'isNotNull', ]); - $this->addValueMatcher("!(${word})", [ + $this->addValueMatcher("!\s?(${word})", [ 'value' => '$1', 'operator' => 'neq', ]); - $this->addValueMatcher('!\[([\p{L}\p{N} ,]+)\]', [ + $this->addValueMatcher('!\s?\[([\p{L}\p{N} ,]+)\]', [ 'value' => function ($val) { return explode(',', $val); },