eee
This commit is contained in:
@@ -43,10 +43,9 @@ abstract class Condition extends Component
|
||||
public function setValue($params): void
|
||||
{
|
||||
if (is_array($params)) {
|
||||
$values = [];
|
||||
foreach ($params as $item => $value) {
|
||||
$values[$item] = is_numeric($value) ? $value : '\'' . $value . '\'';
|
||||
}
|
||||
$values = array_map(function ($value) {
|
||||
return is_numeric($value) ? $value : '\'' . $value . '\'';
|
||||
}, $params);
|
||||
$this->value = $values;
|
||||
} else {
|
||||
$this->value = $this->checkIsSqlString($params);
|
||||
|
||||
@@ -17,7 +17,7 @@ class NotInCondition extends Condition
|
||||
* @return string|null
|
||||
* @throws
|
||||
*/
|
||||
#[Pure] public function builder(): ?string
|
||||
public function builder(): ?string
|
||||
{
|
||||
if (!is_array($this->value)) {
|
||||
throw new \Exception('Builder data by a empty string. need array');
|
||||
|
||||
Reference in New Issue
Block a user