@@ -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); |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 6 | 6 | use eXpansion\Framework\AdminGroups\Model\AbstractAdminChatCommand; |
| 7 | 7 | use eXpansion\Framework\Core\Helpers\ChatNotification; |
| 8 | -use eXpansion\Framework\Core\Helpers\Time; |
|
| 9 | 8 | use eXpansion\Framework\Core\Storage\MapStorage; |
| 10 | 9 | use eXpansion\Framework\Core\Storage\PlayerStorage; |
| 11 | 10 | use Maniaplanet\DedicatedServer\Connection; |
@@ -21,8 +21,6 @@ |
||
| 21 | 21 | * @param $posX |
| 22 | 22 | * @param $posY |
| 23 | 23 | * @param WidgetFactoryContext $context |
| 24 | - * @param Dispatcher $dispatcher |
|
| 25 | - * @param PlayerStorage $playerStorage |
|
| 26 | 24 | */ |
| 27 | 25 | public function __construct( |
| 28 | 26 | $name, |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * @param Control $element |
| 127 | - * @return float|int |
|
| 127 | + * @return double|null |
|
| 128 | 128 | */ |
| 129 | 129 | private function getRelativeWidth($element) |
| 130 | 130 | { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * @return mixed |
|
| 195 | + * @return double |
|
| 196 | 196 | */ |
| 197 | 197 | public function getY() |
| 198 | 198 | { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
| 235 | - * @param object $element |
|
| 235 | + * @param Renderable $element |
|
| 236 | 236 | */ |
| 237 | 237 | public function addChild(Renderable $element) |
| 238 | 238 | { |
@@ -245,7 +245,7 @@ |
||
| 245 | 245 | public static function parseCountryFromPath($path) |
| 246 | 246 | { |
| 247 | 247 | $parts = explode("|", $path, 3); |
| 248 | - if (count($parts)>= 2) { |
|
| 248 | + if (count($parts) >= 2) { |
|
| 249 | 249 | return $parts[2]; |
| 250 | 250 | } |
| 251 | 251 | |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | } catch (PlayerException $e) { |
| 115 | 115 | // Player exceptions are meant to be sent to players, and not crash or even be logged. |
| 116 | 116 | $this->chatNotification->sendMessage($e->getTranslatableMessage(), $login); |
| 117 | - } catch( UnknownPlayerException $e) { |
|
| 117 | + } catch (UnknownPlayerException $e) { |
|
| 118 | 118 | // Player exceptions are meant to be sent to players, and not crash or even be logged. |
| 119 | 119 | $this->chatNotification->sendMessage($e->getMessage(), $login); |
| 120 | 120 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | |
| 84 | 84 | $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
| 85 | 85 | $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
| 86 | - $this->functionName = (string)$functionName; |
|
| 86 | + $this->functionName = (string) $functionName; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | |
| 91 | 91 | $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
| 92 | 92 | $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
| 93 | - $this->functionName = (string)$functionName; |
|
| 94 | - $this->parameterDescription = (string)$parameterDescription; |
|
| 93 | + $this->functionName = (string) $functionName; |
|
| 94 | + $this->parameterDescription = (string) $parameterDescription; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
| 119 | - $frame = Frame::create();; |
|
| 119 | + $frame = Frame::create(); ; |
|
| 120 | 120 | $frame->setPosition(120, -16); |
| 121 | 121 | |
| 122 | 122 | $manialink->setData("playerFrame", $frame); |
@@ -325,23 +325,23 @@ discard block |
||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | $actions = [ |
| 328 | - "mute" => (string)$this->actionFactory->createManialinkAction($manialink, [$this, 'callbackIgnore'], |
|
| 328 | + "mute" => (string) $this->actionFactory->createManialinkAction($manialink, [$this, 'callbackIgnore'], |
|
| 329 | 329 | [ |
| 330 | 330 | "login" => $login, |
| 331 | 331 | ]), |
| 332 | - "kick" => (string)$this->actionFactory->createManialinkAction($manialink, [$this, 'callbackKick'], |
|
| 332 | + "kick" => (string) $this->actionFactory->createManialinkAction($manialink, [$this, 'callbackKick'], |
|
| 333 | 333 | [ |
| 334 | 334 | "login" => $login, |
| 335 | 335 | ]), |
| 336 | - "ban" => (string)$this->actionFactory->createManialinkAction($manialink, [$this, 'callbackBan'], |
|
| 336 | + "ban" => (string) $this->actionFactory->createManialinkAction($manialink, [$this, 'callbackBan'], |
|
| 337 | 337 | [ |
| 338 | 338 | "login" => $login, |
| 339 | 339 | ]), |
| 340 | - "black" => (string)$this->actionFactory->createManialinkAction($manialink, [$this, 'callbackBlack'], |
|
| 340 | + "black" => (string) $this->actionFactory->createManialinkAction($manialink, [$this, 'callbackBlack'], |
|
| 341 | 341 | [ |
| 342 | 342 | "login" => $login, |
| 343 | 343 | ]), |
| 344 | - "guest" => (string)$this->actionFactory->createManialinkAction($manialink, [$this, 'callbackGuest'], |
|
| 344 | + "guest" => (string) $this->actionFactory->createManialinkAction($manialink, [$this, 'callbackGuest'], |
|
| 345 | 345 | [ |
| 346 | 346 | "login" => $login, |
| 347 | 347 | ]), |