Skip to content

Commit

Permalink
https://github.com/thehcginstitute-com/m1/issues/590
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed May 2, 2024
1 parent 5446867 commit 7a8a656
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/code/community/Ebizmarts/MailChimp/Model/ProcessWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function __construct() {
$this->_interestGroupHandle = Mage::getModel('mailchimp/api_subscribers_InterestGroupHandle');
}

function saveWebhookRequest(array $data) {
function saveWebhookRequest(array $data):void {
Mage::getModel('mailchimp/webhookrequest')
->setType($data['type'])
->setFiredAt($data['fired_at'])
Expand All @@ -31,7 +31,7 @@ function saveWebhookRequest(array $data) {
*
* @return void
*/
function processWebhookData()
function processWebhookData():void
{
$collection = Mage::getModel('mailchimp/webhookrequest')->getCollection();
$collection->addFieldToFilter('processed', array('eq' => 0));
Expand Down Expand Up @@ -66,7 +66,7 @@ function processWebhookData()
/**
* @param $webhookRequest
*/
private function _saveProcessedWebhook($webhookRequest)
private function _saveProcessedWebhook($webhookRequest):void
{
$webhookRequest->setProcessed(1)->save();
}
Expand All @@ -77,7 +77,7 @@ private function _saveProcessedWebhook($webhookRequest)
* @param array $data
* @return void
*/
private function _updateEmail(array $data)
private function _updateEmail(array $data):void
{
$helper = $this->getHelper();
$listId = $data['list_id'];
Expand Down Expand Up @@ -106,7 +106,7 @@ private function _updateEmail(array $data)
* @param array $data
* @return void
*/
private function _clean(array $data)
private function _clean(array $data):void
{
//Delete subscriber from Magento
$helper = $this->getHelper();
Expand All @@ -127,7 +127,7 @@ private function _clean(array $data)
* @param array $data
* @return void
*/
private function _subscribe(array $data)
private function _subscribe(array $data):void
{
try {
$subscribe = true;
Expand All @@ -143,7 +143,7 @@ private function _subscribe(array $data)
* @param array $data
* @return void
*/
private function _unsubscribe(array $data)
private function _unsubscribe(array $data):void
{
$helper = $this->getHelper();
$subscriber = $helper->loadListSubscriber($data['list_id'], $data['email']);
Expand Down Expand Up @@ -182,12 +182,12 @@ private function _unsubscribe(array $data)
* @param array $data
* @throws Mage_Core_Exception
*/
function _profile(array $data)
function _profile(array $data):void
{
$this->getMailchimpTagsModel()->processMergeFields($data);
}

function deleteProcessed()
function deleteProcessed():void
{
$helper = $this->getHelper();
$resource = $helper->getCoreResource();
Expand Down

0 comments on commit 7a8a656

Please sign in to comment.