diff --git a/extend.php b/extend.php index ee87fda..2c51aad 100644 --- a/extend.php +++ b/extend.php @@ -23,14 +23,14 @@ return [ (new Extend\Frontend('forum')) - ->js(__DIR__ . '/js/dist/forum.js') - ->css(__DIR__ . '/resources/less/forum.less'), + ->js(__DIR__.'/js/dist/forum.js') + ->css(__DIR__.'/resources/less/forum.less'), (new Extend\Frontend('admin')) - ->js(__DIR__ . '/js/dist/admin.js') - ->css(__DIR__ . '/resources/less/admin.less'), + ->js(__DIR__.'/js/dist/admin.js') + ->css(__DIR__.'/resources/less/admin.less'), - new Extend\Locales(__DIR__ . '/resources/locale'), + new Extend\Locales(__DIR__.'/resources/locale'), (new Extend\Settings()) ->default('fof-recaptcha.signup', true) diff --git a/src/ForumAttributes.php b/src/ForumAttributes.php index 7a0ecf3..ff56cd0 100644 --- a/src/ForumAttributes.php +++ b/src/ForumAttributes.php @@ -21,7 +21,7 @@ class ForumAttributes */ protected $settings; - function __construct(SettingsRepositoryInterface $settings) + public function __construct(SettingsRepositoryInterface $settings) { $this->settings = $settings; } diff --git a/src/Listeners/AddValidatorRule.php b/src/Listeners/AddValidatorRule.php index 7374f61..82c8f10 100644 --- a/src/Listeners/AddValidatorRule.php +++ b/src/Listeners/AddValidatorRule.php @@ -55,7 +55,7 @@ function ($attribute, $value, $parameters) use ($validator, $secret) { if (!empty($verification->getErrorCodes())) { $validator->setCustomMessages( [ - 'recaptcha' => resolve('translator')->trans('validation.recaptcha-unknown', ['errors' => implode(', ', $verification->getErrorCodes())]) + 'recaptcha' => resolve('translator')->trans('validation.recaptcha-unknown', ['errors' => implode(', ', $verification->getErrorCodes())]), ] ); } diff --git a/src/Utils.php b/src/Utils.php index 33ef6a9..305282c 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -1,13 +1,22 @@ get('fof-recaptcha.credentials.site', "") !== "" && $settings->get('fof-recaptcha.credentials.secret', "") !== ""; + return $settings->get('fof-recaptcha.credentials.site', '') !== '' && $settings->get('fof-recaptcha.credentials.secret', '') !== ''; } }