From 7b45e9117dc140e87fb19216eeedb033d852dca0 Mon Sep 17 00:00:00 2001 From: Michael Portelas Date: Sun, 25 Aug 2024 15:38:42 +0200 Subject: [PATCH 1/2] Update awards.md Landing rate is negative value --- docs/developers/awards.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/developers/awards.md b/docs/developers/awards.md index bdd748f7e..c9adeca5f 100644 --- a/docs/developers/awards.md +++ b/docs/developers/awards.md @@ -90,11 +90,9 @@ public function check($landing_rate = null): bool { // Have the default landing rate if it hasn't been set in the admin // It's best to make sure you set a default value if you're using it - if(!$landing_rate) { - $landing_rate = 200; - } + $landing_rate ??= 200; - if($this->user->last_pirep->landing_rate <= (int) $landing_rate) { + if($this->user->last_pirep->landing_rate >= (int) $landing_rate) { return true; } From fd523d82fc8b905527646ed74323440f8e7ee015 Mon Sep 17 00:00:00 2001 From: Michael Portelas Date: Sun, 25 Aug 2024 15:43:26 +0200 Subject: [PATCH 2/2] Update awards.md --- docs/developers/awards.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers/awards.md b/docs/developers/awards.md index c9adeca5f..4962a9f0f 100644 --- a/docs/developers/awards.md +++ b/docs/developers/awards.md @@ -90,7 +90,7 @@ public function check($landing_rate = null): bool { // Have the default landing rate if it hasn't been set in the admin // It's best to make sure you set a default value if you're using it - $landing_rate ??= 200; + $landing_rate ??= -200; if($this->user->last_pirep->landing_rate >= (int) $landing_rate) { return true;