Skip to content

Commit 616795e

Browse files
committed
.
1 parent 7d1f81f commit 616795e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Serializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function deserializeFile(string $filename, string $format = 'json', strin
9797
$contents = file_get_contents($filename);
9898

9999
$ext = pathinfo($filename, PATHINFO_EXTENSION);
100-
if ('yaml' === $format || in_array($ext, ['yml', 'yaml'])) {
100+
if ('yaml' === $format || in_array($ext, ['yml', 'yaml'], strict: true)) {
101101
$contents = json_encode(Yaml::parse($contents));
102102
}
103103

src/Type/LegacyTypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function augmentItems(OA\Schema $schema, Analysis $analysis): void
103103

104104
protected function normaliseTypeResult(?string $explicitType = null, ?array $explicitDetails = null, array $types = [], ?string $name = null, ?bool $nullable = null, ?bool $isArray = null, bool $unsupported = false, ?Context $context = null): \stdClass
105105
{
106-
$types = array_filter($types, static fn (string $t): bool => !in_array($t, ['null', '']));
106+
$types = array_filter($types, static fn (string $t): bool => !in_array($t, ['null', ''], strict: true));
107107

108108
if ($context) {
109109
foreach ($types as $ii => $type) {

0 commit comments

Comments
 (0)