We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 5 |
| Paths | 8 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 18 | public function build(AbstractSmrPlayer $player): never { |
||
| 19 | $db = Database::getInstance(); |
||
| 20 | |||
| 21 | //only if we are coming from the bank screen do we unexempt selection first |
||
| 22 | if ($this->minTransactionID !== null && $this->maxTransactionID !== null) { |
||
| 23 | $db->write('UPDATE alliance_bank_transactions SET exempt = 0 WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND alliance_id = ' . $db->escapeNumber($player->getAllianceID()) . ' |
||
| 24 | AND transaction_id BETWEEN ' . $db->escapeNumber($this->minTransactionID) . ' AND ' . $db->escapeNumber($this->maxTransactionID)); |
||
| 25 | } |
||
| 26 | |||
| 27 | if (Request::has('exempt')) { |
||
| 28 | $trans_ids = array_keys(Request::getArray('exempt')); |
||
| 29 | $db->write('UPDATE alliance_bank_transactions SET exempt = 1, request_exempt = 0 WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND alliance_id = ' . $db->escapeNumber($player->getAllianceID()) . ' |
||
| 30 | AND transaction_id IN (' . $db->escapeArray($trans_ids) . ')'); |
||
| 31 | } |
||
| 32 | |||
| 33 | if ($this->minTransactionID !== null) { |
||
| 34 | $container = new AllianceBank($player->getAllianceID()); |
||
| 35 | } else { |
||
| 36 | $container = new AllianceExemptAuthorize(); |
||
| 37 | } |
||
| 38 | $container->go(); |
||
| 39 | } |
||
| 42 |