use $this instead of self

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

@ -50,10 +50,9 @@ class View
* *
* @param string|iterable<string, mixed> $key * @param string|iterable<string, mixed> $key
* @param mixed $value Value * @param mixed $value Value
* * @return $this
* @return self
*/ */
public function set($key, $value = null): self public function set($key, $value = null)
{ {
if (\is_iterable($key)) { if (\is_iterable($key)) {
foreach ($key as $k => $v) { foreach ($key as $k => $v) {
@ -79,7 +78,7 @@ class View
* Unsets a template variable. If no key is passed in, clear all variables * Unsets a template variable. If no key is passed in, clear all variables
* @return $this * @return $this
*/ */
public function clear(?string $key = null): self public function clear(?string $key = null)
{ {
if ($key === null) { if ($key === null) {
$this->vars = []; $this->vars = [];

Loading…
Cancel
Save