StartGuarding::start()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 3
b 0
f 0
nc 2
nop 0
dl 0
loc 11
rs 10
ccs 5
cts 5
cp 1
crap 2
1
<?php
2
3
namespace Imanghafoori\HeyMan;
4
5
class StartGuarding
6
{
7 121
    public function start()
8
    {
9 121
        $chains = resolve('heyman.chains')->data;
10
11 121
        foreach ($chains as $manager => $data) {
12 104
            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 121
        resolve('heyman.chains')->data = [];
18 121
    }
19
}
20