Skip to content

Commit c634aa0

Browse files
committed
Use first-class callable syntax
1 parent 6bb34fc commit c634aa0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/InnerList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class InnerList implements TupleInterface
1414
*/
1515
public function __construct(array $value, ?object $parameters = null)
1616
{
17-
array_walk($value, [$this, 'validateItemType']);
17+
array_walk($value, self::validateItemType(...));
1818

1919
$this->value = $value;
2020
$this->parameters = $parameters ?? new Parameters();

src/OuterList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class OuterList implements \IteratorAggregate, \ArrayAccess
2222
*/
2323
public function __construct(array $value = [])
2424
{
25-
array_walk($value, [$this, 'validateItemType']);
25+
array_walk($value, self::validateItemType(...));
2626

2727
$this->value = $value;
2828
}

0 commit comments

Comments
 (0)