Passed
Push — master ( ef8240...7c0064 )
by Rias
03:59
created
src/elements/ContactFormSubmission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ContactFormExtensions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.