Passed
Push — master ( 16cc56...d9bd57 )
by Iman
02:32
created

StartGuarding::guardRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 11
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Imanghafoori\HeyMan;
4
5
class StartGuarding
6
{
7 110
    public function start()
8
    {
9 110
        $chains = resolve('heyman.chains')->data;
10
11 110
        foreach ($chains as $manager => $data) {
12 93
            resolve($manager)->startWatching($data);
0 ignored issues
show
Bug introduced by
The method startWatching() 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

12
            resolve($manager)->/** @scrutinizer ignore-call */ startWatching($data);

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...
13
        }
14
15
        // We free up the memory here ...
16
        // Although it is a very small amount
17 110
        resolve('heyman.chains')->data = [];
18 110
    }
19
}
20