Skip to content

Commit 2877740

Browse files
committed
[TASK] Add native type declarations for ValueList
Also polish some PHPDoc type annotations. Part of #811.
1 parent 7e80f08 commit 2877740

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/Value/ValueList.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class ValueList extends Value
2929
protected $separator;
3030

3131
/**
32-
* @param array<array-key, Value|string>|Value|string $components
32+
* @param array<Value|string>|Value|string $components
3333
* @param string $separator
3434
* @param int<0, max> $lineNumber
3535
*/
@@ -52,33 +52,27 @@ public function addListComponent($component): void
5252
}
5353

5454
/**
55-
* @return array<array-key, Value|string>
55+
* @return array<Value|string>
5656
*/
57-
public function getListComponents()
57+
public function getListComponents(): array
5858
{
5959
return $this->components;
6060
}
6161

6262
/**
63-
* @param array<array-key, Value|string> $components
63+
* @param array<Value|string> $components
6464
*/
6565
public function setListComponents(array $components): void
6666
{
6767
$this->components = $components;
6868
}
6969

70-
/**
71-
* @return string
72-
*/
73-
public function getListSeparator()
70+
public function getListSeparator(): string
7471
{
7572
return $this->separator;
7673
}
7774

78-
/**
79-
* @param string $separator
80-
*/
81-
public function setListSeparator($separator): void
75+
public function setListSeparator(string $separator): void
8276
{
8377
$this->separator = $separator;
8478
}

0 commit comments

Comments
 (0)