Skip to content

[TASK] Add native type declarations for ValueList #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions src/Value/ValueList.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class ValueList extends Value
protected $separator;

/**
* @param array<array-key, Value|string>|Value|string $components
* @param array<Value|string>|Value|string $components
* @param string $separator
* @param int<0, max> $lineNumber
*/
Expand All @@ -52,33 +52,27 @@ public function addListComponent($component): void
}

/**
* @return array<array-key, Value|string>
* @return array<Value|string>
*/
public function getListComponents()
public function getListComponents(): array
{
return $this->components;
}

/**
* @param array<array-key, Value|string> $components
* @param array<Value|string> $components
*/
public function setListComponents(array $components): void
{
$this->components = $components;
}

/**
* @return string
*/
public function getListSeparator()
public function getListSeparator(): string
{
return $this->separator;
}

/**
* @param string $separator
*/
public function setListSeparator($separator): void
public function setListSeparator(string $separator): void
{
$this->separator = $separator;
}
Expand Down