From cc3a5dc34373765079c93a3729df356bec267dba Mon Sep 17 00:00:00 2001 From: Varun <31084854+varunsingh87@users.noreply.github.com> Date: Sat, 31 Dec 2022 01:52:30 -0500 Subject: [PATCH] Default callables to null --- src/Route.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Route.php b/src/Route.php index ac84617..2744548 100644 --- a/src/Route.php +++ b/src/Route.php @@ -32,7 +32,7 @@ public function authorize() $this->apiKey = substr($headers['authorization'], strlen("Basic ")); } - public function get(callable $get) + public function get(callable $get = null) { try { if ($_SERVER['REQUEST_METHOD'] === 'GET') { @@ -50,7 +50,7 @@ public function get(callable $get) } } - public function post(callable $post) + public function post(callable $post = null) { try { if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -67,7 +67,7 @@ public function post(callable $post) } } - public function put(callable $put) + public function put(callable $put = null) { try { if ($_SERVER['REQUEST_METHOD'] === 'PUT') { @@ -84,7 +84,7 @@ public function put(callable $put) } } - public function delete(callable $delete) + public function delete(callable $delete = null) { try { if ($_SERVER['REQUEST_METHOD'] === 'DELETE') {