Commit 8279793b authored by john_a's avatar john_a Committed by john_a
Browse files

Issue #3143996 by john_a: New coding standards issues

parent ddd7a626
......@@ -45,7 +45,8 @@ CORE
3rd Party
---------
These should be automatically installed by composer when you install this module.
These should be automatically installed by composer when you install this
module.
* [Swaggest PHP Json Schema](https://github.com/swaggest/php-json-schema)
......
......@@ -20,7 +20,7 @@ function marketing_cloud_update_8001() {
}
/**
* Add new request_token_version settiing and change request_token_url to domain only.
* Add new request_token_version setting and change request_token_url to domain only.
*/
function marketing_cloud_update_8002() {
$config = \Drupal::service('config.factory')
......@@ -31,11 +31,12 @@ function marketing_cloud_update_8002() {
// Set version to v2 by default, unless already set to v1.
if ($requestTokenUrl !== NULL && strpos($requestTokenUrl, 'v1')) {
$requestTokenVersion = 'v1';
} else {
}
else {
$requestTokenVersion = 'v2';
}
// Ensure request_token_url containas only the scheme and host.
// Ensure request_token_url contains only the scheme and host.
$parts = parse_url($requestTokenUrl);
$requestTokenUrl = $parts['scheme'] . "://" . $parts['host'];
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class AddressService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_address';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudAddressTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_address'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Address service.
*
* @var \Drupal\marketing_cloud_address\AddressService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class AssetsService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_assets';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudAssetsTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_assets'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Assets service.
*
* @var \Drupal\marketing_cloud_assets\AssetsService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class CampaignsService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_campaigns';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudCampaignsTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_campaigns'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Campaigns service.
*
* @var \Drupal\marketing_cloud_campaigns\CampaignsService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class ContactsService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_contacts';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudContactsTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_contacts'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Contacts service.
*
* @var \Drupal\marketing_cloud_contacts\ContactsService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class DataEventsService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_data_events';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudDataEventsTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_data_events'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Data Events service.
*
* @var \Drupal\marketing_cloud_data_events\DataEventsService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -29,6 +29,11 @@ class MarketingCloudExampleTest extends BrowserTestBase {
'marketing_cloud_example',
];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class InteractionService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_interaction';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudInteractionTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_interaction'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Interaction service.
*
* @var \Drupal\marketing_cloud_interaction\InteractionService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......@@ -367,7 +384,7 @@ class MarketingCloudInteractionTest extends BrowserTestBase {
return [
"key" => "ixn-created-via-the-api",
"name" => "API-Created journey",
"workflowApiVersion" => 1.0 ,
"workflowApiVersion" => "1.0",
"triggers" => [],
"goals" => [],
"activities" => [],
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class MessagesService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_messages';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudMessagesTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_messages'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Messages service.
*
* @var \Drupal\marketing_cloud_messages\MessagesService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class PlatformService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_platform';
/**
......
......@@ -20,8 +20,25 @@ class MarketingCloudPlatformTest extends BrowserTestBase {
*/
public static $modules = ['marketing_cloud', 'marketing_cloud_platform'];
/**
* Admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Platform service.
*
* @var \Drupal\marketing_cloud_platform\PlatformService
*/
protected $service;
/**
* Config service.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $moduleConfig;
/**
......
......@@ -17,6 +17,11 @@ use Drupal\marketing_cloud\MarketingCloudService;
*/
class PushService extends MarketingCloudService {
/**
* The machine name of the sub-module.
*
* @var string
*/
private $moduleName = 'marketing_cloud_push';
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment