Skip to content

Commit

Permalink
Allow for -> syntax to be used in parsing (#423)
Browse files Browse the repository at this point in the history
LGTM!
  • Loading branch information
Bram authored Jan 20, 2022
1 parent a830a49 commit baa2f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Faker/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ public function parse($string)
return $this->format($matches[1]);
};

return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', $callback, $string);
return preg_replace_callback('/{{\s?(\w+|[\w\\\]+->\w+?)\s?}}/u', $callback, $string);
}

/**
Expand Down

0 comments on commit baa2f17

Please sign in to comment.