Nameable ⇒ GettableName ⇒ DefaultableName
/**
* @param string|null $name
* @return string
*/
public function defaultName(?string $name = null): string
{
return $name ?? DEFAULT_NAME; // 'default_name'
}
use DefaultableName;
/** @var string */
protected $name;
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
use GettableName;
/**
* @param string $name
* @return self
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}