refactor codestyle (chaining)

This commit is contained in:
kremsy
2014-08-13 11:05:52 +02:00
parent 699c5951d9
commit 22915bb934
56 changed files with 1572 additions and 3132 deletions

View File

@ -41,8 +41,7 @@ class BillManager implements CallbackListener {
$this->maniaControl = $maniaControl;
// Callbacks
$this->maniaControl->getCallbackManager()
->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
$this->maniaControl->getCallbackManager()->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
}
/**
@ -56,8 +55,7 @@ class BillManager implements CallbackListener {
* @return bool
*/
public function sendBill(callable $function, Player $player, $amount, $message, $receiver = '') {
$bill = $this->maniaControl->getClient()
->sendBill($player->login, $amount, $message, $receiver);
$bill = $this->maniaControl->getClient()->sendBill($player->login, $amount, $message, $receiver);
$this->openBills[$bill] = new BillData($function, $player, $amount);
return true;
}
@ -72,8 +70,7 @@ class BillManager implements CallbackListener {
* @return bool
*/
public function sendPlanets(callable $function, $receiverLogin, $amount, $message) {
$bill = $this->maniaControl->getClient()
->pay($receiverLogin, $amount, $message);
$bill = $this->maniaControl->getClient()->pay($receiverLogin, $amount, $message);
$this->openBills[$bill] = new BillData($function, $receiverLogin, $amount, true);
return true;
}