Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
57 | public function findRepositoryByClassName($className) |
||
58 | { |
||
59 | foreach ($this->userRepositories as $repository) { |
||
60 | if ($repository->supportsClass($className)) { |
||
61 | return $repository; |
||
62 | } |
||
63 | } |
||
64 | |||
65 | $error = 'No repository has been registered for the '.$className.' class.'; |
||
66 | |||
67 | throw new RepositoryNotRegisteredException($error); |
||
68 | } |
||
69 | } |
||
70 |