diff options
author | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-16 11:52:06 +0100 |
---|---|---|
committer | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-16 11:52:06 +0100 |
commit | 3629f3f2c4af0fa6b6e7d736b8001afc2bbdb747 (patch) | |
tree | 2aa88492e465ca202ce0bd0d6d8f18c89346f8b6 /src | |
parent | 1f4adfe1455fe8fbaf1c8acd7524fe15307d5a01 (diff) | |
download | ip1-php-sdk-3629f3f2c4af0fa6b6e7d736b8001afc2bbdb747.zip ip1-php-sdk-3629f3f2c4af0fa6b6e7d736b8001afc2bbdb747.tar.gz ip1-php-sdk-3629f3f2c4af0fa6b6e7d736b8001afc2bbdb747.tar.bz2 |
Fixed issue #15
Signed-off-by: Hannes Kindströmmer <hannes@kindstrommer.se>
Diffstat (limited to 'src')
-rw-r--r-- | src/Core/Communicator.php | 8 | ||||
-rw-r--r-- | src/Core/UpdatableComponentInterface.php (renamed from src/Core/UpdatableComponent.php) | 2 | ||||
-rw-r--r-- | src/Recipient/ProcessedContact.php | 4 | ||||
-rw-r--r-- | src/Recipient/ProcessedGroup.php | 4 | ||||
-rw-r--r-- | src/SMS/LoggedOutGoingSMS.php | 4 | ||||
-rw-r--r-- | src/SMS/ProcessedOutGoingSMS.php | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/Core/Communicator.php b/src/Core/Communicator.php index cdf0d79..0764df1 100644 --- a/src/Core/Communicator.php +++ b/src/Core/Communicator.php @@ -13,7 +13,7 @@ namespace IP1\RESTClient\Core; use IP1\RESTClient\Recipient\RecipientFactory; use IP1\RESTClient\Core\ProcessedComponentInterface; -use IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponentInterface; use IP1\RESTClient\Core\ProcessableComponentInterface; /** @@ -94,11 +94,11 @@ class Communicator } /** * Edits the param to the API and returns the response as the corresponding object. - * @param UpdatableComponent $component A Contact, Group, Membership. - * @return UpdatableComponent ProcessedContact, ProcessedGroup or PrcessedMembership. + * @param UpdatableComponentInterface $component A Contact, Group, Membership. + * @return UpdatableComponentInterface ProcessedContact, ProcessedGroup or PrcessedMembership. * @throws \InvalidArgumentException When param isn't any of the classes listed in param args. */ - public function edit(UpdatableComponent $component): UpdatableComponent + public function edit(UpdatableComponentInterface $component): UpdatableComponentInterface { switch (get_class($component)) { case "IP1\RESTClient\Recipient\ProcessedContact": diff --git a/src/Core/UpdatableComponent.php b/src/Core/UpdatableComponentInterface.php index 9809a83..7ed353f 100644 --- a/src/Core/UpdatableComponent.php +++ b/src/Core/UpdatableComponentInterface.php @@ -16,7 +16,7 @@ namespace IP1\RESTClient\Core; * that class implements this interface. * @package \IP1\RESTClient\Core */ -interface UpdatableComponent extends ProcessedComponentInterface +interface UpdatableComponentInterface extends ProcessedComponentInterface { /** * Returns when the component was updated last. diff --git a/src/Recipient/ProcessedContact.php b/src/Recipient/ProcessedContact.php index 5408dee..7a32670 100644 --- a/src/Recipient/ProcessedContact.php +++ b/src/Recipient/ProcessedContact.php @@ -11,7 +11,7 @@ */ namespace IP1\RESTClient\Recipient; -use IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponentInterface; use IP1\RESTClient\Recipient\Membership; use IP1\RESTClient\Recipient\RecipientFactory; use IP1\RESTClient\Recipient\MembershipRelation; @@ -21,7 +21,7 @@ use IP1\RESTClient\Core\ClassValidationArray; /** * A Contact that has been added to the API. Has all the options that a normal Contact has. */ -class ProcessedContact extends Contact implements UpdatableComponent, MembershipRelation +class ProcessedContact extends Contact implements UpdatableComponentInterface, MembershipRelation { /** * The ID of the Contact given by the API. diff --git a/src/Recipient/ProcessedGroup.php b/src/Recipient/ProcessedGroup.php index 514a69b..ecd1dc6 100644 --- a/src/Recipient/ProcessedGroup.php +++ b/src/Recipient/ProcessedGroup.php @@ -12,14 +12,14 @@ namespace IP1\RESTClient\Recipient; use IP1\RESTClient\Core\Communicator; -use IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponentInterface; use IP1\RESTClient\Core\ClassValidationArray; use IP1\RESTClient\Recipient\ProcessedMembership; /** * */ -class ProcessedGroup extends Group implements UpdatableComponent, MembershipRelation +class ProcessedGroup extends Group implements UpdatableComponentInterface, MembershipRelation { /** * The ID of the Group given by the API. diff --git a/src/SMS/LoggedOutGoingSMS.php b/src/SMS/LoggedOutGoingSMS.php index 9b1fcf2..eccf260 100644 --- a/src/SMS/LoggedOutGoingSMS.php +++ b/src/SMS/LoggedOutGoingSMS.php @@ -11,12 +11,12 @@ */ namespace IP1\RESTClient\SMS; -use IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponentInterface; /** * The response you will get when sending an OutGoingSMS. One instance per recipient. */ -class LoggedOutGoingSMS extends ProcessedOutGoingSMS implements UpdatableComponent +class LoggedOutGoingSMS extends ProcessedOutGoingSMS implements UpdatableComponentInterface { /** * Stores when the sms was created in UTC. diff --git a/src/SMS/ProcessedOutGoingSMS.php b/src/SMS/ProcessedOutGoingSMS.php index b6e56d7..7e19c3f 100644 --- a/src/SMS/ProcessedOutGoingSMS.php +++ b/src/SMS/ProcessedOutGoingSMS.php @@ -12,12 +12,12 @@ namespace IP1\RESTClient\SMS; -use IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponentInterface; /** * The response from the API when you post an SMS to the API */ -class ProcessedOutGoingSMS extends SMS implements UpdatableComponent +class ProcessedOutGoingSMS extends SMS implements UpdatableComponentInterface { /** * The ID of the SMS provided by the API. |