Skip to content

Commit

Permalink
Remove redundant assertions due to improved types in laminas-form
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jan 15, 2024
1 parent 4e2591a commit 6aa22d4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/Form/FormIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Laminas\Form\Element\Text;
use Laminas\Form\Form;
use Laminas\Form\FormElementManager;
use Laminas\Form\FormInterface;
use Laminas\I18n\PhoneNumber\Form\Element\PhoneNumber;
use Laminas\I18n\PhoneNumber\PhoneNumberValue;
use Laminas\I18n\PhoneNumber\Test\NumberGeneratorTrait;
Expand All @@ -33,9 +34,7 @@ protected function setUp(): void
$formElements = $this->container->get(FormElementManager::class);
/** @psalm-suppress RedundantCondition */
assert($formElements instanceof FormElementManager);
$form = $formElements->get(Form::class);
assert($form instanceof Form);
$this->form = $form;
$this->form = $formElements->get(Form::class);
$this->formElements = $formElements;
}

Expand Down Expand Up @@ -228,7 +227,7 @@ public function testAllowableTypesAsAConstructorOptionCanBeUsedToLimitValidNumbe
);

$form = $this->formElements->get(Form::class);
assert($form instanceof Form);
assert($form instanceof FormInterface);
$form->add($element, ['name' => 'num']);

$form->setData(['num' => '999']);
Expand Down

0 comments on commit 6aa22d4

Please sign in to comment.