Skip to content

Commit

Permalink
refs #943 (in /yakamara/yform repo)
Browse files Browse the repository at this point in the history
making addParam to public to use in choice filter method
  • Loading branch information
Peter Schulze committed Nov 26, 2024
1 parent 81d3713 commit f6c3a0f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/manager/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public function whereNotBetween(string $column, $from, $to): self
* Where the comma separated list column contains the given value or any of the given values.
*
* @param string $column Column with comma separated list
* @param string|int|int[] $value Single value (string or int) or array of values (ints only)
* @param string|int|array<int> $value Single value (string or int) or array of values (ints only)
* @return $this
*/
public function whereListContains(string $column, $value): self
Expand Down Expand Up @@ -497,7 +497,7 @@ public function havingNotBetween(string $column, $from, $to): self
* Where the comma separated list column contains the given value or any of the given values.
*
* @param string $column Column with comma separated list
* @param string|int|int[] $value Single value (string or int) or array of values (ints only)
* @param string|int|array<int> $value Single value (string or int) or array of values (ints only)
* @return $this
*/
public function havingListContains(string $column, $value): self
Expand Down Expand Up @@ -694,18 +694,18 @@ public function findIds(array $ids): rex_yform_manager_collection
}

/**
* @return null|T
* @return T|null
*/
public function findOne(): ?rex_yform_manager_dataset
{
$this->limit(1);

/** @var null|T */
/** @var T|null */
return rex_yform_manager_dataset::queryOne($this->getQuery(), $this->getParams(), $this->table);
}

/**
* @return null|T
* @return T|null
*/
public function findId(int $id): ?rex_yform_manager_dataset
{
Expand Down Expand Up @@ -837,7 +837,7 @@ private function normalizeValue($value)
* @param self::PARAM_* $type
* @param mixed $value
*/
private function addParam(string $type, $value): string
public function addParam(string $type, $value): string
{
$this->paramCounter[$type] = ($this->paramCounter[$type] ?? 0) + 1;

Expand Down Expand Up @@ -872,7 +872,7 @@ private function buildCondition(string $type, string $column, mixed $value, ?str
/**
* @param self::PARAM_* $type
* @param string $column Column with comma separated list
* @param string|int|int[] $value Single value (string or int) or array of values (ints only)
* @param string|int|array<int> $value Single value (string or int) or array of values (ints only)
*/
private function buildListContains(string $type, string $column, $value): string
{
Expand Down

0 comments on commit f6c3a0f

Please sign in to comment.