Issues (36)

src/Concerns/FailHook.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Larapie\Actions\Concerns;
4
5
use Throwable;
6
7
trait FailHook
8
{
9 6
    protected function failHook(Throwable $exception)
10
    {
11 6
        if (! method_exists($this, 'onFail')) {
12 3
            throw $exception;
13
        }
14 3
        $this->resolveAndCall($this, 'onFail', compact('exception'));
0 ignored issues
show
It seems like resolveAndCall() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        $this->/** @scrutinizer ignore-call */ 
15
               resolveAndCall($this, 'onFail', compact('exception'));
Loading history...
15
16 1
        throw $exception;
17
    }
18
}
19