Skip to content

Commit

Permalink
Fixing conflicts in UbiquityService class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Watters committed Apr 21, 2024
1 parent ab79555 commit cf6e3b8
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/Services/UbiquityService.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<?php
namespace Ubiquity\Services;

namespace Ubiquity\Services;

use Exception;
use GuzzleHttp\Client;
<<<<<<< HEAD
use SilverStripe\Control\Controller;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\ArrayList;
use SilverStripe\SiteConfig\SiteConfig;
use Ubiquity\Models\UbiquityDatabase;
=======
use SilverStripe\Core\Config\Config;
use SilverStripe\SiteConfig\SiteConfig;
>>>>>>> 9ffaf6d (SS5 upgrade)

class UbiquityService
{
Expand Down Expand Up @@ -171,11 +165,7 @@ public function call($method = null, string $uri = null, $query = null, $data =

$options = $this->getDefaultOptions();

<<<<<<< HEAD
if ($query && is_array($query)) {
=======
if ($query) {
>>>>>>> 9ffaf6d (SS5 upgrade)
$options['query'] = array_merge($options['query'], $query);
}

Expand Down Expand Up @@ -204,11 +194,7 @@ public function getContact($params)
}

// get the email address submitted
<<<<<<< HEAD
$email = (isset($params['value'])) ? $params['value'] : null;
=======
$email = (isset($emailData['value'])) ? $emailData['value'] : null;
>>>>>>> 9ffaf6d (SS5 upgrade)

// check the email address is valid
if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
Expand All @@ -219,10 +205,6 @@ public function getContact($params)
'filter' => $this->buildFilterQueryString(array($params))
];

<<<<<<< HEAD
=======
//self::get()?
>>>>>>> 9ffaf6d (SS5 upgrade)
$response = $this->call(self::METHOD_GET, 'database/contacts', $query);

if ($response->getStatusCode() !== 200) {
Expand Down Expand Up @@ -270,8 +252,6 @@ public function getEmailData(array $data)
}

/**
<<<<<<< HEAD
=======
* @param $fields SS_List list of fields assigned an ubiquity ID
* @param $options SS_List list of EditableOption assigned an ubiquity ID
* @param $data Array submitted data (merged with source data)
Expand Down Expand Up @@ -322,7 +302,6 @@ public function createOrUpdateContact($data)
}

/**
>>>>>>> 9ffaf6d (SS5 upgrade)
* Send data to a Ubiquity Form
* Usually to trigger an email being sent from their end.
*/
Expand Down Expand Up @@ -404,8 +383,6 @@ public function filterUpdateData($data, $contact)

return array_values($updatedData);
}
<<<<<<< HEAD
=======

/**
* Determine if ubiquity analytis is enabled
Expand Down Expand Up @@ -438,5 +415,4 @@ public static function get_analytics_keys()

return $analyticsKeys;
}
>>>>>>> 9ffaf6d (SS5 upgrade)
}

0 comments on commit cf6e3b8

Please sign in to comment.