From 9d25f15a3db92c322938a6b2559c6c41c60ffed8 Mon Sep 17 00:00:00 2001 From: CyanoFresh Date: Tue, 10 Oct 2017 16:54:30 +0300 Subject: [PATCH] Added some phpdocs for trade offers --- TradeOffers.php | 2 +- TradeOffers/Trade.php | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/TradeOffers.php b/TradeOffers.php index 3a0bb86..4745449 100644 --- a/TradeOffers.php +++ b/TradeOffers.php @@ -358,7 +358,7 @@ public function cancelTradeById($tradeOfferId) /** * Shortcut for creating a new trade offer with a user. - * @param mixed $accountId Account ID of the user you want to create a trade with. + * @param string $accountId Account ID of the user you want to create a trade with. * @return Trade */ public function createTrade($accountId) diff --git a/TradeOffers/Trade.php b/TradeOffers/Trade.php index 8d9f8fd..2c59824 100644 --- a/TradeOffers/Trade.php +++ b/TradeOffers/Trade.php @@ -43,6 +43,13 @@ public function jsonSerialize() ]; } + /** + * @param int $appId + * @param int $contextId + * @param string $assetId + * @param int $amount + * @return bool + */ public function addMyItem($appId, $contextId, $assetId, $amount = 1) { $asset = new TradeAsset($appId, $contextId, $assetId, $amount); @@ -54,6 +61,13 @@ public function addMyItemByAsset(TradeAsset $asset) return $this->me->addItem($asset); } + /** + * @param int $appId + * @param int $contextId + * @param string $assetId + * @param int $amount + * @return bool + */ public function addOtherItem($appId, $contextId, $assetId, $amount = 1) { $asset = new TradeAsset($appId, $contextId, $assetId, $amount); @@ -133,7 +147,7 @@ public function getMessage() } /** - * @param string $message + * @param string $message Max length is 128 characters */ public function setMessage($message) {