Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
voku authored and StyleCIBot committed May 14, 2020
1 parent 8baf108 commit 4f0d970
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions build/Template/TemplateFormatter.php
Expand Up @@ -2,7 +2,8 @@

namespace voku\build\Template;

class TemplateFormatter {
class TemplateFormatter
{
/**
* @var array<string, string>
*/
Expand All @@ -16,7 +17,8 @@ class TemplateFormatter {
/**
* @param string $template
*/
public function __construct(string $template) {
public function __construct(string $template)
{
$this->template = $template;
}

Expand All @@ -26,7 +28,8 @@ public function __construct(string $template) {
*
* @return $this
*/
public function set(string $var, string $value): self {
public function set(string $var, string $value): self
{
$this->vars[$var] = $value;

return $this;
Expand All @@ -38,7 +41,8 @@ public function set(string $var, string $value): self {
*
* @return $this
*/
public function append(string $var, string $value): self {
public function append(string $var, string $value): self
{
$this->vars[$var] = ($this->vars[$var] ?? '') . $value;

return $this;
Expand All @@ -47,7 +51,8 @@ public function append(string $var, string $value): self {
/**
* @return string
*/
public function format(): string {
public function format(): string
{
$s = $this->template;

foreach ($this->vars as $name => $value) {
Expand All @@ -56,4 +61,4 @@ public function format(): string {

return $s;
}
}
}

0 comments on commit 4f0d970

Please sign in to comment.