Skip to content

Commit

Permalink
Remove @psalm-var mixed annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Jan 9, 2024
1 parent d85acfb commit a5e1dbb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/Builder/CompositeExpressionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function __construct(private QueryBuilderInterface $queryBuilder)
*/
public function build(ExpressionInterface $expression, array &$params = []): string
{
/** @psalm-var mixed $value */
$value = $expression->getValue();

if (empty($value)) {
Expand Down Expand Up @@ -74,24 +73,18 @@ public function build(ExpressionInterface $expression, array &$params = []): str
*/
private function buildPlaceholders(CompositeExpression $expression, array &$params): array
{
$placeholders = [];

/** @psalm-var mixed $value */
$value = $expression->getNormalizedValue();

if (!is_iterable($value)) {
return $placeholders;
return [];
}

$placeholders = [];
$columns = $expression->getColumns();

/**
* @psalm-var int|string $columnName
* @psalm-var mixed $item
*/
/** @psalm-var int|string $columnName */
foreach ($value as $columnName => $item) {
if (isset($columns[$columnName])) {
/** @psalm-var mixed $item */
$item = $columns[$columnName]->dbTypecast($item);
}

Expand Down

0 comments on commit a5e1dbb

Please sign in to comment.