diff --git a/src/Listeners/Base.php b/src/Listeners/Base.php index b74340d..3f37702 100644 --- a/src/Listeners/Base.php +++ b/src/Listeners/Base.php @@ -1,7 +1,20 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; +/** + * This class describes a base. + * + * {@inheritDoc} + */ class Base { /** diff --git a/src/Listeners/OrderCompleted.php b/src/Listeners/OrderCompleted.php index 80e6c01..c858c99 100644 --- a/src/Listeners/OrderCompleted.php +++ b/src/Listeners/OrderCompleted.php @@ -1,26 +1,35 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; use TwentyTwoDigital\CashierFastspring\Events; use TwentyTwoDigital\CashierFastspring\Invoice; /** - * This class is a listener for order completed events. - * - * It updates or creates related order model so that you can show payment - * and bill details to your customers. + * This class describes an order completed. * * Note: "order.completed" event is works just at creation for subscription products. - * * IMPORTANT: This class handles expansion enabled webhooks + * + * {@inheritDoc} */ class OrderCompleted extends Base { /** * Create the event listener. * - * @return void + * @return null */ public function __construct() { @@ -36,8 +45,8 @@ public function __construct() */ public function handle(Events\OrderCompleted $event) { - // try to find that invoice on the database - // if not exists then create one + // Try to find that invoice on the database if not exists then create + // one $data = $event->data; $subscription = $data['items'][0]['subscription']; diff --git a/src/Listeners/SubscriptionActivated.php b/src/Listeners/SubscriptionActivated.php index a269aa0..26d77a5 100644 --- a/src/Listeners/SubscriptionActivated.php +++ b/src/Listeners/SubscriptionActivated.php @@ -1,4 +1,13 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; @@ -7,7 +16,8 @@ use TwentyTwoDigital\CashierFastspring\SubscriptionPeriod; /** - * This class is a listener for subscription state change events. + * This class describes a subscription activated. + * * It is planned to listen following fastspring events: * - subscription.canceled * - subscription.deactivated @@ -15,13 +25,15 @@ * It updates related subscription event. * * IMPORTANT: This class handles expansion enabled webhooks. + * + * {@inheritDoc} */ class SubscriptionActivated extends Base { /** * Create the event listener. * - * @return void + * @return null */ public function __construct() { diff --git a/src/Listeners/SubscriptionChargeCompleted.php b/src/Listeners/SubscriptionChargeCompleted.php index 45fc4f9..8d5ad32 100644 --- a/src/Listeners/SubscriptionChargeCompleted.php +++ b/src/Listeners/SubscriptionChargeCompleted.php @@ -1,5 +1,13 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; use TwentyTwoDigital\CashierFastspring\Events; @@ -14,13 +22,15 @@ * and bill details to your customers. * * IMPORTANT: This class handles expansion enabled webhooks. + * + * {@inheritDoc} */ class SubscriptionChargeCompleted extends Base { /** * Create the event listener. * - * @return void + * @return null */ public function __construct() { diff --git a/src/Listeners/SubscriptionDeactivated.php b/src/Listeners/SubscriptionDeactivated.php index 83c648f..e40e438 100644 --- a/src/Listeners/SubscriptionDeactivated.php +++ b/src/Listeners/SubscriptionDeactivated.php @@ -1,5 +1,13 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; use TwentyTwoDigital\CashierFastspring\Events; @@ -8,13 +16,15 @@ /** * This class is a listener for subscription deactivation events. * It deactivated fastspring subscription and create another local, free one. + * + * {@inheritDoc} */ class SubscriptionDeactivated extends Base { /** * Create the event listener. * - * @return void + * @return null */ public function __construct() { diff --git a/src/Listeners/SubscriptionStateChanged.php b/src/Listeners/SubscriptionStateChanged.php index 28f9d63..b8d5eb6 100644 --- a/src/Listeners/SubscriptionStateChanged.php +++ b/src/Listeners/SubscriptionStateChanged.php @@ -1,5 +1,13 @@ + * @author Justin Hartman + * @copyright 2019 22 Digital + * @license MIT + * @since v0.1 + */ namespace TwentyTwoDigital\CashierFastspring\Listeners; use TwentyTwoDigital\CashierFastspring\Events; @@ -13,13 +21,15 @@ * It updates related subscription event. * * IMPORTANT: This class handles expansion enabled webhooks. + * + * {@inheritDoc} */ class SubscriptionStateChanged extends Base { /** * Create the event listener. * - * @return void + * @return null */ public function __construct() {