Skip to content

Commit 6bad75b

Browse files
committed
[Security] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 57ff35e commit 6bad75b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Role/RoleHierarchy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
class RoleHierarchy implements RoleHierarchyInterface
2020
{
2121
private $hierarchy;
22+
/** @var array<string, list<string>> */
2223
protected $map;
2324

2425
/**
25-
* @param array $hierarchy An array defining the hierarchy
26+
* @param array<string, list<string>> $hierarchy
2627
*/
2728
public function __construct(array $hierarchy)
2829
{

User/ChainUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterf
2727
private $providers;
2828

2929
/**
30-
* @param iterable<int, UserProviderInterface> $providers
30+
* @param iterable<array-key, UserProviderInterface> $providers
3131
*/
3232
public function __construct(iterable $providers)
3333
{

User/InMemoryUserProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@
2424
*/
2525
class InMemoryUserProvider implements UserProviderInterface
2626
{
27+
/**
28+
* @var array<string, UserInterface>
29+
*/
2730
private $users;
2831

2932
/**
3033
* The user array is a hash where the keys are usernames and the values are
3134
* an array of attributes: 'password', 'enabled', and 'roles'.
3235
*
33-
* @param array $users An array of users
36+
* @param array<string, array{password?: string, enabled?: bool, roles?: list<string>}> $users An array of users
3437
*/
3538
public function __construct(array $users = [])
3639
{

0 commit comments

Comments
 (0)