Completed
Pull Request — master (#47)
by Iman
13:15 queued 09:06
created

ViewSituations   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A whenYouMakeView() 0 4 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