Skip to content

Commit e6a35de

Browse files
committed
fix: static analysis
1 parent 2b3598b commit e6a35de

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Html/Editor/Editor.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ public function __call($method, $parameters): static
327327
return $this->on($event, $parameters[0]);
328328
}
329329

330-
return $this->macroCall($method, $parameters);
330+
$macroCall = $this->macroCall($method, $parameters);
331+
332+
if (! $macroCall instanceof Editor) {
333+
abort(500, sprintf('Method %s::%s must return an Editor instance.', static::class, $method));
334+
}
335+
336+
return $this;
331337
}
332338
}

0 commit comments

Comments
 (0)