@@ -104,7 +104,7 @@ |
||
104 | 104 | |
105 | 105 | protected static function defineSources(string $context = null): array |
106 | 106 | { |
107 | - $forms = array_unique(array_map(function (ContactFormSubmission $submission) { |
|
107 | + $forms = array_unique(array_map(function(ContactFormSubmission $submission) { |
|
108 | 108 | return $submission->form; |
109 | 109 | }, self::find()->all())); |
110 | 110 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | Craft::$app->session->setNotice(Craft::t('contact-form-extensions', 'The Contact Form plugin is not installed or activated, Contact Form Extensions does not work without it.')); |
85 | 85 | } |
86 | 86 | |
87 | - Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function (TemplateEvent $e) { |
|
87 | + Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function(TemplateEvent $e) { |
|
88 | 88 | if ( |
89 | 89 | $e->template === 'settings/plugins/_settings' && |
90 | 90 | $e->variables['plugin'] === $this |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | } |
98 | 98 | }); |
99 | 99 | |
100 | - Event::on(UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, function (RegisterUrlRulesEvent $event) { |
|
100 | + Event::on(UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, function(RegisterUrlRulesEvent $event) { |
|
101 | 101 | $event->rules = array_merge($event->rules, [ |
102 | 102 | 'contact-form-extensions/submissions/<submissionId:\d+>' => 'contact-form-extensions/submissions/show-submission', |
103 | 103 | 'contact-form-extensions/submissions/<submissionId:\d+>/<siteHandle:{handle}>' => 'contact-form-extensions/submissions/show-submission', |
104 | 104 | ]); |
105 | 105 | }); |
106 | 106 | |
107 | - Event::on(Mailer::class, Mailer::EVENT_BEFORE_SEND, function (SendEvent $e) { |
|
107 | + Event::on(Mailer::class, Mailer::EVENT_BEFORE_SEND, function(SendEvent $e) { |
|
108 | 108 | if ($e->isSpam) { |
109 | 109 | return; |
110 | 110 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | }); |
146 | 146 | |
147 | - Event::on(Mailer::class, Mailer::EVENT_AFTER_SEND, function (SendEvent $e) { |
|
147 | + Event::on(Mailer::class, Mailer::EVENT_AFTER_SEND, function(SendEvent $e) { |
|
148 | 148 | if ($this->settings->enableConfirmationEmail) { |
149 | 149 | // First set the template mode to the Site templates |
150 | 150 | Craft::$app->view->setTemplateMode(View::TEMPLATE_MODE_SITE); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | Event::on( |
174 | 174 | CraftVariable::class, |
175 | 175 | CraftVariable::EVENT_INIT, |
176 | - function (Event $event) { |
|
176 | + function(Event $event) { |
|
177 | 177 | /** @var CraftVariable $variable */ |
178 | 178 | $variable = $event->sender; |
179 | 179 | $variable->set('contactFormExtensions', ContactFormExtensionsVariable::class); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | HTML; |
49 | 49 | |
50 | 50 | if ($this->hideBadge) { |
51 | - $html .= '<style>.grecaptcha-badge{display:none;!important}</style>' . PHP_EOL; |
|
51 | + $html .= '<style>.grecaptcha-badge{display:none;!important}</style>'.PHP_EOL; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return $html; |