From 28d180e85040a2ccadb493c7d5bc8be01e1c6bdf Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sat, 17 Mar 2018 18:19:05 -0500 Subject: [PATCH] Change the parameter name into the award check() method #155 --- app/Awards/PilotFlightAwards.php | 10 +++++----- app/Interfaces/AwardInterface.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Awards/PilotFlightAwards.php b/app/Awards/PilotFlightAwards.php index 34655236..fc4542e7 100644 --- a/app/Awards/PilotFlightAwards.php +++ b/app/Awards/PilotFlightAwards.php @@ -32,15 +32,15 @@ class PilotFlightAwards extends AwardInterface * * If no parameter is passed in, just default it to 100. You should check if there * is a parameter or not - * @param null $params The parameters passed in from the UI + * @param null $parameter The parameters passed in from the UI * @return bool */ - public function check($params = null): bool + public function check($parameter = null): bool { - if(!$params) { - $params = 100; + if(!$parameter) { + $parameter = 100; } - return $this->user->flights >= $params; + return $this->user->flights >= $parameter; } } diff --git a/app/Interfaces/AwardInterface.php b/app/Interfaces/AwardInterface.php index cc1be4b3..9ac41da3 100644 --- a/app/Interfaces/AwardInterface.php +++ b/app/Interfaces/AwardInterface.php @@ -22,10 +22,10 @@ abstract class AwardInterface /** * Each award class just needs to return true or false if it should actually * be awarded to a user. This is the only method that needs to be implemented - * @param null $params Optional parameters that are passed in from the UI + * @param null $parameter Optional parameters that are passed in from the UI * @return bool */ - abstract public function check($params = null): bool; + abstract public function check($parameter = null): bool; /** * AwardInterface constructor.