Skip to content

Commit abc2be5

Browse files
committed
updated
the formatting
1 parent 7ef727f commit abc2be5

2 files changed

Lines changed: 30 additions & 31 deletions

File tree

src/Plugin.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ public static function getHooks()
3636
self::$module.'.reactivate' => [__CLASS__, 'getReactivate'],
3737
self::$module.'.deactivate' => [__CLASS__, 'getDeactivate'],
3838
self::$module.'.terminate' => [__CLASS__, 'getTerminate'],
39-
'api.register' => [__CLASS__, 'apiRegister'],
40-
'function.requirements' => [__CLASS__, 'getRequirements'],
39+
'api.register' => [__CLASS__, 'apiRegister'],
40+
'function.requirements' => [__CLASS__, 'getRequirements'],
4141
'ui.menu' => [__CLASS__, 'getMenu']
4242
];
4343
}
44-
45-
/**
46-
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
47-
*/
48-
public static function apiRegister(GenericEvent $event)
49-
{
50-
/**
51-
* @var \ServiceHandler $subject
52-
*/
53-
//$subject = $event->getSubject();
54-
api_register('api_auto_cpanel_login', ['id' => 'int'], ['return' => 'result_status'], 'Logs into cpanel for the given website id and returns a unique logged-in url. The status will be "ok" if successful, or "error" if there was any problems status_text will contain a description of the problem if any.');
55-
}
44+
45+
/**
46+
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
47+
*/
48+
public static function apiRegister(GenericEvent $event)
49+
{
50+
/**
51+
* @var \ServiceHandler $subject
52+
*/
53+
//$subject = $event->getSubject();
54+
api_register('api_auto_cpanel_login', ['id' => 'int'], ['return' => 'result_status'], 'Logs into cpanel for the given website id and returns a unique logged-in url. The status will be "ok" if successful, or "error" if there was any problems status_text will contain a description of the problem if any.');
55+
}
5656

