diff --git a/core/Callbacks/Callbacks.php b/core/Callbacks/Callbacks.php index 0b46a5e3..c8238878 100644 --- a/core/Callbacks/Callbacks.php +++ b/core/Callbacks/Callbacks.php @@ -313,17 +313,6 @@ interface Callbacks { */ const ONPLAYERREQUESTRESPAWN = 'Callbacks.OnPlayerRequestRespawn'; - /** Elite OnBeginTurn Callback: EliteBeginTurnStructure - * - * @deprecated - */ - const ELITE_ONBEGINTURN = "Callbacks.EliteOnBeginTurn"; - /** Elite OnEndTurn Callback: integer (VictoryTypes) - * - * @deprecated - */ - const ELITE_ONENDTURN = "Callbacks.EliteOnEndTurn"; - /** Joust Selected Players * * @deprecated diff --git a/core/Callbacks/ShootManiaCallbacks.php b/core/Callbacks/ShootManiaCallbacks.php index 237d1d9b..b0c4df21 100644 --- a/core/Callbacks/ShootManiaCallbacks.php +++ b/core/Callbacks/ShootManiaCallbacks.php @@ -68,6 +68,7 @@ class ShootManiaCallbacks implements CallbackListener { /** * Handle Script Callbacks * + * @internal * @param string $name * @param mixed $data */ @@ -166,15 +167,6 @@ class ShootManiaCallbacks implements CallbackListener { case 'WarmUp_Status': $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::WARMUPSTATUS, $data[0]); break; - case 'Elite_BeginTurn': - $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ELITE_ONBEGINTURN, new EliteBeginTurnStructure($this->maniaControl, $data)); - break; - case 'Elite_EndTurn': - $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ELITE_ONENDTURN, $data[0]); - break; - case 'Joust_SelectedPlayers': - $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::JOUST_SELECTEDPLAYERS, $data); - break; case self::CB_TIMEATTACK_ONCHECKPOINT: $this->handleTimeAttackOnCheckpoint($name, $data); break; diff --git a/core/Callbacks/Structures/Common/BaseResponseStructure.php b/core/Callbacks/Structures/Common/BaseResponseStructure.php index 2f5d4dd1..25089db5 100644 --- a/core/Callbacks/Structures/Common/BaseResponseStructure.php +++ b/core/Callbacks/Structures/Common/BaseResponseStructure.php @@ -1,31 +1,40 @@ + * @copyright 2014-2017 ManiaControl Team + * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 + */ class BaseResponseStructure extends BaseStructure { protected $responseId; + /** + * BaseResponseStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ + public function __construct(ManiaControl $maniaControl, $data) { + parent::__construct($maniaControl, $data); + + $this->responseId = $this->getPlainJsonObject()->responseid; + } + /** * Get the Response Id * + * @api * @return string */ public function getResponseId() { return $this->responseId; } - public function __construct(ManiaControl $maniaControl, $data) { - parent::__construct($maniaControl, $data); - - $this->responseId = $this->getPlainJsonObject()->responseid; - } } \ No newline at end of file diff --git a/core/Callbacks/Structures/Common/BaseStructure.php b/core/Callbacks/Structures/Common/BaseStructure.php index bba70097..24af3ba1 100644 --- a/core/Callbacks/Structures/Common/BaseStructure.php +++ b/core/Callbacks/Structures/Common/BaseStructure.php @@ -12,6 +12,7 @@ use ManiaControl\ManiaControl; /** * Base Structure of all Callback Structures * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -23,6 +24,12 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable { protected $maniaControl; private $plainJsonObject; + /** + * BaseStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ protected function __construct(ManiaControl $maniaControl, $data) { $this->maniaControl = $maniaControl; $this->plainJsonObject = json_decode($data[0]); @@ -30,6 +37,8 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable { /** * Gets the Plain Json + * + * @api */ public function getPlainJsonObject() { return $this->plainJsonObject; diff --git a/core/Callbacks/Structures/Common/CommonScoresStructure.php b/core/Callbacks/Structures/Common/CommonScoresStructure.php index b179802d..ccd71780 100644 --- a/core/Callbacks/Structures/Common/CommonScoresStructure.php +++ b/core/Callbacks/Structures/Common/CommonScoresStructure.php @@ -12,6 +12,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnScores Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -24,7 +25,12 @@ class CommonScoresStructure extends BaseResponseStructure { protected $teamScores = array(); protected $playerScores = array(); - //TODO test + /** + * CommonScoresStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -56,6 +62,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * Get the Winner Player Object * + * @api * @return \ManiaControl\Players\Player */ public function getWinnerPlayer() { @@ -65,6 +72,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * < Current progress of the match. Can be "" | "EndRound" | "EndMap" | "EndMatch" * + * @api * @return string */ public function getSection() { @@ -74,6 +82,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * Returns if the GameMode uses Teams or not * + * @api * @return boolean */ public function getUseTeams() { @@ -83,6 +92,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * Get the Winner Team Id * + * @api * @return int */ public function getWinnerTeamId() { @@ -92,6 +102,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * Returns the TeamScores * + * @api * @return TeamScore[] */ public function getTeamScores() { @@ -101,6 +112,7 @@ class CommonScoresStructure extends BaseResponseStructure { /** * Get the Player Scores * + * @api * @return CommonPlayerScore[] */ public function getPlayerScores() { diff --git a/core/Callbacks/Structures/Common/Models/CommonPlayerScore.php b/core/Callbacks/Structures/Common/Models/CommonPlayerScore.php index 7ed720ee..b3f87510 100644 --- a/core/Callbacks/Structures/Common/Models/CommonPlayerScore.php +++ b/core/Callbacks/Structures/Common/Models/CommonPlayerScore.php @@ -12,6 +12,7 @@ use ManiaControl\Players\Player; /** * Common PlayerStructure Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -27,6 +28,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Returns the Player * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { @@ -34,6 +36,9 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { } /** + * Returns the Player + * + * @api * @param \ManiaControl\Players\Player $player */ public function setPlayer(Player $player) { @@ -43,6 +48,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Returns the Rank * + * @api * @return int */ public function getRank() { @@ -52,6 +58,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Sets the Rank * + * @api * @param int $rank */ public function setRank($rank) { @@ -61,6 +68,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Gets the Round Points * + * @api * @return int */ public function getRoundPoints() { @@ -70,6 +78,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Sets the RoundPoints * + * @api * @param int $roundPoints */ public function setRoundPoints($roundPoints) { @@ -79,6 +88,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Gets the Map Points * + * @api * @return int */ public function getMapPoints() { @@ -88,6 +98,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable { /** * Sets the Map Points * + * @api * @param int $mapPoints */ public function setMapPoints($mapPoints) { diff --git a/core/Callbacks/Structures/Common/Models/CommonTeamScore.php b/core/Callbacks/Structures/Common/Models/CommonTeamScore.php index 037dbbfa..8b1741b5 100644 --- a/core/Callbacks/Structures/Common/Models/CommonTeamScore.php +++ b/core/Callbacks/Structures/Common/Models/CommonTeamScore.php @@ -10,6 +10,7 @@ use ManiaControl\General\UsageInformationTrait; /** * TeamScore Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -24,6 +25,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { private $matchPoints; /** + * Get the Team Id + * + * @api * @return mixed */ public function getTeamId() { @@ -31,6 +35,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Sets the TeamId + * + * @api * @param mixed $id */ public function setTeamId($id) { @@ -38,13 +45,19 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** - * @return mixed + * Gets the Name + * + * @api + * @return string */ public function getName() { return $this->name; } /** + * Sets the Name + * + * @api * @param mixed $name */ public function setName($name) { @@ -52,6 +65,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Gets the Round Points + * + * @api * @return mixed */ public function getRoundPoints() { @@ -59,6 +75,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Sets the Round Points + * + * @api * @param mixed $roundPoints */ public function setRoundPoints($roundPoints) { @@ -66,6 +85,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Gets the Map Points + * + * @api * @return mixed */ public function getMapPoints() { @@ -73,6 +95,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Sets the Mappoints + * + * @api * @param mixed $mapPoints */ public function setMapPoints($mapPoints) { @@ -80,6 +105,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Gets the Matchpoints + * + * @api * @return mixed */ public function getMatchPoints() { @@ -87,6 +115,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable { } /** + * Sets the Match Points + * + * @api * @param mixed $matchPoints */ public function setMatchPoints($matchPoints) { diff --git a/core/Callbacks/Structures/Common/StatusCallbackStructure.php b/core/Callbacks/Structures/Common/StatusCallbackStructure.php index ab20a21c..6b178387 100644 --- a/core/Callbacks/Structures/Common/StatusCallbackStructure.php +++ b/core/Callbacks/Structures/Common/StatusCallbackStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the StatusCallback Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -31,6 +32,7 @@ class StatusCallbackStructure extends BaseResponseStructure { /** * True if the Status (Like Combo Pause or Warmup) is Ongoing * + * @api * @return boolean */ public function getActive() { diff --git a/core/Callbacks/Structures/EliteBeginTurnStructure.php b/core/Callbacks/Structures/EliteBeginTurnStructure.php deleted file mode 100644 index b0eb64d0..00000000 --- a/core/Callbacks/Structures/EliteBeginTurnStructure.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright 2014-2017 ManiaControl Team - * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 - */ -class EliteBeginTurnStructure { - /* - * Private properties - */ - private $attackerLogin; - private $defenderLogins; - - /** @var ManiaControl $maniaControl */ - private $maniaControl; - - /** - * Construct a new Elite BeginTurnStructure - * - * @param ManiaControl $maniaControl - * @param array $data - */ - public function __construct(ManiaControl $maniaControl, array $data) { - $this->maniaControl = $maniaControl; - $this->attackerLogin = $data[0]; - $this->defenderLogins = $data[1]; - } - - /** - * Get the attacker - * - * @return Player - */ - public function getAttacker() { - return $this->maniaControl->getPlayerManager()->getPlayer($this->attackerLogin); - } - - /** - * Get the defenders as an Player Array - * - * @return Player[] - */ - public function getDefenders() { - $defenders = array(); - foreach (explode(";", $this->defenderLogins) as $defenderLogin) { - $defenders[] = $this->maniaControl->getPlayerManager()->getPlayer($defenderLogin); - } - - return $defenders; - } -} diff --git a/core/Callbacks/Structures/ManiaPlanet/StartEndStructure.php b/core/Callbacks/Structures/ManiaPlanet/StartEndStructure.php index 96f3f709..967b8502 100644 --- a/core/Callbacks/Structures/ManiaPlanet/StartEndStructure.php +++ b/core/Callbacks/Structures/ManiaPlanet/StartEndStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the Default Start End Callbacks * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -16,6 +17,12 @@ use ManiaControl\ManiaControl; class StartEndStructure extends BaseStructure { private $count; + /** + * StartEndStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -25,6 +32,7 @@ class StartEndStructure extends BaseStructure { /** * Get the Count of this Section * + * @api * @return int */ public function getCount() { diff --git a/core/Callbacks/Structures/ManiaPlanet/StartServerStructure.php b/core/Callbacks/Structures/ManiaPlanet/StartServerStructure.php index 6721a5a4..012d5bc5 100644 --- a/core/Callbacks/Structures/ManiaPlanet/StartServerStructure.php +++ b/core/Callbacks/Structures/ManiaPlanet/StartServerStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the Default Start Server Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -16,6 +17,12 @@ use ManiaControl\ManiaControl; class StartServerStructure extends BaseStructure { private $restarted; + /** + * StartServerStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -25,6 +32,7 @@ class StartServerStructure extends BaseStructure { /** * Flag if the Server got Restarted * + * @api * @return mixed */ public function getRestarted() { diff --git a/core/Callbacks/Structures/ShootMania/Models/Landmark.php b/core/Callbacks/Structures/ShootMania/Models/Landmark.php index 79c0847e..454edbf7 100644 --- a/core/Callbacks/Structures/ShootMania/Models/Landmark.php +++ b/core/Callbacks/Structures/ShootMania/Models/Landmark.php @@ -9,6 +9,7 @@ use ManiaControl\General\UsageInformationTrait; /** * Landmark Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -22,6 +23,7 @@ class Landmark implements UsageInformationAble { private $position = null; /** + * @api * @return string */ public function getTag() { @@ -29,6 +31,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @param string $tag */ public function setTag($tag) { @@ -36,6 +39,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @return mixed */ public function getOrder() { @@ -43,6 +47,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @param mixed $order */ public function setOrder($order) { @@ -50,6 +55,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @return mixed */ public function getId() { @@ -57,6 +63,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @param mixed $id */ public function setId($id) { @@ -64,6 +71,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @return \ManiaControl\Callbacks\Structures\ShootMania\Models\Position */ public function getPosition() { @@ -71,6 +79,7 @@ class Landmark implements UsageInformationAble { } /** + * @api * @param \ManiaControl\Callbacks\Structures\ShootMania\Models\Position $position */ public function setPosition(Position $position) { diff --git a/core/Callbacks/Structures/ShootMania/Models/PlayerScore.php b/core/Callbacks/Structures/ShootMania/Models/PlayerScore.php index 0b03101d..9a1da5eb 100644 --- a/core/Callbacks/Structures/ShootMania/Models/PlayerScore.php +++ b/core/Callbacks/Structures/ShootMania/Models/PlayerScore.php @@ -8,6 +8,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore; /** * PlayerScore Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/Models/Position.php b/core/Callbacks/Structures/ShootMania/Models/Position.php index 0fe28187..1c1c6ebf 100644 --- a/core/Callbacks/Structures/ShootMania/Models/Position.php +++ b/core/Callbacks/Structures/ShootMania/Models/Position.php @@ -9,6 +9,7 @@ use ManiaControl\General\UsageInformationTrait; /** * Position Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -21,6 +22,7 @@ class Position implements UsageInformationAble { private $z = 0; /** + * @api * @return int */ public function getX() { @@ -28,6 +30,7 @@ class Position implements UsageInformationAble { } /** + * @api * @param int $x */ public function setX($x) { @@ -35,6 +38,7 @@ class Position implements UsageInformationAble { } /** + * @api * @return int */ public function getZ() { @@ -42,6 +46,7 @@ class Position implements UsageInformationAble { } /** + * @api * @param int $z */ public function setZ($z) { @@ -49,6 +54,7 @@ class Position implements UsageInformationAble { } /** + * @api * @return int */ public function getY() { @@ -56,6 +62,7 @@ class Position implements UsageInformationAble { } /** + * @api * @param int $y */ public function setY($y) { diff --git a/core/Callbacks/Structures/ShootMania/Models/TeamScore.php b/core/Callbacks/Structures/ShootMania/Models/TeamScore.php index e1e1a80b..e4fa93d2 100644 --- a/core/Callbacks/Structures/ShootMania/Models/TeamScore.php +++ b/core/Callbacks/Structures/ShootMania/Models/TeamScore.php @@ -7,6 +7,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonTeamScore; /** * Shootmania TeamScore Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/Models/Weapons.php b/core/Callbacks/Structures/ShootMania/Models/Weapons.php index eae01a0c..b01962ff 100644 --- a/core/Callbacks/Structures/ShootMania/Models/Weapons.php +++ b/core/Callbacks/Structures/ShootMania/Models/Weapons.php @@ -5,6 +5,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania\Models; /** * Weapons Interface * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/OnActionCustomEventStructure.php b/core/Callbacks/Structures/ShootMania/OnActionCustomEventStructure.php index a2f155f2..dc2cb11f 100644 --- a/core/Callbacks/Structures/ShootMania/OnActionCustomEventStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnActionCustomEventStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnCustomEvent Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -21,6 +22,12 @@ class OnActionCustomEventStructure extends BaseStructure { private $param1; private $param2 = array(); + /** + * OnActionCustomEventStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -37,6 +44,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -46,6 +54,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * < Id of the action that triggered the event * + * @api * @return string */ public function getActionId() { @@ -55,6 +64,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * < Login of the player who shot if any * + * @api * @return \ManiaControl\Players\Player */ public function getShooter() { @@ -64,6 +74,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * < player who got hit if any * + * @api * @return \ManiaControl\Players\Player */ public function getVictim() { @@ -73,6 +84,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * < First custom param of the event * + * @api * @return string */ public function getParam1() { @@ -82,6 +94,7 @@ class OnActionCustomEventStructure extends BaseStructure { /** * < Second custom param of the event * + * @api * @return array */ public function getParam2() { diff --git a/core/Callbacks/Structures/ShootMania/OnActionEvent.php b/core/Callbacks/Structures/ShootMania/OnActionEvent.php index bc2ba11d..6218854d 100644 --- a/core/Callbacks/Structures/ShootMania/OnActionEvent.php +++ b/core/Callbacks/Structures/ShootMania/OnActionEvent.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnCustomEvent Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -18,6 +19,12 @@ class OnActionEvent extends BaseStructure { private $player; private $actionInput; + /** + * OnActionEvent constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -30,6 +37,7 @@ class OnActionEvent extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -39,6 +47,7 @@ class OnActionEvent extends BaseStructure { /** * < player who triggered the action * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { @@ -48,11 +57,10 @@ class OnActionEvent extends BaseStructure { /** * < The input pressed to trigger the action * + * @api * @return string */ public function getActionInput() { return $this->actionInput; } - - } \ No newline at end of file diff --git a/core/Callbacks/Structures/ShootMania/OnArmorEmptyStructure.php b/core/Callbacks/Structures/ShootMania/OnArmorEmptyStructure.php index e6dd43e1..23224f47 100644 --- a/core/Callbacks/Structures/ShootMania/OnArmorEmptyStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnArmorEmptyStructure.php @@ -5,6 +5,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania; /** * Structure Class for the OnArmorEmpty Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/OnCaptureStructure.php b/core/Callbacks/Structures/ShootMania/OnCaptureStructure.php index ce67790b..29d27ca3 100644 --- a/core/Callbacks/Structures/ShootMania/OnCaptureStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnCaptureStructure.php @@ -12,6 +12,7 @@ use ManiaControl\Players\Player; /** * Structure Class for the OnCapture Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -23,6 +24,12 @@ class OnCaptureStructure extends BaseStructure { private $playerArray = array(); + /** + * OnCaptureStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -47,6 +54,7 @@ class OnCaptureStructure extends BaseStructure { /** * Get the logins as Array * + * @api * @return string[] */ public function getLoginArray() { @@ -56,6 +64,7 @@ class OnCaptureStructure extends BaseStructure { /** * Get the Players as Player Array * + * @api * @return Player[] */ public function getPlayerArray() { @@ -72,6 +81,7 @@ class OnCaptureStructure extends BaseStructure { /** * Returns Information about the Captured Landmark * + * @api * @return \ManiaControl\Callbacks\Structures\ShootMania\Models\LandMark */ public function getLandMark() { diff --git a/core/Callbacks/Structures/ShootMania/OnCommandStructure.php b/core/Callbacks/Structures/ShootMania/OnCommandStructure.php index a68d69ed..286f5128 100644 --- a/core/Callbacks/Structures/ShootMania/OnCommandStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnCommandStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnCommand Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -29,6 +30,7 @@ class OnCommandStructure extends BaseStructure { /** * < Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -38,6 +40,7 @@ class OnCommandStructure extends BaseStructure { /** * < Name of the command * + * @api * @return string */ public function getName() { @@ -51,6 +54,7 @@ class OnCommandStructure extends BaseStructure { * "real": 123.456, * "text": "an example value" * + * @api * @return mixed */ public function getValue() { diff --git a/core/Callbacks/Structures/ShootMania/OnDefaultEventStructure.php b/core/Callbacks/Structures/ShootMania/OnDefaultEventStructure.php index 631890e2..4aad302b 100644 --- a/core/Callbacks/Structures/ShootMania/OnDefaultEventStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnDefaultEventStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the Default Event Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -17,6 +18,12 @@ class OnDefaultEventStructure extends BaseStructure { private $time; private $type; + /** + * OnDefaultEventStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -27,6 +34,7 @@ class OnDefaultEventStructure extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -36,6 +44,7 @@ class OnDefaultEventStructure extends BaseStructure { /** * Returns the type of event * + * @api * @return string */ public function getType() { diff --git a/core/Callbacks/Structures/ShootMania/OnEliteEndTurnStructure.php b/core/Callbacks/Structures/ShootMania/OnEliteEndTurnStructure.php index ad102341..dc4308d8 100644 --- a/core/Callbacks/Structures/ShootMania/OnEliteEndTurnStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnEliteEndTurnStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnEliteEndTurn Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/OnEliteStartTurnStructure.php b/core/Callbacks/Structures/ShootMania/OnEliteStartTurnStructure.php index 73ab6131..82a40b77 100644 --- a/core/Callbacks/Structures/ShootMania/OnEliteStartTurnStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnEliteStartTurnStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnEliteStartTurn Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -32,6 +33,7 @@ class OnEliteStartTurnStructure extends BaseStructure { } /** + * @api * @return \ManiaControl\Players\Player */ public function getAttacker() { @@ -41,6 +43,7 @@ class OnEliteStartTurnStructure extends BaseStructure { /** * Returns a Login Array of the defenders * + * @api * @return array */ public function getDefenderLogins() { @@ -50,6 +53,7 @@ class OnEliteStartTurnStructure extends BaseStructure { /** * Gets an Array of the Players * + * @api * @return \ManiaControl\Players\Player[] */ public function getDefenders() { diff --git a/core/Callbacks/Structures/ShootMania/OnFallDamageStructure.php b/core/Callbacks/Structures/ShootMania/OnFallDamageStructure.php index e6770cb9..58f8575f 100644 --- a/core/Callbacks/Structures/ShootMania/OnFallDamageStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnFallDamageStructure.php @@ -10,6 +10,7 @@ use ManiaControl\Players\Player; /** * Structure Class for the OnFallDamage Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -21,6 +22,12 @@ class OnFallDamageStructure extends BaseStructure { */ private $victim; + /** + * OnFallDamageStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -31,6 +38,7 @@ class OnFallDamageStructure extends BaseStructure { /** * < Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -40,6 +48,7 @@ class OnFallDamageStructure extends BaseStructure { /** * < Player who fell * + * @api * @return Player */ public function getVictim() { diff --git a/core/Callbacks/Structures/ShootMania/OnHitNearMissArmorEmptyBaseStructure.php b/core/Callbacks/Structures/ShootMania/OnHitNearMissArmorEmptyBaseStructure.php index d2786476..9f92a180 100644 --- a/core/Callbacks/Structures/ShootMania/OnHitNearMissArmorEmptyBaseStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnHitNearMissArmorEmptyBaseStructure.php @@ -12,6 +12,7 @@ use ManiaControl\Players\Player; /** * Structure Base Class for the OnHit/OnNearMiss/OnArmorEmpty Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -59,6 +60,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -68,6 +70,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Id of the weapon [1-Laser, 2-Rocket, 3-Nucleus, 5-Arrow] * + * @api * @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons * @return int */ @@ -78,6 +81,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Position of the Shooter at the time * + * @api * @return Position */ public function getShooterPosition() { @@ -87,6 +91,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Position of the Victim at the time * + * @api * @return \ManiaControl\Callbacks\Structures\ShootMania\Models\Position */ public function getVictimPosition() { @@ -96,6 +101,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Shooter Player * + * @api * @return Player */ public function getShooter() { @@ -105,12 +111,10 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure { /** * < Victim Player * + * @api * @return Player */ public function getVictim() { return $this->victim; } - - - } \ No newline at end of file diff --git a/core/Callbacks/Structures/ShootMania/OnHitStructure.php b/core/Callbacks/Structures/ShootMania/OnHitStructure.php index 94395dea..c4583528 100644 --- a/core/Callbacks/Structures/ShootMania/OnHitStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnHitStructure.php @@ -8,6 +8,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnHit Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -16,6 +17,12 @@ class OnHitStructure extends OnHitNearMissArmorEmptyBaseStructure { private $damage; + /** + * OnHitStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param array $data + */ public function __construct(ManiaControl $maniaControl, array $data) { parent::__construct($maniaControl, $data); @@ -25,6 +32,7 @@ class OnHitStructure extends OnHitNearMissArmorEmptyBaseStructure { /** * < Amount of Damage done by the hit (only on onHit) * + * @api * @return int */ public function getDamage() { diff --git a/core/Callbacks/Structures/ShootMania/OnJoustReloadStructure.php b/core/Callbacks/Structures/ShootMania/OnJoustReloadStructure.php index 6bca627e..15c5a99a 100644 --- a/core/Callbacks/Structures/ShootMania/OnJoustReloadStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnJoustReloadStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnJoustReload Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/OnJoustSelectedPlayersStructure.php b/core/Callbacks/Structures/ShootMania/OnJoustSelectedPlayersStructure.php index 5c83fd4b..fd713e73 100644 --- a/core/Callbacks/Structures/ShootMania/OnJoustSelectedPlayersStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnJoustSelectedPlayersStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnJoustSelectedPlayers Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -32,6 +33,7 @@ class OnJoustSelectedPlayersStructure extends BaseStructure { /** * Returns a Login Array of the Players * + * @api * @return array */ public function getPlayerLogins() { @@ -41,6 +43,7 @@ class OnJoustSelectedPlayersStructure extends BaseStructure { /** * Gets an Array of the Players * + * @api * @return \ManiaControl\Players\Player[] */ public function getPlayers() { diff --git a/core/Callbacks/Structures/ShootMania/OnNearMissStructure.php b/core/Callbacks/Structures/ShootMania/OnNearMissStructure.php index 4f74bd28..48fe75c8 100644 --- a/core/Callbacks/Structures/ShootMania/OnNearMissStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnNearMissStructure.php @@ -8,6 +8,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnNearMiss Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -24,6 +25,8 @@ class OnNearMissStructure extends OnHitNearMissArmorEmptyBaseStructure { /** * Returns the distance * + * + * @api * @return float */ public function getDistance() { diff --git a/core/Callbacks/Structures/ShootMania/OnPlayerObjectStructure.php b/core/Callbacks/Structures/ShootMania/OnPlayerObjectStructure.php index 45d5900b..cca81a2e 100644 --- a/core/Callbacks/Structures/ShootMania/OnPlayerObjectStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnPlayerObjectStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnPlayerTouchesObject Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -20,6 +21,12 @@ class OnPlayerObjectStructure extends BaseStructure { private $modelId; private $modelName; + /** + * OnPlayerObjectStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -34,6 +41,7 @@ class OnPlayerObjectStructure extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -43,6 +51,7 @@ class OnPlayerObjectStructure extends BaseStructure { /** * < Login of the player who touched the object * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { @@ -52,6 +61,7 @@ class OnPlayerObjectStructure extends BaseStructure { /** * < The id of the object * + * @api * @return string */ public function getObjectId() { @@ -61,6 +71,7 @@ class OnPlayerObjectStructure extends BaseStructure { /** * < The id of the object model * + * @api * @return string */ public function getModelId() { @@ -70,11 +81,10 @@ class OnPlayerObjectStructure extends BaseStructure { /** * < The name of the object model * + * @api * @return string */ public function getModelName() { return $this->modelName; } - - } \ No newline at end of file diff --git a/core/Callbacks/Structures/ShootMania/OnPlayerRequestActionChange.php b/core/Callbacks/Structures/ShootMania/OnPlayerRequestActionChange.php index 7586698b..f4558b52 100644 --- a/core/Callbacks/Structures/ShootMania/OnPlayerRequestActionChange.php +++ b/core/Callbacks/Structures/ShootMania/OnPlayerRequestActionChange.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnPlayerRequestActionChange Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -18,6 +19,12 @@ class OnPlayerRequestActionChange extends BaseStructure { private $player; private $actionChange; + /** + * OnPlayerRequestActionChange constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -30,6 +37,7 @@ class OnPlayerRequestActionChange extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -39,6 +47,7 @@ class OnPlayerRequestActionChange extends BaseStructure { /** * < player who requested a new action * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { @@ -48,11 +57,10 @@ class OnPlayerRequestActionChange extends BaseStructure { /** * < Can be -1 (request previous action) or 1 (request next action) * + * @api * @return string */ public function getActionChange() { return $this->actionChange; } - - } \ No newline at end of file diff --git a/core/Callbacks/Structures/ShootMania/OnPlayerRequestRespawnStructure.php b/core/Callbacks/Structures/ShootMania/OnPlayerRequestRespawnStructure.php index 1bd7c0bc..3dfbdcb2 100644 --- a/core/Callbacks/Structures/ShootMania/OnPlayerRequestRespawnStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnPlayerRequestRespawnStructure.php @@ -10,6 +10,7 @@ use ManiaControl\Players\Player; /** * Structure Class for the OnPlayerRequestRespawnStructure Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -21,6 +22,12 @@ class OnPlayerRequestRespawnStructure extends BaseStructure { */ private $player; + /** + * OnPlayerRequestRespawnStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -32,6 +39,7 @@ class OnPlayerRequestRespawnStructure extends BaseStructure { /** * Returns the Time the Event Happened * + * @api * @return int */ public function getTime() { @@ -41,6 +49,7 @@ class OnPlayerRequestRespawnStructure extends BaseStructure { /** * Gets the Player * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { diff --git a/core/Callbacks/Structures/ShootMania/OnPlayerTriggersSectorStructure.php b/core/Callbacks/Structures/ShootMania/OnPlayerTriggersSectorStructure.php index 6750d454..6f0dd162 100644 --- a/core/Callbacks/Structures/ShootMania/OnPlayerTriggersSectorStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnPlayerTriggersSectorStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnPlayerTriggersSector Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -18,7 +19,12 @@ class OnPlayerTriggersSectorStructure extends BaseStructure { private $player; private $sectorId; - + /** + * OnPlayerTriggersSectorStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -31,6 +37,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -40,6 +47,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure { /** * < player who touched the object * + * @api * @return \ManiaControl\Players\Player */ public function getPlayer() { @@ -49,6 +57,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure { /** * < Id of the triggered sector * + * @api * @return string */ public function getSectorId() { diff --git a/core/Callbacks/Structures/ShootMania/OnRoyalPointsStructure.php b/core/Callbacks/Structures/ShootMania/OnRoyalPointsStructure.php index 01b73c61..780b4c32 100644 --- a/core/Callbacks/Structures/ShootMania/OnRoyalPointsStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnRoyalPointsStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnRoyalPoints Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -56,6 +57,7 @@ class OnRoyalPointsStructure extends BaseStructure { /** * Gets the number of points scored * + * @api * @return int */ public function getPoints() { diff --git a/core/Callbacks/Structures/ShootMania/OnScoresStructure.php b/core/Callbacks/Structures/ShootMania/OnScoresStructure.php index 53334379..21c60a6b 100644 --- a/core/Callbacks/Structures/ShootMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnScoresStructure.php @@ -11,13 +11,19 @@ use ManiaControl\ManiaControl; /** * Structure Class for the Shootmania OnScores Structure Callback - * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 */ class OnScoresStructure extends CommonScoresStructure { + /** + * OnScoresStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); diff --git a/core/Callbacks/Structures/ShootMania/OnShootStructure.php b/core/Callbacks/Structures/ShootMania/OnShootStructure.php index 45df3dc5..a9f02ebd 100644 --- a/core/Callbacks/Structures/ShootMania/OnShootStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnShootStructure.php @@ -10,6 +10,7 @@ use ManiaControl\Players\Player; /** * Structure Class for the OnShoot Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/ShootMania/OnShotDenyStructure.php b/core/Callbacks/Structures/ShootMania/OnShotDenyStructure.php index 001659d0..7fe259e0 100644 --- a/core/Callbacks/Structures/ShootMania/OnShotDenyStructure.php +++ b/core/Callbacks/Structures/ShootMania/OnShotDenyStructure.php @@ -10,6 +10,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the OnShotDeny Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -43,6 +44,7 @@ class OnShotDenyStructure extends BaseStructure { /** * ServerTime The Event Happened //TODO add Trait for the Time Property * + * @api * @return int */ public function getTime() { @@ -53,6 +55,7 @@ class OnShotDenyStructure extends BaseStructure { /** * Gets the Shooter Player * + * @api * @return \ManiaControl\Players\Player */ public function getShooter() { @@ -62,6 +65,7 @@ class OnShotDenyStructure extends BaseStructure { /** * Gets the Victim Player * + * @api * @return \ManiaControl\Players\Player */ public function getVictim() { @@ -69,7 +73,11 @@ class OnShotDenyStructure extends BaseStructure { } /** - * @return mixed + * Gets the Shooter Weapon + * + * @api + * @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons + * @return int Weapon */ public function getShooterWeapon() { return $this->shooterWeapon; @@ -78,6 +86,7 @@ class OnShotDenyStructure extends BaseStructure { /** * Get the Victim Weapon * + * @api * @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons * @return int */ diff --git a/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php b/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php index bc4b1f71..300cfd51 100644 --- a/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php +++ b/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php @@ -4,11 +4,12 @@ namespace ManiaControl\Callbacks\Structures\TrackMania\Models; use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore; -use ManiaControl\Players\Player; //TODO proper return descriptions on getter methods -> use autogenerate for setter/getter + docs + /** * PlayerScore Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -26,6 +27,7 @@ class PlayerScore extends CommonPlayerScore { /** * Returns the Rank * + * @api * @return int */ public function getRank() { @@ -35,6 +37,7 @@ class PlayerScore extends CommonPlayerScore { /** * Sets the Rank * + * @api * @param int $rank */ public function setRank($rank) { @@ -42,35 +45,38 @@ class PlayerScore extends CommonPlayerScore { } - /** - * Gets the bestRaceTime - * - * @param int $bestraceTime - */ - public function getBestraceTime(){ + * Gets the bestRaceTime + * + * @api + * @param int $bestraceTime + */ + public function getBestraceTime() { return $this->bestRaceTime; } /** - * Gets the bestlapTime - * - * @param int $bestlapTime - */ - public function getBestlapTime(){ + * Gets the bestlapTime + * + * @api + * @param int $bestlapTime + */ + public function getBestlapTime() { return $this->bestLapTime; } - + /** - * Gets the StuntScore - * - * @param int $bestraceTime - */ - public function getStuntScore(){ + * Gets the StuntScore + * + * @api + * @param int $bestraceTime + */ + public function getStuntScore() { return $this->stuntScore; } /** + * @api * @param mixed $bestRaceTime */ public function setBestRaceTime($bestRaceTime) { @@ -78,6 +84,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @param mixed $bestLapTime */ public function setBestLapTime($bestLapTime) { @@ -85,6 +92,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @param mixed $stuntScore */ public function setStuntScore($stuntScore) { @@ -92,6 +100,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @return mixed */ public function getBestRaceRespawns() { @@ -99,6 +108,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @param mixed $bestRaceRespawns */ public function setBestRaceRespawns($bestRaceRespawns) { @@ -106,6 +116,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @return mixed */ public function getBestRaceCheckpoints() { @@ -113,6 +124,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @param mixed $bestRaceCheckpoints */ public function setBestRaceCheckpoints($bestRaceCheckpoints) { @@ -120,6 +132,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @return mixed */ public function getBestLapRespawns() { @@ -134,6 +147,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @return mixed */ public function getBestLapCheckpoints() { @@ -141,6 +155,7 @@ class PlayerScore extends CommonPlayerScore { } /** + * @api * @param mixed $bestLapCheckpoints */ public function setBestLapCheckpoints($bestLapCheckpoints) { diff --git a/core/Callbacks/Structures/TrackMania/Models/TeamScore.php b/core/Callbacks/Structures/TrackMania/Models/TeamScore.php index 756721b9..b9cc170f 100644 --- a/core/Callbacks/Structures/TrackMania/Models/TeamScore.php +++ b/core/Callbacks/Structures/TrackMania/Models/TeamScore.php @@ -7,6 +7,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonTeamScore; /** * Shootmania TeamScore Model * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 diff --git a/core/Callbacks/Structures/TrackMania/OnCommandStructure.php b/core/Callbacks/Structures/TrackMania/OnCommandStructure.php index 965c8a7d..cd43be0a 100644 --- a/core/Callbacks/Structures/TrackMania/OnCommandStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnCommandStructure.php @@ -5,10 +5,11 @@ namespace ManiaControl\Callbacks\Structures\TrackMania; use ManiaControl\Callbacks\Structures\Common\BaseStructure; use ManiaControl\ManiaControl; - +//TODO make a common structure between shootmania and this and extend it /** * Structure Class for the OnCommand Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -18,6 +19,12 @@ class OnCommandStructure extends BaseStructure { private $name; private $value; + /** + * OnCommandStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); @@ -29,6 +36,7 @@ class OnCommandStructure extends BaseStructure { /** * < Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -38,6 +46,7 @@ class OnCommandStructure extends BaseStructure { /** * < Name of the command * + * @api * @return string */ public function getName() { @@ -51,6 +60,7 @@ class OnCommandStructure extends BaseStructure { * "real": 123.456, * "text": "an example value" * + * @api * @return mixed */ public function getValue() { diff --git a/core/Callbacks/Structures/TrackMania/OnDefaultEventStructure.php b/core/Callbacks/Structures/TrackMania/OnDefaultEventStructure.php index d593e2ae..c02f7818 100644 --- a/core/Callbacks/Structures/TrackMania/OnDefaultEventStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnDefaultEventStructure.php @@ -17,6 +17,12 @@ class OnDefaultEventStructure extends BaseStructure { private $time; private $type; + /** + * OnDefaultEventStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); diff --git a/core/Callbacks/Structures/TrackMania/OnEventStartLineStructure.php b/core/Callbacks/Structures/TrackMania/OnEventStartLineStructure.php index 5c7c4dd8..7d19ffb8 100644 --- a/core/Callbacks/Structures/TrackMania/OnEventStartLineStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnEventStartLineStructure.php @@ -9,6 +9,7 @@ use ManiaControl\ManiaControl; /** * Structure Class for the EventStartLine Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -20,13 +21,14 @@ class OnEventStartLineStructure extends BaseStructure { public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); - $this->time = $this->getPlainJsonObject()->time; + $this->time = $this->getPlainJsonObject()->time; $this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login); } /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -34,10 +36,11 @@ class OnEventStartLineStructure extends BaseStructure { } /** - * < player who triggered the action - * - * @return \ManiaControl\Players\Player - */ + * < player who triggered the action + * + * @api + * @return \ManiaControl\Players\Player + */ public function getPlayer() { return $this->player; } diff --git a/core/Callbacks/Structures/TrackMania/OnEventWayPointStructure.php b/core/Callbacks/Structures/TrackMania/OnEventWayPointStructure.php index dae44e2a..7c1bd310 100644 --- a/core/Callbacks/Structures/TrackMania/OnEventWayPointStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnEventWayPointStructure.php @@ -3,14 +3,15 @@ namespace ManiaControl\Callbacks\Structures\TrackMania; -use ManiaControl\Callbacks\Structures\Common\BaseStructure; use ManiaControl\Callbacks\Models\RecordCallback; +use ManiaControl\Callbacks\Structures\Common\BaseStructure; use ManiaControl\ManiaControl; use ManiaControl\Utils\Formatter; /** * Structure Class for the Default Event Structure Callback * + * @api * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -29,22 +30,28 @@ class OnEventWayPointStructure extends BaseStructure { private $speed; private $distance; + /** + * OnEventWayPointStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); - $this->time = $this->getPlainJsonObject()->time; - $this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login); - $this->racetime = (int) $this->getPlainJsonObject()->racetime; - $this->laptime = (int) $this->getPlainJsonObject()->laptime; - $this->stuntsscore = $this->getPlainJsonObject()->stuntsscore; + $this->time = $this->getPlainJsonObject()->time; + $this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login); + $this->racetime = (int) $this->getPlainJsonObject()->racetime; + $this->laptime = (int) $this->getPlainJsonObject()->laptime; + $this->stuntsscore = $this->getPlainJsonObject()->stuntsscore; $this->checkpointinrace = (int) $this->getPlainJsonObject()->checkpointinrace; - $this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap; - $this->isendrace = $this->getPlainJsonObject()->isendrace; - $this->isendlap = $this->getPlainJsonObject()->isendlap; - $this->blockid = $this->getPlainJsonObject()->blockid; - $this->speed = $this->getPlainJsonObject()->speed; - $this->distance = $this->getPlainJsonObject()->distance; - + $this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap; + $this->isendrace = $this->getPlainJsonObject()->isendrace; + $this->isendlap = $this->getPlainJsonObject()->isendlap; + $this->blockid = $this->getPlainJsonObject()->blockid; + $this->speed = $this->getPlainJsonObject()->speed; + $this->distance = $this->getPlainJsonObject()->distance; + // Build callback $wayPointCallback = new RecordCallback(); $wayPointCallback->rawCallback = $data; @@ -74,6 +81,7 @@ class OnEventWayPointStructure extends BaseStructure { /** * Returns Server time when the event occured * + * @api * @return int */ public function getTime() { @@ -81,12 +89,13 @@ class OnEventWayPointStructure extends BaseStructure { } /** - * < player who triggered the action - * - * @return \ManiaControl\Players\Player - */ + * < player who triggered the action + * + * @api + * @return \ManiaControl\Players\Player + */ public function getPlayer() { return $this->player; } - + } \ No newline at end of file diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index 0cad0960..ff23352a 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -16,6 +16,12 @@ use ManiaControl\ManiaControl; */ class OnScoresStructure extends CommonScoresStructure { + /** + * OnScoresStructure constructor. + * + * @param \ManiaControl\ManiaControl $maniaControl + * @param $data + */ public function __construct(ManiaControl $maniaControl, $data) { parent::__construct($maniaControl, $data); diff --git a/core/Callbacks/Structures/VictoryTypes.php b/core/Callbacks/Structures/VictoryTypes.php deleted file mode 100644 index cd3e4555..00000000 --- a/core/Callbacks/Structures/VictoryTypes.php +++ /dev/null @@ -1,18 +0,0 @@ - - * @copyright 2014-2017 ManiaControl Team - * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 - * @deprecated see ManiaControl\Callbacks\Structures\ShootMania\Models\VictoryTypes - */ -interface VictoryTypes { - const TIME_LIMIT = 1; - const CAPTURE = 2; - const ATTACKER_ELIMINATED = 3; - const DEFENDERS_ELIMINATED = 4; -} diff --git a/core/Callbacks/Structures/Weapons.php b/core/Callbacks/Structures/Weapons.php deleted file mode 100644 index c2510e39..00000000 --- a/core/Callbacks/Structures/Weapons.php +++ /dev/null @@ -1,18 +0,0 @@ - - * @copyright 2014-2017 ManiaControl Team - * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 - * @deprecated use ShootMania/Models/Weapons instead - */ -interface Weapons { - const LASER = 1; - const ROCKET = 2; - const NUCLEUS = 3; - const ARROW = 5; -}