| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | * Frozen data contract for a registered plugin's license state. |
| 7 | 7 | * |
| 8 | 8 | * APPEND-ONLY — existing public properties must never be renamed or removed. |
| 9 | 9 | * New properties may be added in MINOR versions; removing/renaming requires MAJOR bump. |
| 10 | - * @internal | |
| 11 | 10 | */ |
| 12 | 11 | final class PluginLicenseInfo |
| 13 | 12 | { |
| 14 | 13 | /** Plugin slug — byte-exact wp_options prefix. */ |
| @@ -45,15 +44,15 @@ | ||
| 45 | 44 | /** |
| 46 | 45 | * Return array representation suitable for passing to JS/REST. |
| 47 | 46 | * Redacts license_key to first 8 chars + asterisks. |
| 48 | 47 | */ |
| 49 | - public function toArray() : array | |
| 48 | + public function toArray(): array | |
| 50 | 49 | { |
| 51 | 50 | $key_display = ''; |
| 52 | 51 | if (!empty($this->license_key)) { |
| 53 | - $visible = \substr($this->license_key, 0, 8); | |
| 54 | - $hidden_len = \max(0, \strlen($this->license_key) - 8); | |
| 55 | - $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)); | |
| 56 | 55 | } |
| 57 | 56 | return [ |
| 58 | 57 | 'slug' => $this->slug, |
| 59 | 58 | 'name' => $this->name, |