@@ -56,7 +56,7 @@ |
||
| 56 | 56 | public static function getSubscribedEvents() |
| 57 | 57 | { |
| 58 | 58 | return [ |
| 59 | - 'maniaplanet.game.BeginMap' => 'onManiaplanetGameBeginMap' , |
|
| 59 | + 'maniaplanet.game.BeginMap' => 'onManiaplanetGameBeginMap', |
|
| 60 | 60 | Factory::EVENT_CONNECTED => 'onConnectionToDedicated' |
| 61 | 61 | ]; |
| 62 | 62 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | $this->currencyService->sendBill( |
| 104 | 104 | $bill, |
| 105 | - function () use ($bill, $login) { |
|
| 105 | + function() use ($bill, $login) { |
|
| 106 | 106 | $player = $this->playerStorage->getPlayerInfo($login); |
| 107 | 107 | $amount = $bill->getAmount(); |
| 108 | 108 | $this->chatNotification->sendMessage( |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | ['amount' => $amount, 'nickname' => $player->getNickName()] |
| 112 | 112 | ); |
| 113 | 113 | }, |
| 114 | - function ($error) use ($login) { |
|
| 114 | + function($error) use ($login) { |
|
| 115 | 115 | $this->chatNotification->sendMessage( |
| 116 | 116 | 'expansion_game_currency.donate.error', |
| 117 | 117 | $login, |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | * @param $config |
| 86 | 86 | * @param $manialink |
| 87 | 87 | * @param $element |
| 88 | - * @param $width |
|
| 89 | - * @param $manialinkFactory |
|
| 88 | + * @param double $width |
|
| 89 | + * @param ManialinkFactory $manialinkFactory |
|
| 90 | 90 | * |
| 91 | 91 | * @return \eXpansion\Framework\Gui\Layouts\LayoutLine |
| 92 | 92 | */ |
@@ -102,6 +102,10 @@ discard block |
||
| 102 | 102 | ->setAction( |
| 103 | 103 | $this->actionFactory->createManialinkAction( |
| 104 | 104 | $manialink, |
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * @param double $args |
|
| 108 | + */ |
|
| 105 | 109 | function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
| 106 | 110 | /** @var TextListConfig $config */ |
| 107 | 111 | $config = $args['config']; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use eXpansion\Framework\Config\Model\ConfigInterface; |
| 6 | 6 | use eXpansion\Framework\Config\Model\TextListConfig; |
| 7 | -use eXpansion\Framework\Config\Ui\Window\ConfigWindowFactory; |
|
| 8 | 7 | use eXpansion\Framework\Core\Model\Gui\ManialinkInterface; |
| 9 | 8 | use eXpansion\Framework\Core\Plugins\Gui\ActionFactory; |
| 10 | 9 | use eXpansion\Framework\Core\Plugins\Gui\ManialinkFactory; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ->setAction( |
| 58 | 58 | $this->actionFactory->createManialinkAction( |
| 59 | 59 | $manialink, |
| 60 | - function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 60 | + function(ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 61 | 61 | /** @var TextListConfig $config */ |
| 62 | 62 | $config = $args['config']; |
| 63 | 63 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | ) |
| 72 | 72 | ); |
| 73 | 73 | |
| 74 | - $elements = [$this->uiFactory->createLayoutLine(0,0, [$input, $addButton])]; |
|
| 74 | + $elements = [$this->uiFactory->createLayoutLine(0, 0, [$input, $addButton])]; |
|
| 75 | 75 | foreach ($config->get() as $element) { |
| 76 | 76 | $elements[] = $this->getElementLine($config, $manialink, $element, $width, $manialinkFactory); |
| 77 | 77 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ->setAction( |
| 103 | 103 | $this->actionFactory->createManialinkAction( |
| 104 | 104 | $manialink, |
| 105 | - function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 105 | + function(ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 106 | 106 | /** @var TextListConfig $config */ |
| 107 | 107 | $config = $args['config']; |
| 108 | 108 | $config->remove($args['element']); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | ) |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - return $this->uiFactory->createLayoutLine(0,0, [$label, $delButton]); |
|
| 116 | + return $this->uiFactory->createLayoutLine(0, 0, [$label, $delButton]); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | public function isCompatible(ConfigInterface $config): bool |
| 49 | 49 | { |
| 50 | - return ($config instanceof PasswordConfig); |
|
| 50 | + return ($config instanceof PasswordConfig); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -35,15 +35,15 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | foreach ($groups as $groupCode => $group) |
| 37 | 37 | { |
| 38 | - $pathPrefix = $container->getParameter('expansion.admin_groups.config.path') . "/$groupCode"; |
|
| 38 | + $pathPrefix = $container->getParameter('expansion.admin_groups.config.path')."/$groupCode"; |
|
| 39 | 39 | |
| 40 | - $id = 'expansion.admin_groups.config.label.' . $groupCode; |
|
| 40 | + $id = 'expansion.admin_groups.config.label.'.$groupCode; |
|
| 41 | 41 | $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.label.abstract')) |
| 42 | 42 | ->replaceArgument('$path', "$pathPrefix/label") |
| 43 | 43 | ->replaceArgument('$defaultValue', $group['label']); |
| 44 | 44 | $configManager->addMethodCall('registerConfig', [new Reference($id), $id]); |
| 45 | 45 | |
| 46 | - $id = 'expansion.admin_groups.config.logins.' . $groupCode; |
|
| 46 | + $id = 'expansion.admin_groups.config.logins.'.$groupCode; |
|
| 47 | 47 | $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.logins.abstract')) |
| 48 | 48 | ->setArgument('$path', "$pathPrefix/logins") |
| 49 | 49 | ->setArgument('$defaultValue', $group['logins']); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if ($groupCode != "master_admin") { |
| 53 | 53 | foreach ($permissions as $permission) { |
| 54 | - $id = 'expansion.admin_groups.config.permissions.' . $groupCode . ".$permission"; |
|
| 54 | + $id = 'expansion.admin_groups.config.permissions.'.$groupCode.".$permission"; |
|
| 55 | 55 | $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.permissions.abstract')) |
| 56 | 56 | ->setArgument('$path', "$pathPrefix/perm_$permission") |
| 57 | 57 | ->setArgument('$defaultValue', $group['logins']) |
@@ -7,13 +7,9 @@ |
||
| 7 | 7 | use eXpansion\Framework\Core\Model\Gui\ManialinkInterface; |
| 8 | 8 | use eXpansion\Framework\Core\Model\Gui\Window; |
| 9 | 9 | use eXpansion\Framework\Core\Model\UserGroups\Group; |
| 10 | -use eXpansion\Framework\Core\Plugins\Gui\ManialinkFactory; |
|
| 11 | 10 | use eXpansion\Framework\Core\Plugins\GuiHandler; |
| 12 | 11 | use eXpansion\Framework\Core\Plugins\GuiHandlerInterface; |
| 13 | -use eXpansion\Framework\Core\Services\Console; |
|
| 14 | 12 | use eXpansion\Framework\Core\Storage\Data\Player; |
| 15 | -use Maniaplanet\DedicatedServer\Connection; |
|
| 16 | -use Psr\Log\LoggerInterface; |
|
| 17 | 13 | |
| 18 | 14 | /** |
| 19 | 15 | * Class WindowsGuiHandler, replaces the native GuiHandler only for windows type manialinks in order to : |
@@ -103,12 +103,12 @@ |
||
| 103 | 103 | $this->posY = $posY; |
| 104 | 104 | |
| 105 | 105 | // Update current widgets. |
| 106 | - foreach ($this->guiHandler->getFactoryManialinks($this) as $manialink) { |
|
| 107 | - if ($manialink instanceof FmlManialink) { |
|
| 108 | - $manialink->setPosition($this->posX, $this->posY); |
|
| 109 | - } |
|
| 106 | + foreach ($this->guiHandler->getFactoryManialinks($this) as $manialink) { |
|
| 107 | + if ($manialink instanceof FmlManialink) { |
|
| 108 | + $manialink->setPosition($this->posX, $this->posY); |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | - $this->update($manialink->getUserGroup()); |
|
| 112 | - } |
|
| 111 | + $this->update($manialink->getUserGroup()); |
|
| 112 | + } |
|
| 113 | 113 | } |
| 114 | 114 | } |
@@ -25,13 +25,13 @@ |
||
| 25 | 25 | foreach ($bundles as $bundle) { |
| 26 | 26 | $reflection = new \ReflectionClass($bundle); |
| 27 | 27 | |
| 28 | - if (is_file($file = dirname($reflection->getFilename()) . '/Resources/config/expansion_defaults/core_config.yml')) { |
|
| 28 | + if (is_file($file = dirname($reflection->getFilename()).'/Resources/config/expansion_defaults/core_config.yml')) { |
|
| 29 | 29 | $config = Yaml::parse(file_get_contents(realpath($file))); |
| 30 | 30 | $container->prependExtensionConfig('e_xpansion_core', $config['e_xpansion_core']); |
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - if (is_file($file = $container->getParameter('kernel.root_dir') . '/config/expansion.yml')) { |
|
| 34 | + if (is_file($file = $container->getParameter('kernel.root_dir').'/config/expansion.yml')) { |
|
| 35 | 35 | $config = Yaml::parse(file_get_contents(realpath($file))); |
| 36 | 36 | $container->prependExtensionConfig('e_xpansion_core', $config['e_xpansion_core']); |
| 37 | 37 | } |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | ); |
| 77 | 77 | $this->application->stopApplication(); |
| 78 | 78 | |
| 79 | - $process = new Process("bin/" . $scriptToExecute . " &"); |
|
| 79 | + $process = new Process("bin/".$scriptToExecute." &"); |
|
| 80 | 80 | $process->start(); |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | \ No newline at end of file |