| @@ -80,10 +80,17 @@ | ||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | 83 | * Delete the given hash entry |
| 84 | + * | |
| 85 | + * No native return type: `int|false` is a PHP 8.0 union type and the | |
| 86 | + * plugin supports PHP 7.4. | |
| 87 | + * | |
| 88 | + * @param string $hash The opt-in hash to delete. | |
| 89 | + * | |
| 90 | + * @return int|false Number of deleted rows, or false on failure. | |
| 84 | 91 | */ |
| 85 | - public function deleteByHash(string $hash): int|false{ | |
| 92 | + public function deleteByHash(string $hash){ | |
| 86 | 93 | // Authorization check (fail fast) |
| 87 | 94 | if (!current_user_can('manage_options')) { |
| 88 | 95 | $this->get_logger()->warning('Unauthorized attempt to delete opt-in entry.', [ |
| 89 | 96 | 'plugin' => 'double-opt-in', |