$type] ); } /** * Create exception for unresolvable reference. */ public static function unresolvableReference(string $ref, string $nsid): self { return static::withContext( "Cannot resolve reference {$ref} in schema {$nsid}", ['ref' => $ref, 'nsid' => $nsid] ); } /** * Create exception for circular reference. */ public static function circularReference(string $ref, array $chain): self { return static::withContext( "Circular reference detected: {$ref}", ['ref' => $ref, 'chain' => $chain] ); } }