(string $method)
| 54 | |
| 55 | if (!function_exists('fr_pro_guard_method')) { |
| 56 | function fr_pro_guard_method(string $method): void |
| 57 | { |
| 58 | fr_pro_bootstrap(); |
| 59 | |
| 60 | if (($_SERVER['REQUEST_METHOD'] ?? 'GET') !== $method) { |
| 61 | fr_pro_json(405, ['ok' => false, 'error' => 'Method not allowed']); |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | if (!function_exists('fr_pro_start_session')) { |
no test coverage detected