Skip to content

Commit f837e82

Browse files
Fix inline var annotations
1 parent cfe2fcc commit f837e82

File tree

8 files changed

+3
-17
lines changed

8 files changed

+3
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public function downloadPackages(array $importMapEntries, ?callable $progressCal
184184
$errors = [];
185185
$contents = [];
186186
$extraFileResponses = [];
187+
/** @var ImportMapEntry $entry */
187188
foreach ($responses as $package => [$response, $entry]) {
188189
if (200 !== $response->getStatusCode()) {
189190
$errors[] = [$package, $response];
@@ -196,7 +197,6 @@ public function downloadPackages(array $importMapEntries, ?callable $progressCal
196197

197198
$dependencies = [];
198199
$extraFiles = [];
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/Form/Extension/Validator/ValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public function __construct(ValidatorInterface $validator, bool $legacyErrorMess
3636
{
3737
$this->legacyErrorMessages = $legacyErrorMessages;
3838

39+
/** @var ClassMetadata $metadata */
3940
$metadata = $validator->getMetadataFor(\Symfony\Component\Form\Form::class);
4041

4142
// Register the form constraints in the validator programmatically.
4243
// This functionality is required when using the Form component without
4344
// the DIC, where the XML file is loaded automatically. Thus the following
4445
// code must be kept synchronized with validation.xml
4546

46-
/** @var ClassMetadata $metadata */
4747
$metadata->addConstraint(new Form());
4848
$metadata->addConstraint(new Traverse(false));
4949

src/Symfony/Component/Form/ResolvedFormType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ public function finishView(FormView $view, FormInterface $form, array $options)
129129

130130
$this->innerType->finishView($view, $form, $options);
131131

132+
/** @var FormTypeExtensionInterface $extension */
132133
foreach ($this->typeExtensions as $extension) {
133-
/** @var FormTypeExtensionInterface $extension */
134134
$extension->finishView($view, $form, $options);
135135
}
136136
}

src/Symfony/Component/Mailer/Tests/EventListener/MessengerTransportListenerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function testMessengerTransportStampViaHeader()
4141
$event = new MessageEvent($message, $envelope, 'smtp', true);
4242
$l->onMessage($event);
4343
$this->assertCount(1, $event->getStamps());
44-
/** @var TransportNamesStamp $stamp */
4544
$this->assertInstanceOf(TransportNamesStamp::class, $stamp = $event->getStamps()[0]);
4645
$this->assertSame(['async'], $stamp->getTransportNames());
4746
$this->assertFalse($message->getHeaders()->has('X-Bus-Transport'));
@@ -57,7 +56,6 @@ public function testMessengerTransportStampsViaHeader()
5756
$event = new MessageEvent($message, $envelope, 'smtp', true);
5857
$l->onMessage($event);
5958
$this->assertCount(1, $event->getStamps());
60-
/** @var TransportNamesStamp $stamp */
6159
$this->assertInstanceOf(TransportNamesStamp::class, $stamp = $event->getStamps()[0]);
6260
$this->assertSame(['async', 'async1', $name], $stamp->getTransportNames());
6361
$this->assertFalse($message->getHeaders()->has('X-Bus-Transport'));

src/Symfony/Component/Messenger/Middleware/RouterContextMiddleware.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
5858
$currentPathInfo = $context->getPathInfo();
5959
$currentQueryString = $context->getQueryString();
6060

61-
/** @var RouterContextStamp $contextStamp */
6261
$context
6362
->setBaseUrl($contextStamp->getBaseUrl())
6463
->setMethod($contextStamp->getMethod())

src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageToFailureTransportListenerTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ public function testItSendsToTheFailureTransportWithSenderLocator()
2626
$receiverName = 'my_receiver';
2727
$sender = $this->createMock(SenderInterface::class);
2828
$sender->expects($this->once())->method('send')->with($this->callback(function ($envelope) use ($receiverName) {
29-
/** @var Envelope $envelope */
3029
$this->assertInstanceOf(Envelope::class, $envelope);
31-
32-
/** @var SentToFailureTransportStamp $sentToFailureTransportStamp */
3330
$sentToFailureTransportStamp = $envelope->last(SentToFailureTransportStamp::class);
3431
$this->assertNotNull($sentToFailureTransportStamp);
3532
$this->assertSame($receiverName, $sentToFailureTransportStamp->getOriginalReceiverName());
@@ -101,10 +98,7 @@ public function testItSendsToTheFailureTransportWithMultipleFailedTransports()
10198
$receiverName = 'my_receiver';
10299
$sender = $this->createMock(SenderInterface::class);
103100
$sender->expects($this->once())->method('send')->with($this->callback(function ($envelope) use ($receiverName) {
104-
/** @var Envelope $envelope */
105101
$this->assertInstanceOf(Envelope::class, $envelope);
106-
107-
/** @var SentToFailureTransportStamp $sentToFailureTransportStamp */
108102
$sentToFailureTransportStamp = $envelope->last(SentToFailureTransportStamp::class);
109103
$this->assertNotNull($sentToFailureTransportStamp);
110104
$this->assertSame($receiverName, $sentToFailureTransportStamp->getOriginalReceiverName());

src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function testItSendsTheMessageToAssignedSender()
4141

4242
$envelope = $middleware->handle($envelope, $this->getStackMock(false));
4343

44-
/** @var SentStamp $stamp */
4544
$this->assertInstanceOf(SentStamp::class, $stamp = $envelope->last(SentStamp::class), 'it adds a sent stamp');
4645
$this->assertSame('my_sender', $stamp->getSenderAlias());
4746
$this->assertStringMatchesFormat('Mock_SenderInterface_%s', $stamp->getSenderClass());
@@ -59,7 +58,6 @@ public function testItSendsTheMessageToMultipleSenders()
5958
$sender->expects($this->once())
6059
->method('send')
6160
->with($this->callback(function (Envelope $envelope) {
62-
/** @var SentStamp|null $lastSentStamp */
6361
$lastSentStamp = $envelope->last(SentStamp::class);
6462

6563
// last SentStamp should be the "foo" alias
@@ -69,7 +67,6 @@ public function testItSendsTheMessageToMultipleSenders()
6967
$sender2->expects($this->once())
7068
->method('send')
7169
->with($this->callback(function (Envelope $envelope) {
72-
/** @var SentStamp|null $lastSentStamp */
7370
$lastSentStamp = $envelope->last(SentStamp::class);
7471

7572
// last SentStamp should be the "bar" alias
@@ -79,7 +76,6 @@ public function testItSendsTheMessageToMultipleSenders()
7976

8077
$envelope = $middleware->handle($envelope, $this->getStackMock(false));
8178

82-
/** @var SentStamp[] $sentStamps */
8379
$sentStamps = $envelope->all(SentStamp::class);
8480
$this->assertCount(2, $sentStamps);
8581
}

src/Symfony/Component/PropertyAccess/PropertyPath.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function __construct(self|string $propertyPath)
7272
{
7373
// Can be used as copy constructor
7474
if ($propertyPath instanceof self) {
75-
/** @var PropertyPath $propertyPath */
7675
$this->elements = $propertyPath->elements;
7776
$this->length = $propertyPath->length;
7877
$this->isIndex = $propertyPath->isIndex;

0 commit comments

Comments
 (0)