Skip to content

Commit

Permalink
chore: CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored and nicolas-grekas committed Mar 20, 2024
1 parent a8f6af4 commit 7b4f01d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function handleRequest(mixed $request = null): static
*
* @return $this
*
* @throws Exception\AlreadySubmittedException if the button has already been submitted
* @throws AlreadySubmittedException if the button has already been submitted
*/
public function submit(array|string|null $submittedData, bool $clearMissing = true): static
{
Expand Down
2 changes: 1 addition & 1 deletion Extension/Core/Type/TimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
namespace Symfony\Component\Form\Extension\Core\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Event\PreSubmitEvent;
use Symfony\Component\Form\Exception\InvalidConfigurationException;
use Symfony\Component\Form\Exception\LogicException;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
use Symfony\Component\Form\Event\PreSubmitEvent;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
Expand Down
3 changes: 1 addition & 2 deletions Extension/Csrf/EventListener/CsrfValidationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function __construct(
private ?TranslatorInterface $translator = null,
private ?string $translationDomain = null,
?ServerParams $serverParams = null,
)
{
) {
$this->serverParams = $serverParams ?? new ServerParams();
}

Expand Down
3 changes: 1 addition & 2 deletions Extension/Validator/ViolationMapper/RelativePath.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class RelativePath extends PropertyPath
public function __construct(
private FormInterface $root,
string $propertyPath,
)
{
) {
parent::__construct($propertyPath);
}

Expand Down
2 changes: 1 addition & 1 deletion Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ public function isSynchronized(): bool
return null === $this->transformationFailure;
}

public function getTransformationFailure(): ?Exception\TransformationFailedException
public function getTransformationFailure(): ?TransformationFailedException
{
return $this->transformationFailure;
}
Expand Down
2 changes: 1 addition & 1 deletion NativeRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(?ServerParams $params = null)
}

/**
* @throws Exception\UnexpectedTypeException If the $request is not null
* @throws UnexpectedTypeException If the $request is not null
*/
public function handleRequest(FormInterface $form, mixed $request = null): void
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Extension/Validator/ValidatorTypeGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ValidatorTypeGuesserTest extends TestCase
/**
* @var MetadataFactoryInterface
*/
private \Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory $metadataFactory;
private FakeMetadataFactory $metadataFactory;

protected function setUp(): void
{
Expand Down
8 changes: 4 additions & 4 deletions Tests/FormFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public function testCreateBuilderUsesPatternIfFound()

class ConfigurableFormTypeGuesser implements FormTypeGuesserInterface
{
private ?\Symfony\Component\Form\Guess\TypeGuess $typeGuess = null;
private ?\Symfony\Component\Form\Guess\ValueGuess $requiredGuess = null;
private ?\Symfony\Component\Form\Guess\ValueGuess $maxLengthGuess = null;
private ?\Symfony\Component\Form\Guess\ValueGuess $patternGuess = null;
private ?TypeGuess $typeGuess = null;
private ?ValueGuess $requiredGuess = null;
private ?ValueGuess $maxLengthGuess = null;
private ?ValueGuess $patternGuess = null;

public function guessType($class, $property): ?TypeGuess
{
Expand Down
2 changes: 1 addition & 1 deletion Util/OrderedHashMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Creates a new map.
*
* @param TValue[] $elements The initial elements of the map, indexed by their keys.
* @param TValue[] $elements The initial elements of the map, indexed by their keys
*/
public function __construct(
private array $elements = [],
Expand Down

0 comments on commit 7b4f01d

Please sign in to comment.