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

ViewSituations::whenYouMakeView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\WatchingStrategies\Views;
4
5
final class ViewSituations
6
{
7
    public function hasMethod()
8
    {
9
    }
10
11
    /**
12
     * @param array|string $views
13
     */
14 19
    public function whenYouMakeView(...$views)
15
    {
16 19
        $view = resolve(ViewNormalizer::class)->normalizeView($views);
17 18
        resolve('heyman.chains')->init(ViewEventManager::class, $view);
0 ignored issues
show
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

17
        resolve('heyman.chains')->/** @scrutinizer ignore-call */ init(ViewEventManager::class, $view);

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...
18 18
    }
19
}
20