5757
/**
5858
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
@@ -61,7 +61,7 @@ public static function apiRegister(GenericEvent $event)
6161
public static function getActivate(GenericEvent $event)
6262
{
6363
if ($event['category'] == get_service_define('WEB_CPANEL')) {
64-
$serviceClass = $event->getSubject();
64+
$serviceClass = $event->getSubject();
6565
myadmin_log(self::$module, 'info', 'Cpanel Activation', __LINE__, __FILE__, self::$module, $serviceClass->getId());
6666
$serviceTypes = run_event('get_service_types', false, self::$module);
6767
$settings = get_module_settings(self::$module);
@@ -336,7 +336,7 @@ function_requirements('whm_api');
336336
public static function getDeactivate(GenericEvent $event)
337337
{
338338
if (in_array($event['type'], [get_service_define('WEB_CPANEL'), get_service_define('WEB_WORDPRESS')])) {
339-
$serviceClass = $event->getSubject();
339+
$serviceClass = $event->getSubject();
340340
myadmin_log(self::$module, 'info', 'Cpanel Deactivation', __LINE__, __FILE__, self::$module, $serviceClass->getId());
341341
$settings = get_module_settings(self::$module);
342342
if ($serviceClass->getServer() > 0) {
@@ -378,7 +378,7 @@ function_requirements('whm_api');
378378
public static function getTerminate(GenericEvent $event)
379379
{
380380
if (in_array($event['type'], [get_service_define('WEB_CPANEL'), get_service_define('WEB_WORDPRESS')])) {
381-
$serviceClass = $event->getSubject();
381+
$serviceClass = $event->getSubject();
382382
myadmin_log(self::$module, 'info', 'Cpanel Termination', __LINE__, __FILE__, self::$module, $serviceClass->getId());
383383
$settings = get_module_settings(self::$module);
384384
$serverdata = get_service_master($serviceClass->getServer(), self::$module);
@@ -570,11 +570,11 @@ function_requirements('has_acl');
570570
*/
571571
public static function getRequirements(GenericEvent $event)
572572
{
573-
/**
574-
* @var \MyAdmin\Plugins\Loader $this->loader
575-
*/
576-
$loader = $event->getSubject();
577-
$loader->add_requirement('api_auto_cpanel_login','/../vendor/detain/myadmin-cpanel-webhosting/src/api.php');
573+
/**
574+
* @var \MyAdmin\Plugins\Loader $this->loader
575+
*/
576+
$loader = $event->getSubject();
577+
$loader->add_requirement('api_auto_cpanel_login', '/../vendor/detain/myadmin-cpanel-webhosting/src/api.php');
578578
$loader->add_page_requirement('whm_get_accounts', '/webhosting/whmapi.functions.inc.php');
579579
$loader->add_page_requirement('whm_api', '/webhosting/whmapi.functions.inc.php');
580580
$loader->add_page_requirement('whm_choose_server', '/webhosting/whmapi.functions.inc.php');
@@ -655,18 +655,18 @@ public static function getRequirements(GenericEvent $event)
655655
/**
656656
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
657657
*/
658-
public static function getSettings(GenericEvent $event)
659-
{
660-
/**
661-
* @var \MyAdmin\Settings $settings
662-
**/
663-
$settings = $event->getSubject();
664-
$settings->setTarget('module');
658+
public static function getSettings(GenericEvent $event)
659+
{
660+
/**
661+
* @var \MyAdmin\Settings $settings
662+
**/
663+
$settings = $event->getSubject();
664+
$settings->setTarget('module');
665665
$settings->add_select_master(_(self::$module), _('Default Servers'), self::$module, 'new_website_cpanel_server', _('Default CPanel Setup Server'), NEW_WEBSITE_CPANEL_SERVER, get_service_define('WEB_CPANEL'));
666666
$settings->add_select_master(_(self::$module), _('Default Servers'), self::$module, 'new_website_wordpress_server', _('Default WordPress Setup Server'), NEW_WEBSITE_WORDPRESS_SERVER, get_service_define('WEB_WORDPRESS'));
667667
$settings->add_dropdown_setting(self::$module, _('Out of Stock'), 'outofstock_webhosting_cpanel', _('Out Of Stock CPanel Webhosting'), _('Enable/Disable Sales Of This Type'), $settings->get_setting('OUTOFSTOCK_WEBHOSTING_CPANEL'), ['0', '1'], ['No', 'Yes']);
668668
$settings->add_dropdown_setting(self::$module, _('Out of Stock'), 'outofstock_webhosting_wordpress', _('Out Of Stock WordPress Managed Webhosting'), _('Enable/Disable Sales Of This Type'), $settings->get_setting('OUTOFSTOCK_WEBHOSTING_WORDPRESS'), ['0', '1'], ['No', 'Yes']);
669-
$settings->setTarget('global');
669+
$settings->setTarget('global');
670670
$settings->add_dropdown_setting(self::$module, _('CPanel Defaults'), 'cpanel_package_defaults_ip', _('CPanel Package Defaults - IP'), _('Enable/Disable Dedicated IP for new Sites'), $settings->get_setting('CPANEL_PACKAGE_DEFAULTS_IP'), ['n', 'y'], ['No', 'Yes']);
671671
$settings->add_dropdown_setting(self::$module, _('CPanel Defaults'), 'cpanel_package_defaults_cgi', _('CPanel Package Defaults - CGI'), _('Enable/Disable CGI Access'), $settings->get_setting('CPANEL_PACKAGE_DEFAULTS_CGI'), ['0', '1'], ['No', 'Yes']);
672672
$settings->add_dropdown_setting(self::$module, _('CPanel Defaults'), 'cpanel_package_defaults_frontpage', _('CPanel Package Defaults - Frontpage'), _('Enable/Disable Frontpage Extensions'), $settings->get_setting('CPANEL_PACKAGE_DEFAULTS_FRONTPAGE'), ['0', '1'], ['No', 'Yes']);

src/api.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,3 @@ function_requirements('whm_api');
6262
$return['status_text'] = 'Sorry! something went wrong, couldn\'t able to connect to cPanel!';
6363
return $return;
6464
}
65-

0 commit comments

Comments
 (0)