Skip to content

Commit

Permalink
Merge pull request #152 from lucasmichot/feature/fix-undefined-param-…
Browse files Browse the repository at this point in the history
…types

Fix all undefined param types.
  • Loading branch information
Alexandru Bucur committed Mar 9, 2021
2 parents b0304c5 + 0ed9dd1 commit bfcb89b
Show file tree
Hide file tree
Showing 28 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion src/MessageBird/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function __construct($accessKey = null, Common\HttpClient $httpClient = n
}

/**
* @param $accessKey
* @param mixed $accessKey
*/
public function setAccessKey ($accessKey)
{
Expand Down
2 changes: 1 addition & 1 deletion src/MessageBird/Common/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Authentication
public $accessKey;

/**
* @param $accessKey
* @param mixed $accessKey
*/
public function __construct($accessKey)
{
Expand Down
6 changes: 3 additions & 3 deletions src/MessageBird/Common/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ public function setHeaders(array $headers)
}

/**
* @param $key
* @param $value
* @param mixed $option
* @param mixed $value
*/
public function addHttpOption($option, $value)
{
$this->httpOptions[$option] = $value;
}

/**
* @param $option
* @param mixed $option
* @return mixed|null
*/
public function getHttpOption($option)
Expand Down
4 changes: 2 additions & 2 deletions src/MessageBird/Common/ResponseError.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ResponseError
* Load the error data into an array.
* Throw an exception when important errors are found.
*
* @param $body
* @param mixed $body
*
* @throws Exceptions\AuthenticateException
* @throws Exceptions\BalanceException
Expand Down Expand Up @@ -64,7 +64,7 @@ public function __construct($body)
/**
* Get the exception message for the provided error.
*
* @param $error
* @param mixed $error
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/MessageBird/Objects/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Base
{
/**
* @param $object
* @param mixed $object
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/MessageBird/Objects/Chat/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Channel extends Base
/**
* The date and time the object was deleted
*
* @var
* @var string
*/
protected $deletedAt;

Expand All @@ -80,4 +80,4 @@ class Channel extends Base
*/
protected $_links = [];

}
}
6 changes: 3 additions & 3 deletions src/MessageBird/Objects/Chat/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class Message extends Base

/**
* The date and time the object was last updated.
*
*
* @var string
*/
protected $updatedAt;

/**
* The URI of the media file contained in the message. Used when type is one of mage, audio or video.
*
* @var
* @var string
*/
protected $mediaPath;

Expand All @@ -80,4 +80,4 @@ public function getId()
{
return $this->id;
}
}
}
4 changes: 2 additions & 2 deletions src/MessageBird/Objects/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function getCustomDetails()
}

/**
* @param $object
* @param mixed $object
*
* @return $this
*/
Expand All @@ -170,7 +170,7 @@ public function loadFromArray($object)
}

/**
* @param $object
* @param mixed $object
*
* @return $this ->object
*/
Expand Down
10 changes: 5 additions & 5 deletions src/MessageBird/Objects/Conversation/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Contact extends Base
/**
* A unique ID generated by the MessageBird platform that identifies the
* contact.
*
*
* @var string
*/
public $id;
Expand All @@ -26,7 +26,7 @@ class Contact extends Base

/**
* The MSISDN/phone number of this contact.
*
*
* @var string
*/
public $msisdn;
Expand All @@ -43,7 +43,7 @@ class Contact extends Base

/**
* An associative array containing additional details about this contact.
*
*
* @var array
*/
public $customDetails;
Expand All @@ -59,13 +59,13 @@ class Contact extends Base
/**
* The date and time when this contact was most recently updated in
* RFC3339 format.
*
*
* @var string
*/
public $updatedDatetime;

