| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 20 | public function get(array $mechanisms) |
|
| 45 | { |
||
| 46 | 20 | foreach ($mechanisms as $mechanism) { |
|
| 47 | 20 | if (isset($this->mechanisms[$mechanism])) { |
|
| 48 | 19 | return $this->mechanisms[$mechanism]; |
|
| 49 | } |
||
| 50 | 2 | } |
|
| 51 | |||
| 52 | 1 | throw new UnsupportedSecurityMechanismException(sprintf( |
|
| 53 | 1 | 'Non of the mechanisms "%s" is supported', |
|
| 54 | 1 | implode('", "', $mechanisms) |
|
| 55 | 1 | )); |
|
| 56 | } |
||
| 57 | } |
||
| 58 |