Convert property names to camel case
[MAILPOET-1796]
This commit is contained in:
@ -16,22 +16,22 @@ use Tracy\Debugger;
|
||||
use Tracy\ILogger;
|
||||
|
||||
class API {
|
||||
private $_request_api_version;
|
||||
private $_request_endpoint;
|
||||
private $_request_method;
|
||||
private $_request_token;
|
||||
private $_request_type;
|
||||
private $_request_endpoint_class;
|
||||
private $_request_data = [];
|
||||
private $_endpoint_namespaces = [];
|
||||
private $_available_api_versions = [
|
||||
private $requestApiVersion;
|
||||
private $requestEndpoint;
|
||||
private $requestMethod;
|
||||
private $requestToken;
|
||||
private $requestType;
|
||||
private $requestEndpointClass;
|
||||
private $requestData = [];
|
||||
private $endpointNamespaces = [];
|
||||
private $availableApiVersions = [
|
||||
'v1',
|
||||
];
|
||||
/** @var ContainerInterface */
|
||||
private $container;
|
||||
|
||||
/** @var AccessControl */
|
||||
private $access_control;
|
||||
private $accessControl;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
@ -14,7 +14,7 @@ abstract class Endpoint {
|
||||
'methods' => [],
|
||||
];
|
||||
|
||||
protected static $get_methods = [];
|
||||
protected static $getMethods = [];
|
||||
|
||||
public function successResponse(
|
||||
$data = [], $meta = [], $status = Response::STATUS_OK
|
||||
|
@ -18,10 +18,10 @@ class CustomFields extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var CustomFieldsRepository */
|
||||
private $custom_fields_repository;
|
||||
private $customFieldsRepository;
|
||||
|
||||
/** @var CustomFieldsResponseBuilder */
|
||||
private $custom_fields_response_builder;
|
||||
private $customFieldsResponseBuilder;
|
||||
|
||||
public function __construct(
|
||||
CustomFieldsRepository $customFieldsRepository,
|
||||
|
@ -31,16 +31,16 @@ class DynamicSegments extends APIEndpoint {
|
||||
private $saver;
|
||||
|
||||
/** @var SingleSegmentLoader */
|
||||
private $dynamic_segments_loader;
|
||||
private $dynamicSegmentsLoader;
|
||||
|
||||
/** @var SubscribersCount */
|
||||
private $subscribers_counts_loader;
|
||||
private $subscribersCountsLoader;
|
||||
|
||||
/** @var BulkActionController */
|
||||
private $bulk_action;
|
||||
private $bulkAction;
|
||||
|
||||
/** @var Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
public function __construct(BulkActionController $bulkAction, Handler $handler, $mapper = null, $saver = null, $dynamicSegmentsLoader = null, $subscribersCountsLoader = null) {
|
||||
$this->bulkAction = $bulkAction;
|
||||
|
@ -15,10 +15,10 @@ class FeatureFlags extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var FeaturesController */
|
||||
private $features_controller;
|
||||
private $featuresController;
|
||||
|
||||
/** @var FeatureFlagsController */
|
||||
private $feature_flags_controller;
|
||||
private $featureFlagsController;
|
||||
|
||||
public function __construct(FeaturesController $featuresController, FeatureFlagsController $featureFlags) {
|
||||
$this->featuresController = $featuresController;
|
||||
|
@ -16,16 +16,16 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
class Forms extends APIEndpoint {
|
||||
|
||||
/** @var Listing\BulkActionController */
|
||||
private $bulk_action;
|
||||
private $bulkAction;
|
||||
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
/** @var FeaturesController */
|
||||
private $features_controller;
|
||||
private $featuresController;
|
||||
|
||||
/** @var Util\Styles */
|
||||
private $form_styles_utils;
|
||||
private $formStylesUtils;
|
||||
|
||||
public $permissions = [
|
||||
'global' => AccessControl::PERMISSION_MANAGE_FORMS,
|
||||
|
@ -15,7 +15,7 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
class Mailer extends APIEndpoint {
|
||||
|
||||
/** @var AuthorizedEmailsController */
|
||||
private $authorized_emails_controller;
|
||||
private $authorizedEmailsController;
|
||||
|
||||
/** @var Bridge */
|
||||
private $bridge;
|
||||
|
@ -13,7 +13,7 @@ class NewsletterTemplates extends APIEndpoint {
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
];
|
||||
|
||||
protected static $get_methods = [
|
||||
protected static $getMethods = [
|
||||
'getAll',
|
||||
];
|
||||
|
||||
|
@ -35,38 +35,38 @@ use MailPoetVendor\Carbon\Carbon;
|
||||
class Newsletters extends APIEndpoint {
|
||||
|
||||
/** @var Listing\BulkActionController */
|
||||
private $bulk_action;
|
||||
private $bulkAction;
|
||||
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
/** @var WCHelper */
|
||||
private $woocommerce_helper;
|
||||
private $woocommerceHelper;
|
||||
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
/** @var CronHelper */
|
||||
private $cron_helper;
|
||||
private $cronHelper;
|
||||
|
||||
/** @var AuthorizedEmailsController */
|
||||
private $authorized_emails_controller;
|
||||
private $authorizedEmailsController;
|
||||
|
||||
public $permissions = [
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
];
|
||||
|
||||
/** @var NewslettersRepository */
|
||||
private $newsletters_repository;
|
||||
private $newslettersRepository;
|
||||
|
||||
/** @var NewslettersResponseBuilder */
|
||||
private $newsletters_response_builder;
|
||||
private $newslettersResponseBuilder;
|
||||
|
||||
/** @var PostNotificationScheduler */
|
||||
private $post_notification_scheduler;
|
||||
private $postNotificationScheduler;
|
||||
|
||||
/** @var MetaInfo */
|
||||
private $mailerMetaInfo;
|
||||
@ -78,7 +78,7 @@ class Newsletters extends APIEndpoint {
|
||||
private $mailer;
|
||||
|
||||
/** @var SubscribersFeature */
|
||||
private $subscribers_feature;
|
||||
private $subscribersFeature;
|
||||
|
||||
public function __construct(
|
||||
Listing\BulkActionController $bulkAction,
|
||||
|
@ -17,13 +17,13 @@ class Segments extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var Listing\BulkActionController */
|
||||
private $bulk_action;
|
||||
private $bulkAction;
|
||||
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
/** @var WooCommerce */
|
||||
private $woo_commerce_sync;
|
||||
private $wooCommerceSync;
|
||||
|
||||
public function __construct(
|
||||
Listing\BulkActionController $bulkAction,
|
||||
|
@ -21,7 +21,7 @@ class SendingQueue extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var SubscribersFeature */
|
||||
private $subscribers_feature;
|
||||
private $subscribersFeature;
|
||||
|
||||
public function __construct(SubscribersFeature $subscribersFeature) {
|
||||
$this->subscribersFeature = $subscribersFeature;
|
||||
|
@ -20,13 +20,13 @@ class SendingTaskSubscribers extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
/** @var CronHelper */
|
||||
private $cron_helper;
|
||||
private $cronHelper;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
@ -26,16 +26,16 @@ class Services extends APIEndpoint {
|
||||
private $analytics;
|
||||
|
||||
/** @var SPFCheck */
|
||||
private $spf_check;
|
||||
private $spfCheck;
|
||||
|
||||
/** @var DateTime */
|
||||
public $date_time;
|
||||
public $dateTime;
|
||||
|
||||
/** @var SendingServiceKeyCheck */
|
||||
private $mss_worker;
|
||||
private $mssWorker;
|
||||
|
||||
/** @var PremiumKeyCheck */
|
||||
private $premium_worker;
|
||||
private $premiumWorker;
|
||||
|
||||
public $permissions = [
|
||||
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS,
|
||||
|
@ -25,10 +25,10 @@ class Settings extends APIEndpoint {
|
||||
private $bridge;
|
||||
|
||||
/** @var AuthorizedEmailsController */
|
||||
private $authorized_emails_controller;
|
||||
private $authorizedEmailsController;
|
||||
|
||||
/** @var TransactionalEmails */
|
||||
private $wc_transactional_emails;
|
||||
private $wcTransactionalEmails;
|
||||
|
||||
public $permissions = [
|
||||
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS,
|
||||
|
@ -36,22 +36,22 @@ class Subscribers extends APIEndpoint {
|
||||
];
|
||||
|
||||
/** @var Listing\BulkActionController */
|
||||
private $bulk_action_controller;
|
||||
private $bulkActionController;
|
||||
|
||||
/** @var SubscribersListings */
|
||||
private $subscribers_listings;
|
||||
private $subscribersListings;
|
||||
|
||||
/** @var SubscriberActions */
|
||||
private $subscriber_actions;
|
||||
private $subscriberActions;
|
||||
|
||||
/** @var RequiredCustomFieldValidator */
|
||||
private $required_custom_field_validator;
|
||||
private $requiredCustomFieldValidator;
|
||||
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
private $listingHandler;
|
||||
|
||||
/** @var Captcha */
|
||||
private $subscription_captcha;
|
||||
private $subscriptionCaptcha;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
@ -60,13 +60,13 @@ class Subscribers extends APIEndpoint {
|
||||
private $settings;
|
||||
|
||||
/** @var CaptchaSession */
|
||||
private $captcha_session;
|
||||
private $captchaSession;
|
||||
|
||||
/** @var ConfirmationEmailMailer; */
|
||||
private $confirmation_email_mailer;
|
||||
private $confirmationEmailMailer;
|
||||
|
||||
/** @var SubscriptionUrlFactory */
|
||||
private $subscription_url_factory;
|
||||
private $subscriptionUrlFactory;
|
||||
|
||||
public function __construct(
|
||||
Listing\BulkActionController $bulkActionController,
|
||||
|
@ -11,7 +11,7 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
class UserFlags extends APIEndpoint {
|
||||
|
||||
/** @var UserFlagsController */
|
||||
private $user_flags;
|
||||
private $userFlags;
|
||||
|
||||
public $permissions = [
|
||||
'global' => AccessControl::ALL_ROLES_ACCESS,
|
||||
|
@ -11,7 +11,7 @@ class WoocommerceSettings extends APIEndpoint {
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
];
|
||||
|
||||
private $allowed_settings = [
|
||||
private $allowedSettings = [
|
||||
'woocommerce_email_base_color',
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user