replace iterable for arrays

580-view-class-steroids
fadrian06 1 day ago
parent 7d29fdf719
commit d28939f204

@ -46,15 +46,14 @@ class View
} }
/** /**
* Sets a template variable. * Sets a template variable
* * @param string|array<string, mixed> $key
* @param string|iterable<string, mixed> $key
* @param mixed $value Value * @param mixed $value Value
* @return $this * @return $this
*/ */
public function set($key, $value = null) public function set($key, $value = null)
{ {
if (\is_iterable($key)) { if (is_array($key)) {
foreach ($key as $k => $v) { foreach ($key as $k => $v) {
$this->vars[$k] = $v; $this->vars[$k] = $v;
} }

Loading…
Cancel
Save