Skip to content

Commit

Permalink
Update OutgoingEdgeLoader.php
Browse files Browse the repository at this point in the history
  • Loading branch information
esokullu authored Aug 21, 2019
1 parent 04658e8 commit 377191a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Pho/Framework/Loaders/OutgoingEdgeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ public static function pack(Framework\ParticleInterface $particle): AbstractLoad
$_pattern .= $param->getType();
$_pattern .= ":::";
if($param->isOptional()) {
$pattern .= sprintf("(%s)?", $_pattern);
if(substr($pattern, -3)==":::")
$pattern = substr($pattern, 0, -3) .sprintf("(:::%s)?", $_pattern);
else
$pattern .= sprintf("(%s)?", $_pattern);
}
else
$pattern .= $_pattern;
Expand Down

0 comments on commit 377191a

Please sign in to comment.