Skip to content

Commit b8e7899

Browse files
committed
feat: change self for static in Set
1 parent 6184309 commit b8e7899

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Support/Set.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public function __construct(mixed $data = [])
3535
$this->data = $data;
3636
}
3737

38-
public static function createFrom(mixed $data): self
38+
public static function createFrom(mixed $data): static
3939
{
40-
return new self($data);
40+
return new static($data);
4141
}
4242

4343
public function get(string $field, mixed $default = null): mixed
@@ -53,9 +53,9 @@ public function at(string $field): mixed
5353
throw new SchemaException(sprintf("Field '%s' not found.", $field));
5454
}
5555

56-
public function with(string $field, mixed $value): self
56+
public function with(string $field, mixed $value): static
5757
{
58-
return new self(array_merge($this->toArray(), [$field => $value]));
58+
return new static(array_merge($this->toArray(), [$field => $value]));
5959
}
6060

6161
/**
@@ -67,9 +67,9 @@ public function toArray(): array
6767
return array_map(fn (mixed $item) => $item instanceof Set ? $item->toArray() : $item, $this->data);
6868
}
6969

70-
public function along(array $values): self
70+
public function along(array $values): static
7171
{
72-
return new self(array_merge($this->toArray(), $values));
72+
return new static(array_merge($this->toArray(), $values));
7373
}
7474

7575
public function has(string $field): bool

0 commit comments

Comments
 (0)