Skip to content

Commit

Permalink
Small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael H. Arieli committed Oct 10, 2015
1 parent cc933ff commit e9ad618
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions Bridge/RecaptchaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ class RecaptchaServiceProvider implements ServiceProviderInterface
*/
public function register(Application $app)
{
// Parameters
$app['ewz_recaptcha.public_key'] = null;
// parameters
$app['ewz_recaptcha.public_key'] = null;
$app['ewz_recaptcha.private_key'] = null;
$app['ewz_recaptcha.locale_key'] = $app['locale'];
$app['ewz_recaptcha.enabled'] = true;
$app['ewz_recaptcha.ajax'] = false;
$app['ewz_recaptcha.http_proxy'] = array(
$app['ewz_recaptcha.locale_key'] = $app['locale'];
$app['ewz_recaptcha.enabled'] = true;
$app['ewz_recaptcha.ajax'] = false;
$app['ewz_recaptcha.http_proxy'] = array(
'host' => null,
'port' => null,
'auth' => null,
'auth' => null
);

// add loader for EWZ Template
Expand All @@ -40,7 +40,7 @@ public function register(Application $app)
);
}

// Register recaptcha form type
// register recaptcha form type
if (isset($app['form.extensions'])) {
$app['form.extensions'] = $app->share($app->extend('form.extensions',
function($extensions) use ($app) {
Expand All @@ -50,7 +50,7 @@ function($extensions) use ($app) {
}));
}

// Register recaptcha validator constraint
// register recaptcha validator constraint
if (isset($app['validator.validator_factory'])) {
$app['ewz_recaptcha.true'] = $app->share(function ($app) {
$validator = new IsTrueValidator(
Expand All @@ -71,7 +71,7 @@ function($extensions) use ($app) {
);
}

// Register translation files
// register translation files
if (isset($app['translator'])) {
$app['translator'] = $app->share($app->extend('translator', function($translator, $app) {
$translator->addResource(
Expand Down
4 changes: 2 additions & 2 deletions Form/Type/RecaptchaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class RecaptchaType extends AbstractType
* Construct.
*
* @param string $publicKey Recaptcha public key
* @param Boolean $enabled Recaptache status
* @param string $language language or locale code
* @param Boolean $enabled Recaptache status
* @param string $language Language or locale code
*/
public function __construct($publicKey, $enabled, $ajax, $language)
{
Expand Down
12 changes: 6 additions & 6 deletions Validator/Constraints/IsTrueValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ class IsTrueValidator extends ConstraintValidator
/**
* Construct.
*
* @param Boolean $enabled
* @param string $privateKey
* @param Boolean $enabled
* @param string $privateKey
* @param RequestStack $requestStack
* @param array $httpProxy
* @param array $httpProxy
*/
public function __construct($enabled, $privateKey, RequestStack $requestStack, array $httpProxy)
{
$this->enabled = $enabled;
$this->privateKey = $privateKey;
$this->enabled = $enabled;
$this->privateKey = $privateKey;
$this->requestStack = $requestStack;
$this->httpProxy = $httpProxy;
$this->httpProxy = $httpProxy;
}

/**
Expand Down

0 comments on commit e9ad618

Please sign in to comment.