Skip to content

Commit

Permalink
Added newlines argument to Builder::toZpl()
Browse files Browse the repository at this point in the history
  • Loading branch information
robgridley committed Apr 3, 2018
1 parent de8557c commit c02e740
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Zpl/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ public function gf(): self
/**
* Convert instance to ZPL.
*
* @param bool $newlines
* @return string
*/
public function toZpl(): string
public function toZpl(bool $newlines = false): string
{
return implode('', array_merge(['^XA'], $this->zpl, ['^XZ']));
return implode($newlines ? "\n" : '', array_merge(['^XA'], $this->zpl, ['^XZ']));
}

/**
Expand Down

0 comments on commit c02e740

Please sign in to comment.