Skip to content

Commit 46b4199

Browse files
authored
Update Schema.php
Move constant DEFAULT_MAX_NEST to a static constant from the context object
1 parent 48caf50 commit 46b4199

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Schema.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ class Schema extends JsonSchema implements MetaHolder, SchemaContract, HasDefaul
3737
const CONST_PROPERTY = 'const';
3838
const DEFAULT_PROPERTY = 'default';
3939

40-
const DEFAULT_MAX_NEST = 200;
41-
4240
const DEFAULT_MAPPING = 'default';
4341

4442
const VERSION_AUTO = 'a';
@@ -167,7 +165,7 @@ public function in($data, ?Context $options = null)
167165
$options->import = true;
168166

169167
if ($options->refResolver === null) {
170-
$options->refResolver = new RefResolver($data, $options->maxNestLevel ?? DEFAULT_MAX_NEST);
168+
$options->refResolver = new RefResolver($data, $options->maxNestLevel ?? Context::DEFAULT_MAX_NEST);
171169
} else {
172170
$options->refResolver->setRootData($data);
173171
}

0 commit comments

Comments
 (0)