Add method to mark pointers as found

This commit is contained in:
Andrea Marco Sartori 2022-09-21 01:54:32 +02:00
parent 82c70b7374
commit aa778dacac

View File

@ -76,6 +76,19 @@ class Pointers implements Countable
return end($pointers) ?: $this->defaultPointer;
}
/**
* Mark the given pointer as found
*
* @param Pointer $pointer
* @return void
*/
public function markAsFound(Pointer $pointer): void
{
$key = (string) $pointer;
$this->found[$key] = true;
}
/**
* Determine whether all pointers were found within the JSON
*