text = $text; $i = 0; foreach($params as $str){ $this->params[$i] = (string) $str; ++$i; } } public function getText() : string{ return $this->text; } /** * @return string[] */ public function getParameters() : array{ return $this->params; } public function getParameter(int $i) : ?string{ return $this->params[$i] ?? null; } }