1 | <?php |
||
8 | class UserRepositoryCollection |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $userRepositories; |
||
14 | |||
15 | /** |
||
16 | * UserRepositoryCollection constructor. |
||
17 | * |
||
18 | * @param array $userRepositories |
||
19 | */ |
||
20 | public function __construct(array $userRepositories) |
||
27 | |||
28 | /** |
||
29 | * Registers the UserRepository to the UserRepositoryCollection. |
||
30 | * |
||
31 | * @param UserRepository $userRepository |
||
32 | */ |
||
33 | public function addUserRepository(UserRepository $userRepository) |
||
34 | { |
||
35 | $this->userRepositories[] = $userRepository; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Get the userRepositories. |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function all() |
||
47 | |||
48 | /** |
||
49 | * Find the UserRepository for a given User Class. |
||
50 | * |
||
51 | * @param $className |
||
52 | * |
||
53 | * @throws RepositoryNotRegisteredException |
||
54 | * |
||
55 | * @return UserRepository |
||
56 | */ |
||
57 | public function findRepositoryByClassName($className) |
||
67 | } |
||
68 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..