diff options
author | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-04-19 10:43:03 +0200 |
---|---|---|
committer | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-04-19 10:43:03 +0200 |
commit | e5b30e7eb10a0dd5c6ccea61c63f1cb536c55223 (patch) | |
tree | c1ba45ccda01de4260435bace21fb4dcd0619a27 /src | |
parent | 9325808ddc4d7b90cf635238fc9c7837741001e4 (diff) | |
download | ip1-php-sdk-e5b30e7eb10a0dd5c6ccea61c63f1cb536c55223.zip ip1-php-sdk-e5b30e7eb10a0dd5c6ccea61c63f1cb536c55223.tar.gz ip1-php-sdk-e5b30e7eb10a0dd5c6ccea61c63f1cb536c55223.tar.bz2 |
Remove return type from Communicator::add method
The return type of the Communicator::add method has been removed as the return type can be as mentioned in the PHPDocs 'ProcessedComponentInterface ProcessedContact, ProcessedGroup, PrcessedMembership or a ClassValidatinArray' all the return tyes except ClassValidationArray implements ProcessedComponentInterface and ClassValidationArray will not implement that interface either because it doesn't work that way.
As said what is returned by the method in question is still mentioned in the PHPdocs.
Signed-off-by: Hannes Kindströmmer <hannes@kindstrommer.se>
Diffstat (limited to 'src')
-rw-r--r-- | src/Core/Communicator.php | 2 | ||||
-rw-r--r-- | src/Recipient/RecipientFactory.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Core/Communicator.php b/src/Core/Communicator.php index f936681..7ccfb61 100644 --- a/src/Core/Communicator.php +++ b/src/Core/Communicator.php @@ -57,7 +57,7 @@ class Communicator * filled with ProcessedOutGoingSMS. * @throws \InvalidArgumentException When param isn't any of the classes listed in param args. */ - public function add(ProcessableComponentInterface $component): ProcessedComponentInterface + public function add(ProcessableComponentInterface $component) { switch (get_class($component)) { case "IP1\RESTClient\Recipient\Contact": diff --git a/src/Recipient/RecipientFactory.php b/src/Recipient/RecipientFactory.php index 24d378a..b172196 100644 --- a/src/Recipient/RecipientFactory.php +++ b/src/Recipient/RecipientFactory.php @@ -227,8 +227,8 @@ class RecipientFactory $stdClassSMS->Message, $stdClassSMS->To, $stdClassSMS->ID, - new \DateTime($stdClassSMS->Created), - new \DateTime($stdClassSMS->Updated), + new \DateTime($stdClassSMS->Created ?? null), + new \DateTime($stdClassSMS->Updated ?? null), $stdClassSMS->Status, $stdClassSMS->StatusDescription, $stdClassSMS->BundleID |