Skip to content

Commit

Permalink
FlowCommunications#33 setter for $data
Browse files Browse the repository at this point in the history
  • Loading branch information
4n70w4 committed Jun 21, 2019
1 parent 3cd3948 commit 4b3f75e
Showing 1 changed file with 11 additions and 1 deletion.
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

0 comments on commit 4b3f75e

Please sign in to comment.