| @@ -44,15 +44,15 @@ | ||
| 44 | 44 | /** |
| 45 | 45 | * Return array representation suitable for passing to JS/REST. |
| 46 | 46 | * Redacts license_key to first 8 chars + asterisks. |
| 47 | 47 | */ |
| 48 | - public function toArray() : array | |
| 48 | + public function toArray(): array | |
| 49 | 49 | { |
| 50 | 50 | $key_display = ''; |
| 51 | 51 | if (!empty($this->license_key)) { |
| 52 | - $visible = \substr($this->license_key, 0, 8); | |
| 53 | - $hidden_len = \max(0, \strlen($this->license_key) - 8); | |
| 54 | - $key_display = $visible . \str_repeat('*', \min($hidden_len, 20)); | |
| 52 | + $visible = substr($this->license_key, 0, 8); | |
| 53 | + $hidden_len = max(0, strlen($this->license_key) - 8); | |
| 54 | + $key_display = $visible . str_repeat('*', min($hidden_len, 20)); | |
| 55 | 55 | } |
| 56 | 56 | return [ |
| 57 | 57 | 'slug' => $this->slug, |
| 58 | 58 | 'name' => $this->name, |