diff --git a/src/Classes/EconomicQueryBuilder.php b/src/Classes/EconomicQueryBuilder.php index a53932a..3edf64c 100644 --- a/src/Classes/EconomicQueryBuilder.php +++ b/src/Classes/EconomicQueryBuilder.php @@ -42,7 +42,7 @@ protected function getEndpoint(): string return $this->endpoint; } - public function where(int|string|Closure $propertyName, ?string $operatorOrValue = null, mixed $value = null): static + public function where(int|string|Closure $propertyName, mixed $operatorOrValue = null, mixed $value = null): static { if (! isset($this->filter)) { $this->filter = new EconomicQueryFilterBuilder(EconomicQueryFilterBuilder::FILTER_RELATION_AND); @@ -53,7 +53,7 @@ public function where(int|string|Closure $propertyName, ?string $operatorOrValue return $this; } - public function orWhere(int|string|Closure $propertyName, ?string $operatorOrValue = null, mixed $value = null): static + public function orWhere(int|string|Closure $propertyName, mixed $operatorOrValue = null, mixed $value = null): static { if (! isset($this->filter)) { $this->filter = new EconomicQueryFilterBuilder(EconomicQueryFilterBuilder::FILTER_RELATION_OR); diff --git a/src/Classes/EconomicQueryFilterBuilder.php b/src/Classes/EconomicQueryFilterBuilder.php index 5d6d556..2f3f5a1 100644 --- a/src/Classes/EconomicQueryFilterBuilder.php +++ b/src/Classes/EconomicQueryFilterBuilder.php @@ -110,7 +110,7 @@ protected function whereNested(Closure $closure) return $this; } - public function where(int|string|Closure $propertyName, ?string $operatorOrValue = null, mixed $value = null): static + public function where(int|string|Closure $propertyName, mixed $operatorOrValue = null, mixed $value = null): static { if ($propertyName instanceof Closure) { return $this->whereNested($propertyName); @@ -144,7 +144,7 @@ public function where(int|string|Closure $propertyName, ?string $operatorOrValue return $this; } - public function orWhere(int|string|Closure $propertyName, ?string $operatorOrValue = null, mixed $value = null): static + public function orWhere(int|string|Closure $propertyName, mixed $operatorOrValue = null, mixed $value = null): static { $instance = new static(static::FILTER_RELATION_OR); diff --git a/src/Classes/EconomicRelatedResource.php b/src/Classes/EconomicRelatedResource.php index a2688e4..43f227e 100644 --- a/src/Classes/EconomicRelatedResource.php +++ b/src/Classes/EconomicRelatedResource.php @@ -39,7 +39,7 @@ public function find(string|int $reference): ?Resource /** * @return EconomicQueryBuilder */ - public function where(int|string $propertyName, string $operatorOrValue, mixed $value = null): EconomicQueryBuilder + public function where(int|string $propertyName, mixed $operatorOrValue = null, mixed $value = null): EconomicQueryBuilder { return (new EconomicQueryBuilder($this->resourceClass))->setEndpoint($this->endpointCollection->getEndpoint($this->references))->where($propertyName, $operatorOrValue, $value); diff --git a/src/Traits/Resources/GetCollectionable.php b/src/Traits/Resources/GetCollectionable.php index a402a23..fa20276 100644 --- a/src/Traits/Resources/GetCollectionable.php +++ b/src/Traits/Resources/GetCollectionable.php @@ -15,7 +15,7 @@ trait GetCollectionable /** * @return EconomicQueryBuilder */ - public static function where(int|string $propertyName, string $operatorOrValue, mixed $value = null): EconomicQueryBuilder + public static function where(int|string $propertyName, mixed $operatorOrValue = null, mixed $value = null): EconomicQueryBuilder { return (new EconomicQueryBuilder(static::class))->where($propertyName, $operatorOrValue, $value); }