Skip to content

Commit 8fa937a

Browse files
committed
refactor: replace magic sentinel -1 with null for cachedMaxErrors
Use ?int with null instead of int with -1 to represent the "no cached value" state, consistent with $cachedValidator.
1 parent c2c34bc commit 8fa937a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Laravel/ValidatesOpenApiSchema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ trait ValidatesOpenApiSchema
2020
{
2121
use OpenApiSpecResolver;
2222
private static ?OpenApiResponseValidator $cachedValidator = null;
23-
private static int $cachedMaxErrors = -1;
23+
private static ?int $cachedMaxErrors = null;
2424

2525
public static function resetValidatorCache(): void
2626
{
2727
self::$cachedValidator = null;
28-
self::$cachedMaxErrors = -1;
28+
self::$cachedMaxErrors = null;
2929
}
3030

3131
protected function openApiSpec(): string

0 commit comments

Comments
 (0)