From add5e0eeb49ae517658e083dd9d666d904fb4190 Mon Sep 17 00:00:00 2001 From: Matej Szendi Date: Thu, 16 Dec 2021 21:23:13 +0100 Subject: [PATCH] Fix $predicate type hint in where methods Signed-off-by: Matej Szendi --- src/Sql/Delete.php | 3 ++- src/Sql/Select.php | 5 +++-- src/Sql/Update.php | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Sql/Delete.php b/src/Sql/Delete.php index ccd5aff8..cd83070e 100644 --- a/src/Sql/Delete.php +++ b/src/Sql/Delete.php @@ -6,6 +6,7 @@ use Laminas\Db\Adapter\Driver\DriverInterface; use Laminas\Db\Adapter\ParameterContainer; use Laminas\Db\Adapter\Platform\PlatformInterface; +use Laminas\Db\Sql\Predicate\PredicateInterface; use function array_key_exists; use function sprintf; @@ -86,7 +87,7 @@ public function getRawState($key = null) /** * Create where clause * - * @param Where|Closure|string|array $predicate + * @param Where|Closure|string|array|PredicateInterface $predicate * @param string $combination One of the OP_* constants from Predicate\PredicateSet * @return $this Provides a fluent interface */ diff --git a/src/Sql/Select.php b/src/Sql/Select.php index 0672eab4..c588a926 100644 --- a/src/Sql/Select.php +++ b/src/Sql/Select.php @@ -6,6 +6,7 @@ use Laminas\Db\Adapter\Driver\DriverInterface; use Laminas\Db\Adapter\ParameterContainer; use Laminas\Db\Adapter\Platform\PlatformInterface; +use Laminas\Db\Sql\Predicate\PredicateInterface; use function array_key_exists; use function count; @@ -268,7 +269,7 @@ public function join($name, $on, $columns = self::SQL_STAR, $type = self::JOIN_I /** * Create where clause * - * @param Where|Closure|string|array|Predicate\PredicateInterface $predicate + * @param Where|Closure|string|array|PredicateInterface $predicate * @param string $combination One of the OP_* constants from Predicate\PredicateSet * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException @@ -302,7 +303,7 @@ public function group($group) /** * Create having clause * - * @param Where|Having|Closure|string|array $predicate + * @param Having|Closure|string|array|PredicateInterface $predicate * @param string $combination One of the OP_* constants from Predicate\PredicateSet * @return $this Provides a fluent interface */ diff --git a/src/Sql/Update.php b/src/Sql/Update.php index 43b421fd..8c13fee7 100644 --- a/src/Sql/Update.php +++ b/src/Sql/Update.php @@ -7,6 +7,7 @@ use Laminas\Db\Adapter\Driver\Pdo\Pdo; use Laminas\Db\Adapter\ParameterContainer; use Laminas\Db\Adapter\Platform\PlatformInterface; +use Laminas\Db\Sql\Predicate\PredicateInterface; use Laminas\Stdlib\PriorityList; use function array_key_exists; @@ -115,7 +116,7 @@ public function set(array $values, $flag = self::VALUES_SET) /** * Create where clause * - * @param Where|Closure|string|array $predicate + * @param Where|Closure|string|array|PredicateInterface $predicate * @param string $combination One of the OP_* constants from Predicate\PredicateSet * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException