Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/SpecBaseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public function __unset($name)
* Resolves all Reference Objects in this object and replaces them with their resolution.
* @throws exceptions\UnresolvableReferenceException in case resolving a reference fails.
*/
public function resolveReferences(ReferenceContext $context = null)
public function resolveReferences(?ReferenceContext $context = null)
{
// avoid recursion to get stuck in a loop
if ($this->_recursingReferences) {
Expand Down
2 changes: 1 addition & 1 deletion src/SpecObjectInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getErrors(): array;
/**
* Resolves all Reference Objects in this object and replaces them with their resolution.
*/
public function resolveReferences(ReferenceContext $context = null);
public function resolveReferences(?ReferenceContext $context = null);

/**
* Set context for all Reference Objects in this object.
Expand Down
2 changes: 1 addition & 1 deletion src/spec/PathItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function setReferenceContext(ReferenceContext $context)
* Resolves all Reference Objects in this object and replaces them with their resolution.
* @throws \cebe\openapi\exceptions\UnresolvableReferenceException in case resolving a reference fails.
*/
public function resolveReferences(ReferenceContext $context = null)
public function resolveReferences(?ReferenceContext $context = null)
{
if ($this->_ref instanceof Reference) {
$pathItem = $this->_ref->resolve($context);
Expand Down
2 changes: 1 addition & 1 deletion src/spec/Paths.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function getIterator(): Traversable
* Resolves all Reference Objects in this object and replaces them with their resolution.
* @throws UnresolvableReferenceException
*/
public function resolveReferences(ReferenceContext $context = null)
public function resolveReferences(?ReferenceContext $context = null)
{
foreach ($this->_paths as $key => $path) {
if ($path === null) {
Expand Down
2 changes: 1 addition & 1 deletion src/spec/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private function makeRelativePath($base, $path)
* Resolves all Reference Objects in this object and replaces them with their resolution.
* @throws UnresolvableReferenceException
*/
public function resolveReferences(ReferenceContext $context = null)
public function resolveReferences(?ReferenceContext $context = null)
{
throw new UnresolvableReferenceException('Cyclic reference detected, resolveReferences() called on a Reference Object.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/spec/Responses.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function getIterator(): Traversable
* Resolves all Reference Objects in this object and replaces them with their resolution.
* @throws UnresolvableReferenceException
*/
public function resolveReferences(ReferenceContext $context = null)
public function resolveReferences(?ReferenceContext $context = null)
{
foreach ($this->_responses as $key => $response) {
if ($response instanceof Reference) {
Expand Down