改名
This commit is contained in:
@@ -122,14 +122,14 @@ trait Condition
|
|||||||
/**
|
/**
|
||||||
* @param $condition
|
* @param $condition
|
||||||
* @param $array
|
* @param $array
|
||||||
* @return array
|
* @return string
|
||||||
* @throws NotFindClassException
|
* @throws NotFindClassException
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
private function _arrayMap($condition, $array): mixed
|
private function _arrayMap($condition, $array): string
|
||||||
{
|
{
|
||||||
if (!isset($condition[0])) {
|
if (!isset($condition[0])) {
|
||||||
return $this->_arrayHash($array, $condition);
|
return implode(' AND ', $this->_hashMap($condition));
|
||||||
}
|
}
|
||||||
$stroppier = strtoupper($condition[0]);
|
$stroppier = strtoupper($condition[0]);
|
||||||
if (str_contains($stroppier, 'OR')) {
|
if (str_contains($stroppier, 'OR')) {
|
||||||
@@ -145,19 +145,7 @@ trait Condition
|
|||||||
} else {
|
} else {
|
||||||
$array[] = Snowflake::createObject(['class' => HashCondition::class, 'value' => $condition]);
|
$array[] = Snowflake::createObject(['class' => HashCondition::class, 'value' => $condition]);
|
||||||
}
|
}
|
||||||
return $array;
|
return implode(' AND ', $array);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $array
|
|
||||||
* @param $condition
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
private function _arrayHash($array, $condition): array
|
|
||||||
{
|
|
||||||
$array[] = implode(' AND ', $this->_hashMap($condition));
|
|
||||||
return $array;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user