Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
Closed
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
12 changes: 11 additions & 1 deletion src/Flow/JSONPath/JSONPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,22 @@ class JSONPath implements ArrayAccess, Iterator, JsonSerializable, Countable
* @param $data
* @param int $options
*/
public function __construct($data, $options = 0)
public function __construct($data = null, $options = 0)
{
$this->data = $data;
$this->options = $options;
}

/**
* @param null $data
* @return JSONPath
*/
public function setData($data): JSONPath
{
$this->data = $data;
return $this;
}

/**
* Evaluate an expression
*
Expand Down