@@ -38,10 +38,10 @@ abstract class AbstractEWZRecaptchaType extends AbstractType
3838
3939 /**
4040 * @param string $publicKey Recaptcha public key
41- * @param bool $enabled Recaptcha status
41+ * @param bool $enabled Recaptcha status
4242 * @param string $apiHost Api host
4343 */
44- public function __construct ($ publicKey , $ enabled , $ apiHost = 'www.google.com ' )
44+ public function __construct (string $ publicKey , bool $ enabled , string $ apiHost = 'www.google.com ' )
4545 {
4646 $ this ->publicKey = $ publicKey ;
4747 $ this ->enabled = $ enabled ;
@@ -52,7 +52,7 @@ public function __construct($publicKey, $enabled, $apiHost = 'www.google.com')
5252 /**
5353 * {@inheritdoc}
5454 */
55- public function buildView (FormView $ view , FormInterface $ form , array $ options )
55+ public function buildView (FormView $ view , FormInterface $ form , array $ options ): void
5656 {
5757 $ view ->vars = array_replace ($ view ->vars , array (
5858 'ewz_recaptcha_enabled ' => $ this ->enabled ,
@@ -71,7 +71,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
7171 /**
7272 * {@inheritdoc}
7373 */
74- public function getBlockPrefix ()
74+ public function getBlockPrefix (): string
7575 {
7676 return 'ewz_recaptcha ' ;
7777 }
@@ -81,7 +81,7 @@ public function getBlockPrefix()
8181 *
8282 * @return string The javascript source URL
8383 */
84- public function getPublicKey ()
84+ public function getPublicKey (): string
8585 {
8686 return $ this ->publicKey ;
8787 }
@@ -91,10 +91,10 @@ public function getPublicKey()
9191 *
9292 * @return string The hostname for API
9393 */
94- public function getApiHost ()
94+ public function getApiHost (): string
9595 {
9696 return $ this ->apiHost ;
9797 }
9898
99- abstract protected function addCustomVars (FormView $ view , FormInterface $ form , array $ options );
99+ abstract protected function addCustomVars (FormView $ view , FormInterface $ form , array $ options ): void ;
100100}
0 commit comments