Skip to content

Commit 48caf50

Browse files
authored
Update Context.php
Address P1 Issue and set default for maxNestLevel to constant DEFAULT_MAX_NEST
1 parent 5b78fcc commit 48caf50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Context.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
class Context extends MagicMap
66
{
7+
const DEFAULT_MAX_NEST = 200;
8+
79
public $import = true;
810

911
/** @var DataPreProcessor */
@@ -52,7 +54,7 @@ class Context extends MagicMap
5254
public $isRef = false;
5355

5456
/** @var int property max recursive nesting depth */
55-
public $maxNestLevel = 200;
57+
public $maxNestLevel = DEFAULT_MAX_NEST;
5658

5759
/**
5860
* Dereference $ref unless there is a $ref property defined with format not equal to `uri-reference`.

0 commit comments

Comments
 (0)