Skip to content

Commit 732fbe8

Browse files
committed
Fix @var phpdoc
1 parent 3edb596 commit 732fbe8

File tree

32 files changed

+96
-95
lines changed

32 files changed

+96
-95
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'@PHPUnit75Migration:risky' => true,
3131
'@Symfony' => true,
3232
'@Symfony:risky' => true,
33+
'phpdoc_var_annotation_correct_order' => true,
3334
'protected_to_private' => false,
3435
'no_superfluous_phpdoc_tags' => [
3536
'remove_inheritdoc' => true,

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testCreateProxyServiceWithRuntimeInstantiator()
3838

3939
$builder->compile();
4040

41-
/* @var $foo1 \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface */
41+
/** @var \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface $foo1 */
4242
$foo1 = $builder->get('foo1');
4343

4444
$foo1->__destruct();

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testInstantiateProxy()
4141
$definition = new Definition('stdClass');
4242
$instantiator = fn () => $instance;
4343

44-
/* @var $proxy LazyLoadingInterface|ValueHolderInterface */
44+
/** @var LazyLoadingInterface|ValueHolderInterface $proxy */
4545
$proxy = $this->instantiator->instantiateProxy($container, $definition, 'foo', $instantiator);
4646

4747
$this->assertInstanceOf(LazyLoadingInterface::class, $proxy);

src/Symfony/Bridge/Twig/Extension/FormExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private function createFieldChoicesList(iterable $choices, string|false|null $tr
157157
continue;
158158
}
159159

160-
/* @var ChoiceView $choice */
160+
/** @var ChoiceView $choice */
161161
$translatableLabel = $this->createFieldTranslation($choice->label, $choice->labelTranslationParameters, $translationDomain);
162162
yield $translatableLabel => $choice->value;
163163
}

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function testFile()
233233
$controller = $this->createController();
234234
$controller->setContainer($container);
235235

236-
/* @var BinaryFileResponse $response */
236+
/** @var BinaryFileResponse $response */
237237
$response = $controller->file(new File(__FILE__));
238238
$this->assertInstanceOf(BinaryFileResponse::class, $response);
239239
$this->assertSame(200, $response->getStatusCode());
@@ -248,7 +248,7 @@ public function testFileAsInline()
248248
{
249249
$controller = $this->createController();
250250

251-
/* @var BinaryFileResponse $response */
251+
/** @var BinaryFileResponse $response */
252252
$response = $controller->file(new File(__FILE__), null, ResponseHeaderBag::DISPOSITION_INLINE);
253253

254254
$this->assertInstanceOf(BinaryFileResponse::class, $response);
@@ -264,7 +264,7 @@ public function testFileWithOwnFileName()
264264
{
265265
$controller = $this->createController();
266266

267-
/* @var BinaryFileResponse $response */
267+
/** @var BinaryFileResponse $response */
268268
$fileName = 'test.php';
269269
$response = $controller->file(new File(__FILE__), $fileName);
270270

@@ -281,7 +281,7 @@ public function testFileWithOwnFileNameAsInline()
281281
{
282282
$controller = $this->createController();
283283

284-
/* @var BinaryFileResponse $response */
284+
/** @var BinaryFileResponse $response */
285285
$fileName = 'test.php';
286286
$response = $controller->file(new File(__FILE__), $fileName, ResponseHeaderBag::DISPOSITION_INLINE);
287287

@@ -298,7 +298,7 @@ public function testFileFromPath()
298298
{
299299
$controller = $this->createController();
300300

301-
/* @var BinaryFileResponse $response */
301+
/** @var BinaryFileResponse $response */
302302
$response = $controller->file(__FILE__);
303303

304304
$this->assertInstanceOf(BinaryFileResponse::class, $response);
@@ -314,7 +314,7 @@ public function testFileFromPathWithCustomizedFileName()
314314
{
315315
$controller = $this->createController();
316316

317-
/* @var BinaryFileResponse $response */
317+
/** @var BinaryFileResponse $response */
318318
$response = $controller->file(__FILE__, 'test.php');
319319

320320
$this->assertInstanceOf(BinaryFileResponse::class, $response);

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function build(ContainerBuilder $container): void
2424
{
2525
parent::build($container);
2626

27-
/** @var $extension DependencyInjection\TestExtension */
27+
/** @var DependencyInjection\TestExtension $extension */
2828
$extension = $container->getExtension('test');
2929

3030
if (!$container->getParameterBag() instanceof FrozenParameterBag) {

src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function downloadPackages(array $importMapEntries, ?callable $progressCal
196196

197197
$dependencies = [];
198198
$extraFiles = [];
199-
/* @var ImportMapEntry $entry */
199+
/** @var ImportMapEntry $entry */
200200
$contents[$package] = [
201201
'content' => $this->makeImportsBare($response->getContent(), $dependencies, $extraFiles, $entry->type, $entry->getPackagePathString()),
202202
'dependencies' => $dependencies,

src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public function testUpdateAll()
248248
->method('resolvePackages')
249249
->with($this->callback(function ($packages) {
250250
$this->assertInstanceOf(PackageRequireOptions::class, $packages[0]);
251-
/* @var PackageRequireOptions[] $packages */
251+
/** @var PackageRequireOptions[] $packages */
252252
$this->assertCount(2, $packages);
253253

254254
$this->assertSame('lodash', $packages[0]->packageModuleSpecifier);

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testInlineStyleOptions(string $tag, ?string $expected = null, ?s
177177
$expected = $tag.$input.'</'.$styleString.'>';
178178
$this->assertSame($expected, $formatter->format($expected));
179179
} else {
180-
/* @var OutputFormatterStyle $result */
180+
/** @var OutputFormatterStyle $result */
181181
$this->assertInstanceOf(OutputFormatterStyle::class, $result);
182182
$this->assertSame($expected, $formatter->format($tag.$input.'</>'));
183183
$this->assertSame($expected, $formatter->format($tag.$input.'</'.$styleString.'>'));

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ public function testAddObjectResource()
11281128

11291129
$this->assertCount(1, $resources);
11301130

1131-
/* @var $resource \Symfony\Component\Config\Resource\FileResource */
1131+
/** @var \Symfony\Component\Config\Resource\FileResource $resource */
11321132
$resource = end($resources);
11331133

11341134
$this->assertInstanceOf(FileResource::class, $resource);

0 commit comments

Comments
 (0)