| @@ -47,7 +47,7 @@ | ||
| 47 | 47 | } | 
| 48 | 48 | |
| 49 | 49 | /** | 
| 50 | - * @return ParentItem|null | |
| 50 | + * @return ItemInterface|null | |
| 51 | 51 | */ | 
| 52 | 52 | public function getRootItem() | 
| 53 | 53 |      { | 
| @@ -6,7 +6,6 @@ | ||
| 6 | 6 | use eXpansion\Bundle\Menu\Model\Menu\ParentItem; | 
| 7 | 7 | use eXpansion\Bundle\Menu\Services\ItemBuilder; | 
| 8 | 8 | use eXpansion\Framework\Core\DataProviders\AbstractDataProvider; | 
| 9 | -use FML\Controls\Quad; | |
| 10 | 9 | |
| 11 | 10 | /** | 
| 12 | 11 | * Class MenuItemProvider | 
| @@ -171,7 +171,7 @@ | ||
| 171 | 171 | */ | 
| 172 | 172 | private function convertMap($map) | 
| 173 | 173 |      { | 
| 174 | - $outMap = (array)$map; | |
| 174 | + $outMap = (array) $map; | |
| 175 | 175 | $outMap["mapUid"] = $map->uId; | 
| 176 | 176 | |
| 177 | 177 | return $outMap; | 
| @@ -388,7 +388,7 @@ | ||
| 388 | 388 | * Remove special characters from map name | 
| 389 | 389 | * | 
| 390 | 390 | * @param string $string | 
| 391 | - * @return mixed | |
| 391 | + * @return string | |
| 392 | 392 | */ | 
| 393 | 393 | protected function cleanString($string) | 
| 394 | 394 |      { | 
| @@ -169,7 +169,7 @@ | ||
| 169 | 169 |                      if (!in_array($x, $idsUsed)) { | 
| 170 | 170 | $rec = clone $record; | 
| 171 | 171 | $rec->setScore(mt_rand($map->getGoldtime(), $map->getGoldtime() * 5)); | 
| 172 | - $rec->setPlayerId($players[$x-1]->getId()); | |
| 172 | + $rec->setPlayerId($players[$x - 1]->getId()); | |
| 173 | 173 | $rec->save(); | 
| 174 | 174 | $progress->advance(); | 
| 175 | 175 | } | 
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 | // If rounds is configured to be single laps then no need for race data. lap is sufficient. | 
| 40 | - return $nbLaps > 1; } | |
| 40 | + return $nbLaps > 1; } | |
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | public function onWayPoint($params) | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | */ | 
| 94 | 94 | public function onEndMap(DedicatedMap $map) | 
| 95 | 95 |      { | 
| 96 | - // do nothing | |
| 96 | + // do nothing | |
| 97 | 97 | } | 
| 98 | 98 | |
| 99 | 99 | /** | 
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | |
| 118 | 118 | public function onExpansionNextMapChange($nextMap, $previousNextMap) | 
| 119 | 119 |      { | 
| 120 | - // do nothing | |
| 120 | + // do nothing | |
| 121 | 121 | } | 
| 122 | 122 | |
| 123 | 123 | protected function syncMaps() | 
| @@ -44,7 +44,7 @@ | ||
| 44 | 44 | // Find all services to display configs. | 
| 45 | 45 | $definition = $container->getDefinition(ConfigUiManager::class); | 
| 46 | 46 |          $services = $this->findAndSortTaggedServices('expansion.config.ui', $container); | 
| 47 | -        foreach($services as $service) { | |
| 47 | +        foreach ($services as $service) { | |
| 48 | 48 | $definition->addMethodCall( | 
| 49 | 49 | 'registerUi', | 
| 50 | 50 | [$service] | 
| @@ -81,9 +81,9 @@ | ||
| 81 | 81 | |
| 82 | 82 | $logMessage = $this->chatNotification->getMessage($this->chatMessage, | 
| 83 | 83 | ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter], "en"); | 
| 84 | -            $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); | |
| 84 | +            $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); | |
| 85 | 85 | |
| 86 | -        }  catch (DedicatedException $e) { | |
| 86 | +        } catch (DedicatedException $e) { | |
| 87 | 87 |              $this->logger->error("Error on admin command", ["exception" => $e]); | 
| 88 | 88 |              $this->chatNotification->sendMessage("expansion_admin_chat.dedicatedexception", $login, | 
| 89 | 89 | ["%message%" => $e->getMessage()]); | 
| @@ -83,7 +83,7 @@ | ||
| 83 | 83 | ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter], "en"); | 
| 84 | 84 |              $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); | 
| 85 | 85 | |
| 86 | -        }  catch (DedicatedException $e) { | |
| 86 | +        } catch (DedicatedException $e) { | |
| 87 | 87 |              $this->logger->error("Error on admin command", ["exception" => $e]); | 
| 88 | 88 |              $this->chatNotification->sendMessage("expansion_admin_chat.dedicatedexception", $login, | 
| 89 | 89 | ["%message%" => $e->getMessage()]); | 
| @@ -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) |