More work

This commit is contained in:
2024-12-10 00:27:24 +04:00
parent d89cc832cb
commit f30f0f1adb
10 changed files with 339 additions and 8 deletions
@@ -28,12 +28,17 @@ class SchemaItem
$this->type = Schema::mergeTypes($this->type, $type);
if (str_contains($this->type, "[]") && !is_null($this->elements)) {
foreach ($value as $element) {
if (!in_array($element, $this->elements)) {
$this->elements[] = $element;
if (!!is_null($this->elements)) {
if (str_contains($this->type, "[]")) {
foreach ($value as $element) {
if (!in_array($element, $this->elements)) {
$this->elements[] = $element;
}
}
}
else if (!in_array($value, $this->elements)) {
$this->elements[] = $value;
}
if (count($this->elements) > 20) {
$this->elements = null;
@@ -64,5 +69,4 @@ class SchemaItem
return $rows;
}
}