Change the PilotFlightAwards parameter name to be more descriptive #155

This commit is contained in:
Nabeel Shahzad
2018-03-17 18:38:09 -05:00
parent 28d180e850
commit 02a6d0d056

View File

@@ -31,16 +31,17 @@ class PilotFlightAwards extends AwardInterface
* only needs to return a true or false of whether it should be awarded or not. * only needs to return a true or false of whether it should be awarded or not.
* *
* If no parameter is passed in, just default it to 100. You should check if there * If no parameter is passed in, just default it to 100. You should check if there
* is a parameter or not * is a parameter or not. You can call it whatever you want, since that would make
* @param null $parameter The parameters passed in from the UI * sense with the $param_description.
* @param int|null $number_of_flights The parameters passed in from the UI
* @return bool * @return bool
*/ */
public function check($parameter = null): bool public function check($number_of_flights = null): bool
{ {
if(!$parameter) { if(!$number_of_flights) {
$parameter = 100; $number_of_flights = 100;
} }
return $this->user->flights >= $parameter; return $this->user->flights >= $number_of_flights;
} }
} }