| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function __get($name) : string |
||
| 48 | { |
||
| 49 | if (false === $salt = \base64_decode(\substr($this->greeting, 64, 44), true)) { |
||
| 50 | throw InvalidGreeting::invalidSalt(); |
||
| 51 | } |
||
| 52 | |||
| 53 | $salt = \substr($salt, 0, 20); |
||
| 54 | |||
| 55 | if (isset($salt[19])) { |
||
| 56 | return $this->salt = $salt; |
||
| 57 | } |
||
| 58 | |||
| 59 | throw InvalidGreeting::invalidSalt(); |
||
| 60 | } |
||
| 62 |