@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application; |
| 10 | 10 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @throws \Bluz\Db\Exception\TableNotFoundException |
| 27 | 27 | * @throws \Bluz\Http\Exception\RedirectException |
| 28 | 28 | */ |
| 29 | -return function ($id, $message) { |
|
| 29 | +return function($id, $message) { |
|
| 30 | 30 | /** |
| 31 | 31 | * @var Controller $this |
| 32 | 32 | */ |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application; |
| 10 | 10 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @throws \Bluz\Common\Exception\ConfigurationException |
| 29 | 29 | * @throws \Bluz\Http\Exception\RedirectException |
| 30 | 30 | */ |
| 31 | -return function ($name, $email, $subject, $message) { |
|
| 31 | +return function($name, $email, $subject, $message) { |
|
| 32 | 32 | /** |
| 33 | 33 | * @var Controller $this |
| 34 | 34 | */ |
@@ -56,16 +56,16 @@ |
||
| 56 | 56 | $row->message = $message; |
| 57 | 57 | |
| 58 | 58 | try { |
| 59 | - if (!$user) { |
|
| 60 | - $reCaptcha = new ReCaptcha(Config::get('module.contact-us', 'secretKey')); |
|
| 61 | - $response = $reCaptcha->verify(Request::getParam('g-recaptcha-response'), $_SERVER['REMOTE_ADDR']); |
|
| 59 | + if (!$user) { |
|
| 60 | + $reCaptcha = new ReCaptcha(Config::get('module.contact-us', 'secretKey')); |
|
| 61 | + $response = $reCaptcha->verify(Request::getParam('g-recaptcha-response'), $_SERVER['REMOTE_ADDR']); |
|
| 62 | 62 | |
| 63 | - if (!$response->isSuccess()) { |
|
| 64 | - $exception = new ValidatorException(); |
|
| 65 | - $exception->setError('captcha', __('Invalid captcha')); |
|
| 66 | - throw $exception; |
|
| 67 | - } |
|
| 68 | - } |
|
| 63 | + if (!$response->isSuccess()) { |
|
| 64 | + $exception = new ValidatorException(); |
|
| 65 | + $exception->setError('captcha', __('Invalid captcha')); |
|
| 66 | + throw $exception; |
|
| 67 | + } |
|
| 68 | + } |
|
| 69 | 69 | $row->save(); |
| 70 | 70 | Messages::addSuccess('Message was successfully save'); |
| 71 | 71 | Response::reload(); |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application; |
| 10 | 10 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @throws \Bluz\Db\Exception\InvalidPrimaryKeyException |
| 21 | 21 | * @throws \Bluz\Db\Exception\TableNotFoundException |
| 22 | 22 | */ |
| 23 | -return function ($id) { |
|
| 23 | +return function($id) { |
|
| 24 | 24 | /** |
| 25 | 25 | * @var Controller $this |
| 26 | 26 | */ |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application; |
| 10 | 10 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @return void |
| 18 | 18 | */ |
| 19 | -return function () { |
|
| 19 | +return function() { |
|
| 20 | 20 | /** |
| 21 | 21 | * @var Controller $this |
| 22 | 22 | */ |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application; |
| 10 | 10 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @throws \Bluz\Http\Exception\NotAllowedException |
| 26 | 26 | * @throws \Bluz\Http\Exception\NotImplementedException |
| 27 | 27 | */ |
| 28 | -return function () { |
|
| 28 | +return function() { |
|
| 29 | 29 | /** |
| 30 | 30 | * @var Controller $this |
| 31 | 31 | */ |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\ContactUs; |
| 10 | 10 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\ContactUs; |
| 10 | 10 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\ContactUs; |
| 10 | 10 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * @link https://github.com/bluzphp/skeleton |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -declare(strict_types = 1); |
|
| 7 | +declare(strict_types=1); |
|
| 8 | 8 | |
| 9 | 9 | namespace Application\ContactUs; |
| 10 | 10 | |