for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace kalanis\kw_templates\Template;
class Item
{
protected string $key = '';
protected string $default = '';
protected ?string $value = null;
public function setData(string $key, string $default = ''): self
$this->key = $key;
$this->default = $default;
return $this;
}
public function setValue(?string $value): self
$this->value = $value;
/**
* @param bool|float|int|string|null ...$arg
* @return $this
*/
public function updateValue(...$arg): self
$this->value = sprintf($this->getValue(), ...$arg);
public function getKey(): string
return $this->key ;
public function getDefault(): string
return $this->default;
public function getValue(): string
return $this->value ?? $this->default ;