Skip to content

Commit 4a5122a

Browse files
committed
chore: phpstan issues
1 parent 88fb8be commit 4a5122a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Documentation/Action/DocumentationAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function __invoke(Request $request = null): DocumentationInterface
4040
$request->attributes->set('_api_normalization_context', $request->attributes->get('_api_normalization_context', []) + $context);
4141
}
4242

43-
if ('json' === $request->getRequestFormat() && null !== $this->openApiFactory) {
44-
return $this->openApiFactory->__invoke($context);
43+
if ('json' === $request?->getRequestFormat() && null !== $this->openApiFactory) {
44+
return $this->openApiFactory->__invoke($context ?? []);
4545
}
4646

4747
return new Documentation($this->resourceNameCollectionFactory->create(), $this->title, $this->description, $this->version);

src/Elasticsearch/Metadata/Resource/Factory/ElasticsearchProviderResourceMetadataCollectionFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ private function hasIndices(string $shortName): bool
9191
return false;
9292
} catch (NoNodesAvailableException) {
9393
return false;
94-
} catch (NoNodesAvailableException) {
95-
return false;
9694
}
9795
}
9896
}

0 commit comments

Comments
 (0)