Skip to content

Commit

Permalink
Fix $predicate type hint in where methods
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Szendi <matej.szendi@bcom.cz>
  • Loading branch information
Matej Szendi authored and Xerkus committed Feb 1, 2024
1 parent 2cc4342 commit add5e0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Sql/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down
5 changes: 3 additions & 2 deletions src/Sql/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Sql/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit add5e0e

Please sign in to comment.