Skip to content

Commit bf26bbd

Browse files
committed
formatting updates
1 parent 187328e commit bf26bbd

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

src/Plugin.php

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
*
1010
* @package Detain\MyAdminSsl
1111
*/
12-
class Plugin {
13-
12+
class Plugin
13+
{
1414
public static $name = 'SSL Certificates';
1515
public static $description = 'Allows selling of SSL Certificates Module';
1616
public static $help = '';
1717
public static $module = 'ssl';
1818
public static $type = 'module';
1919
public static $settings = [
2020
'SERVICE_ID_OFFSET' => 3000,
21-
'USE_REPEAT_INVOICE' => FALSE,
22-
'USE_PACKAGES' => TRUE,
21+
'USE_REPEAT_INVOICE' => false,
22+
'USE_PACKAGES' => true,
2323
'BILLING_DAYS_OFFSET' => 0,
2424
'IMGNAME' => 'security-ssl.png',
2525
'REPEAT_BILLING_METHOD' => PRORATE_BILLING,
@@ -37,13 +37,15 @@ class Plugin {
3737
/**
3838
* Plugin constructor.
3939
*/
40-
public function __construct() {
40+
public function __construct()
41+
{
4142
}
4243

4344
/**
4445
* @return array
4546
*/
46-
public static function getHooks() {
47+
public static function getHooks()
48+
{
4749
return [
4850
self::$module.'.load_processing' => [__CLASS__, 'loadProcessing'],
4951
self::$module.'.settings' => [__CLASS__, 'getSettings']
@@ -53,15 +55,16 @@ public static function getHooks() {
5355
/**
5456
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
5557
*/
56-
public static function loadProcessing(GenericEvent $event) {
58+
public static function loadProcessing(GenericEvent $event)
59+
{
5760
/**
5861
* @var \ServiceHandler $service
5962
*/
6063
$service = $event->getSubject();
6164
$service->setModule(self::$module)
6265
->setActivationStatuses(['pending', 'pendapproval', 'active'])
63-
->setEnable(function($service) {
64-
$serviceTypes = run_event('get_service_types', FALSE, self::$module);
66+
->setEnable(function ($service) {
67+
$serviceTypes = run_event('get_service_types', false, self::$module);
6568
$serviceInfo = $service->getServiceInfo();
6669
$settings = get_module_settings(self::$module);
6770
$db = get_module_db(self::$module);
@@ -76,9 +79,9 @@ public static function loadProcessing(GenericEvent $event) {
7679
$headers .= 'MIME-Version: 1.0'.PHP_EOL;
7780
$headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL;
7881
$headers .= 'From: '.TITLE.' <'.EMAIL_FROM.'>'.PHP_EOL;
79-
admin_mail($subject, $email, $headers, FALSE, 'admin/ssl_created.tpl');
80-
})->setReactivate(function($service) {
81-
$serviceTypes = run_event('get_service_types', FALSE, self::$module);
82+
admin_mail($subject, $email, $headers, false, 'admin/ssl_created.tpl');
83+
})->setReactivate(function ($service) {
84+
$serviceTypes = run_event('get_service_types', false, self::$module);
8285
$serviceInfo = $service->getServiceInfo();
8386
$settings = get_module_settings(self::$module);
8487
$db = get_module_db(self::$module);
@@ -93,15 +96,16 @@ public static function loadProcessing(GenericEvent $event) {
9396
$headers .= 'MIME-Version: 1.0'.PHP_EOL;
9497
$headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL;
9598
$headers .= 'From: '.TITLE.' <'.EMAIL_FROM.'>'.PHP_EOL;
96-
admin_mail($subject, $email, $headers, FALSE, 'admin/ssl_reactivated.tpl');
97-
})->setDisable(function() {
99+
admin_mail($subject, $email, $headers, false, 'admin/ssl_reactivated.tpl');
100+
})->setDisable(function () {
98101
})->register();
99102
}
100103

101104
/**
102105
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
103106
*/
104-
public static function getSettings(GenericEvent $event) {
107+
public static function getSettings(GenericEvent $event)
108+
{
105109
$settings = $event->getSubject();
106110
$settings->add_dropdown_setting(self::$module, 'General', 'outofstock_ssl', 'Out Of Stock Ssl', 'Enable/Disable Sales Of This Type', $settings->get_setting('OUTOFSTOCK_SSL'), ['0', '1'], ['No', 'Yes']);
107111
}

0 commit comments

Comments
 (0)