Skip to content

Commit

Permalink
Use first-class callable syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gapple committed Oct 2, 2024
1 parent 6bb34fc commit c634aa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/InnerList.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class InnerList implements TupleInterface
*/
public function __construct(array $value, ?object $parameters = null)
{
array_walk($value, [$this, 'validateItemType']);
array_walk($value, self::validateItemType(...));

$this->value = $value;
$this->parameters = $parameters ?? new Parameters();
Expand Down
2 changes: 1 addition & 1 deletion src/OuterList.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class OuterList implements \IteratorAggregate, \ArrayAccess
*/
public function __construct(array $value = [])
{
array_walk($value, [$this, 'validateItemType']);
array_walk($value, self::validateItemType(...));

$this->value = $value;
}
Expand Down

0 comments on commit c634aa0

Please sign in to comment.