Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
22 | public function testType(): void |
||
23 | { |
||
24 | $this->status = true; |
||
|
|||
25 | $form = $this->factory->create(BooleanType::class); |
||
26 | $form->submit($this->status); |
||
27 | $this->assertForm($form); |
||
28 | |||
29 | $this->status = false; |
||
30 | $form = $this->factory->create(BooleanType::class); |
||
31 | $form->submit($this->status); |
||
32 | $this->assertForm($form); |
||
33 | |||
34 | $form = $this->factory->create(BooleanType::class); |
||
35 | $form->submit(''); |
||
36 | self::assertSame('', $form->getViewData()); |
||
37 | } |
||
38 | |||
45 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.