@@ -74,7 +74,7 @@ |
||
| 74 | 74 | /** |
| 75 | 75 | * Get the number of the last page. |
| 76 | 76 | * |
| 77 | - * @return int |
|
| 77 | + * @return double |
|
| 78 | 78 | */ |
| 79 | 79 | public function getLastPageNumber() |
| 80 | 80 | { |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | |
| 164 | 164 | if (!is_null($this->sort)) { |
| 165 | 165 | $sort = $this->sort; |
| 166 | - uasort($this->filteredData, function ($a, $b) use ($sort) { |
|
| 166 | + uasort($this->filteredData, function($a, $b) use ($sort) { |
|
| 167 | 167 | $comp = (strcmp($a[$sort[0]], $b[$sort[0]])); |
| 168 | 168 | if ($sort[1] == "DESC") { |
| 169 | 169 | return -1 * $comp; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function load(array $configs, ContainerBuilder $container) |
| 21 | 21 | { |
| 22 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 22 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 23 | 23 | $loader->load('chat_commands.yml'); |
| 24 | 24 | $loader->load('plugins.yml'); |
| 25 | 25 | } |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | /** |
| 123 | 123 | * Recursive search all dome tree in order to find all translatable labels. |
| 124 | 124 | * |
| 125 | - * @param Container|\FML\ManiaLink $control |
|
| 125 | + * @param \FML\ManiaLink $control |
|
| 126 | 126 | * @param $translations |
| 127 | 127 | */ |
| 128 | 128 | protected function getDictionaryInformation($control, &$translations) |
@@ -4,17 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | use eXpansion\Framework\Core\Helpers\Translations; |
| 6 | 6 | use eXpansion\Framework\Core\Model\UserGroups\Group; |
| 7 | -use eXpansion\Framework\Gui\Components\uiButton; |
|
| 8 | -use eXpansion\Framework\Gui\Components\uiCheckbox; |
|
| 9 | 7 | use eXpansion\Framework\Gui\Components\uiLabel; |
| 10 | 8 | use FML\Controls\Frame; |
| 11 | 9 | use FML\Controls\Label; |
| 12 | 10 | use FML\Elements\Dico; |
| 13 | 11 | use FML\Elements\Format; |
| 14 | -use FML\Elements\SimpleScript; |
|
| 15 | 12 | use FML\Script\Features\ToggleInterface; |
| 16 | -use FML\Script\Script; |
|
| 17 | -use FML\Script\ScriptInclude; |
|
| 18 | 13 | use FML\Types\Container; |
| 19 | 14 | use FML\Types\Renderable; |
| 20 | 15 | |
@@ -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 | |
@@ -92,14 +92,14 @@ |
||
| 92 | 92 | */ |
| 93 | 93 | public function onEndTurnEnd($count, $time); |
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * Callback sent when the "StartRound" section start. |
|
| 97 | - * |
|
| 98 | - * @param int $count Each time this section is played, this number is incremented by one |
|
| 99 | - * @param int $time Server time when the callback was sent |
|
| 100 | - * |
|
| 101 | - * @return mixed |
|
| 102 | - */ |
|
| 95 | + /** |
|
| 96 | + * Callback sent when the "StartRound" section start. |
|
| 97 | + * |
|
| 98 | + * @param int $count Each time this section is played, this number is incremented by one |
|
| 99 | + * @param int $time Server time when the callback was sent |
|
| 100 | + * |
|
| 101 | + * @return mixed |
|
| 102 | + */ |
|
| 103 | 103 | public function onStartRoundStart($count, $time); |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | }, |
| 139 | 139 | array_filter( |
| 140 | 140 | $this->chatCommands->getChatCommands(), |
| 141 | - function ($command) use ($login) { |
|
| 141 | + function($command) use ($login) { |
|
| 142 | 142 | if ($command instanceof AbstractAdminChatCommand) { |
| 143 | 143 | return $command->hasPermission($login); |
| 144 | 144 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | public function create($totalWidth, $columns, $index = 0, $height = 5.0, $autoNewLine = false, $maxLines = 1) |
| 59 | 59 | { |
| 60 | 60 | $totalCoef |
| 61 | - = ($totalWidth - 1) / array_reduce($columns, function ($carry, $item) { |
|
| 61 | + = ($totalWidth - 1) / array_reduce($columns, function($carry, $item) { |
|
| 62 | 62 | return $carry + $item['width']; |
| 63 | 63 | }); |
| 64 | 64 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param bool $autoNewLine |
| 105 | 105 | * @param int $maxLines |
| 106 | 106 | * |
| 107 | - * @return Label |
|
| 107 | + * @return \FML\Types\Renderable |
|
| 108 | 108 | */ |
| 109 | 109 | protected function createTextColumn($totalCoef, $columnData, $postX, $height, $autoNewLine = false, $maxLines = 1) |
| 110 | 110 | { |
@@ -123,6 +123,9 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param double $totalCoef |
|
| 128 | + */ |
|
| 126 | 129 | protected function createInputColumn($totalCoef, $columnData, $postX) |
| 127 | 130 | { |
| 128 | 131 | /** @var uiTooltip $tooltip */ |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | /** @var AbstractChatCommand $command */ |
| 70 | 70 | $command = $manialink->getData('command'); |
| 71 | 71 | |
| 72 | - $column1Width = $manialink->getContentFrame()->getWidth() * (2/3); |
|
| 73 | - $column2Width = $manialink->getContentFrame()->getWidth() * (1/3) - 1; |
|
| 72 | + $column1Width = $manialink->getContentFrame()->getWidth() * (2 / 3); |
|
| 73 | + $column2Width = $manialink->getContentFrame()->getWidth() * (1 / 3) - 1; |
|
| 74 | 74 | |
| 75 | 75 | /* |
| 76 | 76 | * COLUMN 1 Description of the chat command |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $column1Width - 21, |
| 125 | 125 | [ |
| 126 | 126 | [ |
| 127 | - 'text' => "Use '/" . $this->currentCommand->getCommand() . " -h' to get help on the usage of the command.", |
|
| 127 | + 'text' => "Use '/".$this->currentCommand->getCommand()." -h' to get help on the usage of the command.", |
|
| 128 | 128 | 'width' => 1, |
| 129 | 129 | 'translatable' => false |
| 130 | 130 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | |
| 100 | 100 | public function calcAngle() |
| 101 | 101 | { |
| 102 | - $angle = (float)(atan2($this->x - $this->tx, $this->y - $this->ty)); |
|
| 102 | + $angle = (float) (atan2($this->x - $this->tx, $this->y - $this->ty)); |
|
| 103 | 103 | $angle += pi() / 2.0; |
| 104 | 104 | |
| 105 | 105 | return rad2deg($angle); |