Forget   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 11 4
1
<?php
2
3
namespace Imanghafoori\HeyMan\Core;
4
5
/**
6
 * Class Forget.
7
 *
8
 * @method aboutRoute(array|string $routeName)
9
 * @method aboutAction(array|string $action)
10
 * @method aboutUrl(array|string $url)
11
 * @method aboutModel(array|string $model)
12
 * @method aboutDeleting(array|string $model)
13
 * @method aboutSaving(array|string $model)
14
 * @method aboutCreating(array|string $model)
15
 * @method aboutUpdating(array|string $model)
16
 * @method aboutFetching(array|string $model)
17
 */
18
final class Forget
19
{
20
    public static $situationProviders;
21
22 14
    public function __call($method, $args)
23
    {
24 14
        $args = is_array($args[0]) ? $args[0] : $args;
25
26 14
        foreach (static::$situationProviders as $class) {
27 14
            if (in_array($method, $class::getForgetMethods())) {
28 14
                $args = $class::getForgetArgs($method, $args);
29
            }
30
        }
31
32 14
        resolve('heyman.chains')->forgetAbout(...$args);
0 ignored issues
show
Bug introduced by
The method forgetAbout() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

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

32
        resolve('heyman.chains')->/** @scrutinizer ignore-call */ forgetAbout(...$args);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
33 14
    }
34
}
35