| Conditions | 4 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function getParams(string $providerName, ?AccessUrl $url = null): array |
||
| 21 | { |
||
| 22 | $urlId = $url ? $url->getId() : $this->urlHelper->getCurrent()->getId(); |
||
| 23 | |||
| 24 | $authentication = $this->parameterBag->get('authentication'); |
||
| 25 | |||
| 26 | if (!isset($authentication[$urlId])) { |
||
| 27 | throw new InvalidArgumentException('Invalid access URL Id'); |
||
| 28 | } |
||
| 29 | |||
| 30 | if (!isset($authentication[$urlId][$providerName])) { |
||
| 31 | throw new InvalidArgumentException('Invalid authentication source'); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $authentication[$urlId][$providerName]; |
||
| 35 | } |
||
| 44 |