Skip to content

Commit

Permalink
p11 adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Jun 28, 2024
1 parent 02a1057 commit 658832d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
File renamed without changes.
31 changes: 31 additions & 0 deletions src/Migrations/Version20240628143429.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace FormBuilderBundle\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use FormBuilderBundle\Tool\Install;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

final class Version20240628143429 extends AbstractMigration implements ContainerAwareInterface
{
use ContainerAwareTrait;

public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
$installer = $this->container->get(Install::class);
$installer->updateTranslations();
}

public function down(Schema $schema): void
{
}
}
10 changes: 4 additions & 6 deletions src/Tool/FriendlyCaptchaProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

class FriendlyCaptchaProcessor implements FriendlyCaptchaProcessorInterface
{
protected Configuration $configuration;
protected RequestStack $requestStack;

public function __construct(Configuration $configuration, RequestStack $requestStack)
{
$this->configuration = $configuration;
$this->requestStack = $requestStack;
public function __construct(
protected Configuration $configuration,
protected RequestStack $requestStack
) {
}

public function verify(mixed $value): Response
Expand Down
5 changes: 1 addition & 4 deletions src/Validator/Constraints/FriendlyCaptchaValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@

final class FriendlyCaptchaValidator extends ConstraintValidator
{
protected FriendlyCaptchaProcessor $friendlyCaptchaProcessor;

public function __construct(FriendlyCaptchaProcessor $friendlyCaptchaProcessor)
public function __construct(protected FriendlyCaptchaProcessor $friendlyCaptchaProcessor)
{
$this->friendlyCaptchaProcessor = $friendlyCaptchaProcessor;
}

public function validate(mixed $value, Constraint $constraint): void
Expand Down

0 comments on commit 658832d

Please sign in to comment.