Completed
Push — master ( 8aac64...6ed379 )
by Iman
16:55 queued 13:14
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\Situations;
4
5
use Imanghafoori\HeyMan\Normilizers\ViewNormalizer;
6
use Imanghafoori\HeyMan\WatchingStrategies\ViewEventManager;
7
8
class ViewSituations extends BaseSituation
9
{
10
    /**
11
     * @param array|string $views
12
     */
13 19
    public function whenYouMakeView(...$views)
14
    {
15 19
        $view = app(ViewNormalizer::class)->normalizeView($views);
16 18
        $this->chain->eventManager = app(ViewEventManager::class)->init($view);
0 ignored issues
show
Documentation Bug introduced by
It seems like app(Imanghafoori\HeyMan\...er::class)->init($view) of type Imanghafoori\HeyMan\Watc...tegies\ViewEventManager is incompatible with the declared type Imanghafoori\HeyMan\ListenerApplier of property $eventManager.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
17 18
    }
18
}
19