Improved PHPDoc, Type Hints & Parameter Names

This commit is contained in:
Steffen Schröder
2014-05-13 16:40:05 +02:00
parent 3e69e03292
commit 2a705e05d9
27 changed files with 434 additions and 447 deletions

View File

@ -64,22 +64,15 @@ class BillManager implements CallbackListener {
/**
* Send Planets from the server to a Player
*
* @param $function
* @param $receiverLogin
* @param $amount
* @param $message
* @param callable $function
* @param string $receiverLogin
* @param int $amount
* @param string $message
* @return bool
*/
public function sendPlanets($function, $receiverLogin, $amount, $message) {
if (!is_callable($function)) {
trigger_error("Function is not callable");
return false;
}
public function sendPlanets(callable $function, $receiverLogin, $amount, $message) {
$bill = $this->maniaControl->client->pay($receiverLogin, $amount, $message);
$this->openBills[$bill] = new BillData($function, $receiverLogin, $amount, true);
return true;
}