Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/JsonSchema/RefResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ class RefResolver
* @var integer
*/
protected static $depth = 0;
/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the indentation on these lines? Also add a \n before this line?

* maximum references depth
* @var integer
*/
public static $maxDepth = 7;

/**
* @var UriRetrieverInterface
Expand Down Expand Up @@ -88,7 +93,7 @@ public function getUriRetriever()
*/
public function resolve($schema, $sourceUri = null)
{
if (self::$depth > 7) {
if (self::$depth > self::$maxDepth) {
return;
}
++self::$depth;
Expand Down