Skip to content

Commit

Permalink
Update Action.php
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Jun 27, 2024
1 parent 784209c commit 209c72c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Actions/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ public function handleFormRequest(Request $request, Model $model): void

$this->handle($request, $models);

if (method_exists($model, 'recordRootEvent')) {
if (in_array(HasRootEvents::class, class_uses_recursive($model))) {
$models->each(static function (Model $model) use ($request): void {
/** @phpstan-assert !null $model->recordRootEvent() */
$model->recordRootEvent(

Check failure on line 217 in src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / 3️⃣ Static Analysis

Call to an undefined method Illuminate\Database\Eloquent\Model::recordRootEvent().
Str::of(static::class)->classBasename()->headline()->value(),
$request->user()
Expand Down

0 comments on commit 209c72c

Please sign in to comment.