@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | ksort($config_data_attributes); |
58 | 58 | foreach ($config_data_attributes as $k => $v) { |
59 | 59 | if ($v) { |
60 | - $data_attributes[] = 'data-' . $k . '="' . $v . '"'; |
|
60 | + $data_attributes[] = 'data-'.$k.'="'.$v.'"'; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | - $html = '<div class="g-recaptcha" ' . implode(" ", $data_attributes) . ' id="recaptcha-element"></div>'; |
|
64 | + $html = '<div class="g-recaptcha" '.implode(" ", $data_attributes).' id="recaptcha-element"></div>'; |
|
65 | 65 | |
66 | 66 | return $html; |
67 | 67 | } |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | $tag_attributes = array_merge($tag_attributes, config('recaptcha.tag_attributes', [])); |
81 | 81 | |
82 | 82 | if (Arr::get($tag_attributes, 'callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
83 | - throw new InvalidConfigurationException('Property "callback" ("data-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
83 | + throw new InvalidConfigurationException('Property "callback" ("data-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | if (Arr::get($tag_attributes, 'expired-callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
87 | - throw new InvalidConfigurationException('Property "expired-callback" ("data-expired-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
87 | + throw new InvalidConfigurationException('Property "expired-callback" ("data-expired-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | if (Arr::get($tag_attributes, 'error-callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
91 | - throw new InvalidConfigurationException('Property "error-callback" ("data-error-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
91 | + throw new InvalidConfigurationException('Property "error-callback" ("data-error-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $tag_attributes; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $attributes = $this->getTagAttributes(); |
104 | 104 | |
105 | - return "<script>var biscolabOnloadCallback = function() {grecaptcha.render('recaptcha-element', " . json_encode($attributes) . ");};</script>"; |
|
105 | + return "<script>var biscolabOnloadCallback = function() {grecaptcha.render('recaptcha-element', ".json_encode($attributes).");};</script>"; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public static function cleanAttributes(?array $attributes = []): array |
115 | 115 | { |
116 | - return array_filter($attributes, function ($k) { |
|
116 | + return array_filter($attributes, function($k) { |
|
117 | 117 | return in_array($k, self::$allowed_data_attribute); |
118 | 118 | }, ARRAY_FILTER_USE_KEY); |
119 | 119 | } |