From ffb33b09af75eb692550183afe4595db60f0745c Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Wed, 28 Aug 2024 09:14:16 +0200 Subject: [PATCH] Resolve error --- phpstan.neon.dist | 1 - src/Query/Grammars/ExpressionGrammar.php | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2330e1b..18b2ec1 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,5 +14,4 @@ parameters: - '#Call to an undefined method TModel of Illuminate\\Database\\Eloquent\\Model#' - '#Call to an undefined method Illuminate\\Database\\Eloquent\\Model::#' - '#Call to an undefined method Illuminate\\Database\\Eloquent\\Builder#' - - '#Call to an undefined method Staudenmeir\\LaravelAdjacencyList\\Query\\Grammars\\ExpressionGrammar::wrap\(\)#' - '#PHPDoc tag \@param for parameter \$grammar with type Illuminate\\Database\\Grammar\|Staudenmeir\\LaravelAdjacencyList\\Query\\Grammars\\ExpressionGrammar is not subtype#' diff --git a/src/Query/Grammars/ExpressionGrammar.php b/src/Query/Grammars/ExpressionGrammar.php index e9b293e..6056bae 100644 --- a/src/Query/Grammars/ExpressionGrammar.php +++ b/src/Query/Grammars/ExpressionGrammar.php @@ -109,4 +109,12 @@ public function compileCycleDetectionStopConstraint(string $column): string; * @return bool */ public function supportsUnionInRecursiveExpression(): bool; + + /** + * Wrap a value in keyword identifiers. + * + * @param \Illuminate\Contracts\Database\Query\Expression|string $value + * @return string + */ + public function wrap($value); }