@@ -94,10 +94,10 @@ discard block |
||
| 94 | 94 | // If value is default value better not to store it. |
| 95 | 95 | if ($value == $configDefinition->getDefaultValue()) { |
| 96 | 96 | // This is a temporary work around as AssociativeArray don't support unsetting elements at the moment. |
| 97 | - $cpath = implode('/', array_slice(explode('/', $path), 0,-1)); |
|
| 97 | + $cpath = implode('/', array_slice(explode('/', $path), 0, -1)); |
|
| 98 | 98 | $data = $configs->get($cpath); |
| 99 | 99 | $lapth = implode('/', array_slice(explode('/', $path), -1)); |
| 100 | - if(isset($data[$lapth])) { |
|
| 100 | + if (isset($data[$lapth])) { |
|
| 101 | 101 | unset($data[$lapth]); |
| 102 | 102 | $configs->set($cpath, $data); |
| 103 | 103 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $configs = [ |
| 197 | 197 | 'global' => $this->globalConfigurations, |
| 198 | 198 | 'key' => $this->keyConfigurations, |
| 199 | - 'server-' . $this->gameDataStorage->getSystemInfo()->serverLogin => $this->serverConfigurations, |
|
| 199 | + 'server-'.$this->gameDataStorage->getSystemInfo()->serverLogin => $this->serverConfigurations, |
|
| 200 | 200 | ]; |
| 201 | 201 | |
| 202 | 202 | foreach ($configs as $filekey => $config) { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | $configs = [ |
| 225 | 225 | 'global' => $this->globalConfigurations, |
| 226 | 226 | 'key' => $this->keyConfigurations, |
| 227 | - 'server-' . $this->gameDataStorage->getSystemInfo()->serverLogin => $this->serverConfigurations, |
|
| 227 | + 'server-'.$this->gameDataStorage->getSystemInfo()->serverLogin => $this->serverConfigurations, |
|
| 228 | 228 | ]; |
| 229 | 229 | |
| 230 | 230 | foreach ($configs as $filekey => $config) { |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | ['file' => "config-$filekey.json"] |
| 234 | 234 | ); |
| 235 | 235 | |
| 236 | - $encoded = json_encode($config->getArray(), JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); |
|
| 236 | + $encoded = json_encode($config->getArray(), JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); |
|
| 237 | 237 | $this->filesystem->put("config-$filekey.json", $encoded); |
| 238 | 238 | } |
| 239 | 239 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @param string $axis |
| 33 | 33 | * @param float $posX |
| 34 | 34 | * @param float $posY |
| 35 | - * @param $scrollbarSize |
|
| 35 | + * @param integer $scrollbarSize |
|
| 36 | 36 | * @param float $length |
| 37 | 37 | */ |
| 38 | 38 | public function __construct($axis, $posX, $posY, $scrollbarSize, $length) |
@@ -142,6 +142,9 @@ |
||
| 142 | 142 | $script->addCustomScriptLabel(ScriptLabel::Loop, $this->getScriptLoop()); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | + /** |
|
| 146 | + * @return string|null |
|
| 147 | + */ |
|
| 145 | 148 | protected function getScriptInit() |
| 146 | 149 | { |
| 147 | 150 | $offset = number_format($this->offset, 1, ".", ""); |
@@ -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); |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Bundle\DeveloperTools\ChatCommand; |
| 4 | 4 | |
| 5 | -use eXpansion\Bundle\Acme\Plugins\Test; |
|
| 6 | 5 | use eXpansion\Bundle\DeveloperTools\Plugins\DevTools; |
| 7 | 6 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 8 | 7 | use eXpansion\Framework\AdminGroups\Model\AbstractAdminChatCommand; |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace eXpansion\Bundle\DeveloperTools\Plugins; |
| 4 | 4 | |
| 5 | 5 | use eXpansion\Bundle\DeveloperTools\Plugins\Gui\MemoryWidget; |
| 6 | -use eXpansion\Bundle\DeveloperTools\Plugins\Gui\MemoryWidgetFactory; |
|
| 7 | 6 | use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpApplication; |
| 8 | 7 | use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpTimer; |
| 9 | 8 | use eXpansion\Framework\Core\Helpers\Time; |
@@ -120,8 +120,8 @@ |
||
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | 122 | * sets vote value |
| 123 | - * @param $login |
|
| 124 | - * @param $vote |
|
| 123 | + * @param string $login |
|
| 124 | + * @param integer $vote |
|
| 125 | 125 | */ |
| 126 | 126 | public function setVote($login, $vote) |
| 127 | 127 | { |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | "vote" => $vote, |
| 134 | 134 | ]; |
| 135 | 135 | |
| 136 | - $this->changedVotes[$player->getLogin()] = new MxVote((object)$obj); |
|
| 136 | + $this->changedVotes[$player->getLogin()] = new MxVote((object) $obj); |
|
| 137 | 137 | $this->chatNotification->sendMessage('expansion_mxkarma.chat.votechanged', $login); |
| 138 | 138 | } |
| 139 | 139 | |
@@ -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 | |
@@ -45,6 +45,6 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function isCompatible(ConfigInterface $config): bool |
| 47 | 47 | { |
| 48 | - return ($config instanceof PasswordConfig); |
|
| 48 | + return ($config instanceof PasswordConfig); |
|
| 49 | 49 | } |
| 50 | 50 | } |