Passed
Push — master ( f1d925...405c7b )
by Iman
06:01
created

BaseSituation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasMethod() 0 3 1
A setManager() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\WatchingStrategies;
4
5
abstract class BaseSituation
6
{
7
    public function hasMethod($method)
0 ignored issues
show
Unused Code introduced by
The parameter $method is not used and could be removed. ( Ignorable by Annotation )

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

7
    public function hasMethod(/** @scrutinizer ignore-unused */ $method)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
8
    {
9
        return false;
10
    }
11
12
    protected function setManager(string $class, ...$array)
13
    {
14
        resolve('heyman.chain')->set('eventManager', resolve($class)->init(...$array));
0 ignored issues
show
Bug introduced by
The method set() 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

14
        resolve('heyman.chain')->/** @scrutinizer ignore-call */ set('eventManager', resolve($class)->init(...$array));

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...
Bug introduced by
The method init() 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

14
        resolve('heyman.chain')->set('eventManager', resolve($class)->/** @scrutinizer ignore-call */ init(...$array));

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...
15
    }
16
}
17