Skip to content

Commit 7d257b4

Browse files
committed
style: Fix CS
1 parent 7ac48f5 commit 7d257b4

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

tests/Stubs/Symfony/Component/Form/DataClass.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
declare(strict_types=1);
44

5-
namespace Stubs\Symfony\Component\Form;
5+
namespace PHPStan\Stubs\Symfony\Component\Form;
66

77
class DataClass
88
{
9-
/**
10-
* @var int
11-
*/
9+
10+
/** @var int */
1211
public $foo;
1312

14-
/**
15-
* @var string
16-
*/
13+
/** @var string */
1714
public $bar;
15+
1816
}

tests/Stubs/Symfony/Component/Form/DataClassType.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
namespace Stubs\Symfony\Component\Form;
3+
declare(strict_types=1);
4+
5+
namespace PHPStan\Stubs\Symfony\Component\Form;
46

57
use Symfony\Component\Form\AbstractType;
68
use Symfony\Component\Form\Extension\Core\Type\NumberType;
@@ -13,6 +15,7 @@
1315
*/
1416
class DataClassType extends AbstractType
1517
{
18+
1619
public function buildForm(FormBuilderInterface $builder, array $options): void
1720
{
1821
$builder
@@ -29,4 +32,5 @@ public function configureOptions(OptionsResolver $resolver): void
2932
])
3033
;
3134
}
35+
3236
}

tests/Stubs/Symfony/Component/Form/FormFactoryAwareClass.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<?php
22

3-
namespace Stubs\Symfony\Component\Form;
3+
declare(strict_types=1);
4+
5+
namespace PHPStan\Stubs\Symfony\Component\Form;
46

57
use Symfony\Component\Form\FormFactoryInterface;
68

79
class FormFactoryAwareClass
810
{
9-
/**
10-
* @var FormFactoryInterface
11-
*/
11+
12+
/** @var FormFactoryInterface */
1213
private $formFactory;
1314

14-
public function __construct(
15-
FormFactoryInterface $formFactory
16-
) {
15+
public function __construct(FormFactoryInterface $formFactory)
16+
{
1717
$this->formFactory = $formFactory;
1818
}
1919

2020
public function doSomething(): void
2121
{
2222
$form = $this->formFactory->create(DataClassType::class, new DataClass());
2323
$data = $form->getData();
24+
\PHPStan\dumpType($data);
2425
$this->thisOnlyAcceptsDataClass($data);
2526
$this->thisOnlyAcceptsDataClassOrNull($data);
2627
}
@@ -40,4 +41,5 @@ private function thisOnlyAcceptsDataClass(DataClass $data): void
4041
private function thisOnlyAcceptsDataClassOrNull(?DataClass $data): void
4142
{
4243
}
44+
4345
}

0 commit comments

Comments
 (0)