| @@ 74-80 (lines=7) @@ | ||
| 71 | */ |
|
| 72 | public function toIdentityProvider() |
|
| 73 | { |
|
| 74 | if (!$this->type === self::TYPE_IDP) { |
|
| 75 | throw new RuntimeException(sprintf( |
|
| 76 | 'Cannot cast a SAMLEntity to an IdentityProvider if it is not of the type "%s", current type: "%s"', |
|
| 77 | self::TYPE_IDP, |
|
| 78 | $this->type |
|
| 79 | )); |
|
| 80 | } |
|
| 81 | ||
| 82 | $decodedConfiguration = $this->decodeConfiguration(); |
|
| 83 | ||
| @@ 96-102 (lines=7) @@ | ||
| 93 | */ |
|
| 94 | public function toServiceProvider() |
|
| 95 | { |
|
| 96 | if (!$this->type === self::TYPE_SP) { |
|
| 97 | throw new RuntimeException(sprintf( |
|
| 98 | 'Cannot cast a SAMLEntity to a ServiceProvider if it is not of the type "%s", current type: "%s"', |
|
| 99 | self::TYPE_SP, |
|
| 100 | $this->type |
|
| 101 | )); |
|
| 102 | } |
|
| 103 | ||
| 104 | $decodedConfiguration = $this->decodeConfiguration(); |
|
| 105 | ||