Skip to content

Commit e52c512

Browse files
committed
used PHP 8.2 features
1 parent fd34a95 commit e52c512

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Security/Identity.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ public function __construct(string|int $id, string|array|null $roles = null, ?it
3535
{
3636
$this->setId($id);
3737
$this->setRoles((array) $roles);
38-
$this->data = $data instanceof \Traversable
39-
? iterator_to_array($data)
40-
: (array) $data;
38+
$this->data = iterator_to_array($data ?? []);
4139
}
4240

4341

0 commit comments

Comments
 (0)