@@ -238,7 +238,7 @@ |
||
| 238 | 238 | */ |
| 239 | 239 | public function getObject($data) |
| 240 | 240 | { |
| 241 | - $obj = (object)json_decode($data); |
|
| 241 | + $obj = (object) json_decode($data); |
|
| 242 | 242 | if ($obj->success === false) { |
| 243 | 243 | $this->handleErrors($obj); |
| 244 | 244 | |
@@ -181,7 +181,7 @@ |
||
| 181 | 181 | |
| 182 | 182 | /** |
| 183 | 183 | * loads votes from server |
| 184 | - * @param array $players |
|
| 184 | + * @param integer[] $players |
|
| 185 | 185 | * @param bool $getVotesOnly |
| 186 | 186 | */ |
| 187 | 187 | public function loadVotes($players = array(), $getVotesOnly = false) |
@@ -30,7 +30,6 @@ |
||
| 30 | 30 | use eXpansion\Framework\Core\Storage\MapStorage; |
| 31 | 31 | use Maniaplanet\DedicatedServer\Structures\GameInfos; |
| 32 | 32 | use Maniaplanet\DedicatedServer\Structures\Map; |
| 33 | -use oliverde8\AsynchronousJobs\Job\CallbackCurl; |
|
| 34 | 33 | |
| 35 | 34 | /** |
| 36 | 35 | * Description of Connection |
@@ -6,8 +6,6 @@ |
||
| 6 | 6 | use eXpansion\Framework\Core\Helpers\Structures\HttpRequest; |
| 7 | 7 | use eXpansion\Framework\Core\Helpers\Structures\HttpResult; |
| 8 | 8 | use eXpansion\Framework\Core\Services\Application\AbstractApplication; |
| 9 | -use oliverde8\AsynchronousJobs\Job\CallbackCurl; |
|
| 10 | -use oliverde8\AsynchronousJobs\JobRunner; |
|
| 11 | 9 | |
| 12 | 10 | /** |
| 13 | 11 | * Class Http |
@@ -29,13 +29,13 @@ |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * @param $url |
|
| 33 | - * @param $callback |
|
| 32 | + * @param string $url |
|
| 33 | + * @param callable $callback |
|
| 34 | 34 | * @param null|mixed $additionalData |
| 35 | 35 | * @param array $options |
| 36 | 36 | * |
| 37 | 37 | * @param array|\stdClass $parameters one dimensional array or \stdClass with post key-value pairs |
| 38 | - * @return CallbackCurl |
|
| 38 | + * @return Job |
|
| 39 | 39 | */ |
| 40 | 40 | public function createCurlJob($url, $callback, $additionalData = null, $options = [], $parameters = []) |
| 41 | 41 | { |
@@ -2,10 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Framework\Core\Helpers\JobRunner; |
| 4 | 4 | |
| 5 | -use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpApplication; |
|
| 6 | 5 | use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpTimer; |
| 7 | 6 | use eXpansion\Framework\Core\Helpers\Structures\HttpRequest; |
| 8 | -use eXpansion\Framework\Core\Helpers\Structures\HttpResult; |
|
| 9 | 7 | use oliverde8\AsynchronousJobs\Job; |
| 10 | 8 | use oliverde8\AsynchronousJobs\Job\CallbackCurl; |
| 11 | 9 | use oliverde8\AsynchronousJobs\JobRunner; |
@@ -30,6 +30,6 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function __toString() |
| 32 | 32 | { |
| 33 | - return (string)$this->response['response']; |
|
| 33 | + return (string) $this->response['response']; |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -2,10 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Bundle\Maps\ChatCommand; |
| 4 | 4 | |
| 5 | -use eXpansion\Bundle\AdminChat\ChatCommand\AbstractConnectionCommand; |
|
| 6 | 5 | use eXpansion\Bundle\Maps\Plugins\ManiaExchange; |
| 7 | 6 | use eXpansion\Bundle\Maps\Plugins\Maps; |
| 8 | -use eXpansion\Bundle\Maps\Services\JukeboxService; |
|
| 9 | 7 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 10 | 8 | use Symfony\Component\Console\Input\InputArgument; |
| 11 | 9 | use Symfony\Component\Console\Input\InputInterface; |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Bundle\Maps\Plugins\Gui; |
| 4 | 4 | |
| 5 | -use eXpansion\Bundle\Maps\Plugins\Jukebox; |
|
| 6 | 5 | use eXpansion\Bundle\Maps\Plugins\ManiaExchange; |
| 7 | 6 | use eXpansion\Bundle\Maps\Structure\MxInfo; |
| 8 | 7 | use eXpansion\Framework\Core\Helpers\Http; |
@@ -304,7 +304,7 @@ |
||
| 304 | 304 | |
| 305 | 305 | public function callbackSearch($login, $params, $args) |
| 306 | 306 | { |
| 307 | - $params = (object)$params; |
|
| 307 | + $params = (object) $params; |
|
| 308 | 308 | |
| 309 | 309 | $this->modebox->setSelectedIndex($this->findIndex($this->tracksearch, $params->mode)); |
| 310 | 310 | $this->orderbox->setSelectedIndex($this->findIndex($this->order, $params->order)); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function getMap($uid) |
| 54 | 54 | { |
| 55 | - return AssociativeArray::getFromKey($this->maps, $uid, new Map()); |
|
| 55 | + return AssociativeArray::getFromKey($this->maps, $uid, new Map()); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function getMapByIndex($index) |
| 66 | 66 | { |
| 67 | - $map = array_slice($this->maps, (int)$index, 1, false); |
|
| 67 | + $map = array_slice($this->maps, (int) $index, 1, false); |
|
| 68 | 68 | |
| 69 | 69 | return end($map); |
| 70 | 70 | } |
@@ -87,6 +87,10 @@ discard block |
||
| 87 | 87 | $this->playerStorage = $playerStorage; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $login |
|
| 92 | + * @param integer $vote |
|
| 93 | + */ |
|
| 90 | 94 | public function setVote($login, $vote) |
| 91 | 95 | { |
| 92 | 96 | $player = $this->playerStorage->getPlayerInfo($login); |
@@ -183,7 +187,6 @@ discard block |
||
| 183 | 187 | } |
| 184 | 188 | |
| 185 | 189 | /** |
| 186 | - * @param MxRating $ratings |
|
| 187 | 190 | * @return mixed |
| 188 | 191 | */ |
| 189 | 192 | public function onMxKarmaVoteLoad(MxRating $mxRating) |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | use eXpansion\Framework\Core\Storage\Data\Player; |
| 16 | 16 | use eXpansion\Framework\Core\Storage\PlayerStorage; |
| 17 | 17 | use eXpansion\Framework\GameManiaplanet\DataProviders\Listener\ListenerInterfaceMpScriptMap; |
| 18 | -use eXpansion\Framework\GameManiaplanet\DataProviders\Listener\ListenerInterfaceMpScriptMatch; |
|
| 19 | 18 | use Maniaplanet\DedicatedServer\Structures\Map; |
| 20 | 19 | use Symfony\Component\Yaml\Yaml; |
| 21 | 20 | use eXpansion\Bundle\MxKarma\Plugins\Connection as MxConnection; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | PlayerStorage $playerStorage |
| 80 | 80 | ) { |
| 81 | 81 | |
| 82 | - $this->config = (object)Yaml::parse(file_get_contents('./app/config/plugins/mxkarma.yml'))['parameters']; |
|
| 82 | + $this->config = (object) Yaml::parse(file_get_contents('./app/config/plugins/mxkarma.yml'))['parameters']; |
|
| 83 | 83 | $this->console = $console; |
| 84 | 84 | $this->dispatcher = $dispatcher; |
| 85 | 85 | $this->chatNotification = $chatNotification; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | "vote" => $vote, |
| 98 | 98 | ]; |
| 99 | 99 | |
| 100 | - $this->changedVotes[$player->getLogin()] = new MxVote((object)$obj); |
|
| 100 | + $this->changedVotes[$player->getLogin()] = new MxVote((object) $obj); |
|
| 101 | 101 | $this->chatNotification->sendMessage('expansion_mxkarma.chat.votechanged', $login); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | public function __construct($obj) |
| 16 | 16 | { |
| 17 | 17 | $this->login = $obj->login; |
| 18 | - $this->vote = (int)$obj->vote; |
|
| 18 | + $this->vote = (int) $obj->vote; |
|
| 19 | 19 | } |
| 20 | 20 | } |