/**
* @param $object
* @param mixed $object
*
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions src/MessageBird/Objects/Conversation/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ class Content extends Base implements JsonSerializable
public $hsm;

/**
* @param $object
* @param mixed $object
*
* @return $this
*/
public function loadFromArray($object)
{
// Text is already properly set if available due to the response's structure.
parent::loadFromArray($object);

$this->loadLocationIfNeeded();
$this->loadMediaIfNeeded();

Expand Down Expand Up @@ -111,7 +111,7 @@ private function loadMediaIfNeeded()
public function jsonSerialize()
{
$json = [];

foreach (get_object_vars($this) as $key => $value) {
if (!empty($value)) {
$json[$key] = $value;
Expand Down
18 changes: 9 additions & 9 deletions src/MessageBird/Objects/Conversation/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class Conversation extends Base
/**
* A unique ID generated by the MessageBird platform that identifies the
* conversation.
*
*
* @var string
*/
public $id;

/**
* The URL of this conversation object.
*
*
* @var string
*/
public $href;
Expand All @@ -38,7 +38,7 @@ class Conversation extends Base
* @var Contact
*/
public $contact;

/**
* Associative array of Channels that the contact of this conversation can
* be reached on.
Expand All @@ -50,30 +50,30 @@ class Conversation extends Base
/**
* The status of this conversation. This can be either 'active' or
* 'archived'.
*
*
* @var string
*/
public $status;

/**
* Object that references the messages and the count belonging to this
* conversation.
*
*
* @var MessageReference
*/
public $messages;

/**
* Unique ID that references the last channel used for this conversation.
*
*
* @var string
*/
public $lastUsedChannelId;

/**
* The date and time when the most recent message was added to this
* conversation in RFC3339 format.
*
*
* @var string
*/
public $lastReceivedDatetime;
Expand All @@ -90,13 +90,13 @@ class Conversation extends Base
* The date and time when this conversation was most recently updated in
* RFC3339 format. This applies only to changes of the Conversation object
* itself, not messages, i.e. currently just status changes.
*
*
* @var string
*/
public $updatedDatetime;

/**
* @param $object
* @param mixed $object
*
* @return self
*/
Expand Down
20 changes: 10 additions & 10 deletions src/MessageBird/Objects/Conversation/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ class Message extends Base implements JsonSerializable
/**
* A unique ID generated by the MessageBird platform that identifies this
* message.
*
*
* @var string
*/
public $id;

/**
* The unique ID that identifies the conversation that this message is a
* part of.
*
*
* @var string
*/
public $conversationId;

/**
* The unique ID that identifies the channel that the message is sent or
* received on.
*
*
* @var string
*/
public $channelId;
Expand All @@ -42,7 +42,7 @@ class Message extends Base implements JsonSerializable
* The direction of the message. Either 'sent' (mobile-terminated) for
* outbound messages sent through the API or 'received' (mobile-originated)
* for inbound messages from the contact.
*
*
* @var string
*/
public $direction;
Expand All @@ -51,22 +51,22 @@ class Message extends Base implements JsonSerializable
* The status of the message. Possible values: "pending", "received",
* "sent", "delivered", "read", "unsupported", "failed" and
* "pending_media".
*
*
* @var string
*/
public $status;

/**
* Type of this message's content. Possible values: "text", "image",
* "audio", "video", "file", "location".
*
*
* @var string
*/
public $type;

/**
* Content of the message. Implementation dependent on this message's type.
*
*
* @var Content
*/
public $content;
Expand All @@ -89,13 +89,13 @@ class Message extends Base implements JsonSerializable
/**
* The date and time when this message was most recently updated in
* RFC3339 format.
*
*
* @var string
*/
public $updatedDatetime;

/**
* @param $object
* @param mixed $object
*
* @return self
*/
Expand All @@ -117,7 +117,7 @@ public function loadFromArray($object)
public function jsonSerialize()
{
$json = [];

foreach (get_object_vars($this) as $key => $value) {
if (!empty($value)) {
$json[$key] = $value;
Expand Down
2 changes: 1 addition & 1 deletion src/MessageBird/Objects/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function getUpdatedDatetime()
}

/**
* @param $object
* @param mixed $object
*
* @return $this|void
*/
Expand Down

0 comments on commit bfcb89b

Please sign in to comment.